Agent skill

Write E2E Tests

by Endava in Endava/BEEQ

Write E2E tests for BEEQ StencilJS components using @stencil/vitest in browser mode (Playwright/Chromium).

Apache-2.0Auto-check passedTesting & QA

Install Write E2E Tests

skills CLI
$ npx skills add Endava/BEEQ --skill write-e2e-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Endava/BEEQ write-e2e-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Endava/BEEQ.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/write-e2e-tests .claude/skills/write-e2e-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
write-e2e-tests
GitHub stars
163
Token cost
~1.3k tokens
SKILL.md length
276 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Write E2E tests for BEEQ StencilJS components using @stencil/vitest in browser mode (Playwright/Chromium).

  • Works in 3 steps: Read the full testing instructions → Read the component's .tsx file to… → Check an existing well-tested file for…
  • Fixing E2E tests
  • SKILL.md covers When to Use, Before You Start, File Location & Extension and Imports, plus 9 more sections
  • Calls pnpm

What it does

Write E2E Tests is an agent skill from Endava/BEEQ. Write E2E tests for BEEQ StencilJS components using @stencil/vitest in browser mode (Playwright/Chromium). Use for: adding or fixing E2E tests, covering props, events, slots, methods, keyboard interactions, accessibility attributes, and CSS custom properties for bq- components. Files live at packages/beeq/src/components/<name/tests/bq-<name.e2e.tsx.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering End-to-end testing, React components and Unit testing. It works with Playwright and Vitest. The repository describes itself as: BEEQ Design System, a web component library ruled by Endavan developers :). The licence is Apache-2.0.

When your agent uses it

  • Fixing E2E tests
  • Keyboard interactions
  • Accessibility attributes
  • CSS custom properties for bq- components

Example prompts

  • “/write-e2e-tests”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Read the full testing instructions
  2. Read the component's .tsx file to understand all @Prop(), @Event(), @Method(), and @Listen() members
  3. Check an existing well-tested file for patterns, e.g. packages/beeq/src/components/button/tests/bq-button.e2e.tsx

What it can do on your machine

Read from SKILL.md and the folder at commit 5f4728d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Write E2E Tests loads about 1.3k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 276 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Endava/BEEQ at commit 5f4728d, republished under its Apache-2.0 licence (© Endava). 276 words, ~1,348 tokens.

Download SKILL.mdSave it as .claude/skills/write-e2e-tests/SKILL.md (or your agent's skills folder).
name
write-e2e-tests
description
Write E2E tests for BEEQ StencilJS components using @stencil/vitest in browser mode (Playwright/Chromium). Use for: adding or fixing E2E tests, covering props, events, slots, methods, keyboard interactions, accessibility attributes, and CSS custom properties for bq-* components. Files live at packages/beeq/src/components/<name>/__tests__/bq-<name>.e2e.tsx.
argument-hint
Component name (e.g. "bq-button") or path to the component tsx file
metadata.internal
true

Write BEEQ E2E Tests

When to Use

  • Adding E2E tests for a new or existing bq-* component
  • Fixing failing E2E tests after a component change
  • Increasing coverage for untested props, events, or interactions

Before You Start

  1. Read the full testing instructions
  2. Read the component's .tsx file to understand all @Prop(), @Event(), @Method(), and @Listen() members
  3. Check an existing well-tested file for patterns, e.g. packages/beeq/src/components/button/__tests__/bq-button.e2e.tsx

File Location & Extension

packages/beeq/src/components/<component-name>/__tests__/bq-<component-name>.e2e.tsx

The .e2e.tsx extension is required — JSX is needed even when no explicit JSX calls appear.

Imports

Use only what the test actually needs:

tsx
import { h } from '@stencil/core'; // always keep — required for JSX

// Core test utilities
import { afterEach, describe, expect, it, render, vi, waitForStable } from '@stencil/vitest';
import { userEvent } from 'vitest/browser'; // only for keyboard/mouse interactions

// BEEQ shared helpers
import { computedStyle } from '../../../shared/test-utils/computedStyle';  // CSS assertions
import { getTextContent } from '../../../shared/utils/slot';               // slot text assertions

or check what other utils are available in packages/beeq/src/shared/test-utils/ and packages/beeq/src/shared/utils/ and import as needed.

Required Baseline Tests

Every component file must start with:

tsx
describe('bq-<component>', () => {
  it('should render', async () => {
    const { root } = await render(<bq-component />);
    expect(root).not.toBeNull();
  });

  it('should have shadow root', async () => {
    const { root } = await render(<bq-component />);
    expect(root).toHaveShadowRoot(); // ✅ always toHaveShadowRoot(), never .shadowRoot !== null
  });

Coverage Checklist

Write at least one test for each category that applies to the component:

CategoryWhat to test
PropsEach @Prop() is reflected as an attribute (toEqualAttribute)
SlotsDefault and named slots render expected content (getTextContent)
EventsAction triggers the event; vi.fn() spy counts invocations
MethodsPublic @Method() produces expected side-effects
KeyboardTab, Enter, Space, Arrow keys trigger correct behavior (userEvent.keyboard)
StateInteractive state transitions: checked, disabled, expanded, loading
Accessibilityaria-* attributes present and correct
CSSCritical custom properties computed correctly (computedStyle)

Shadow DOM Helpers

Define typed accessors outside the describe block:

tsx
const getInput = (el: HTMLBqCheckboxElement) =>
  el.shadowRoot?.querySelector<HTMLInputElement>('[part="input"]');
const getBase = (el: HTMLBqCheckboxElement) =>
  el.shadowRoot?.querySelector<HTMLElement>('[part="base"]');

Element Casting

Always cast root before accessing typed properties or passing to typed helpers:

tsx
// ✅ correct
const bqButton = root as HTMLBqButtonElement;
const btn = getButtonElement(bqButton);

// ❌ wrong — root is HTMLElement, not the concrete type
const btn = getButtonElement(root);

Cast querySelector results with a generic parameter:

tsx
// ✅ correct
const input = bqToggle.shadowRoot?.querySelector<HTMLInputElement>('input');

// ❌ wrong — returns Element, not HTMLInputElement
const input = bqToggle.shadowRoot?.querySelector('input') as HTMLInputElement;

Updating Props

Prefer setProps for re-rendering; fall back to direct property + waitForChanges:

tsx
// ✅ preferred
const { root, setProps } = await render(<bq-drawer />);
await setProps({ open: true });

// ✅ also correct
const { root, waitForChanges } = await render(<bq-drawer />);
(root as HTMLBqDrawerElement).open = true;
await waitForChanges();

Async Stability

tsx
// After async operations (icon load, animation, slot change):
await waitForStable(root);

// After setting an attribute:
root.setAttribute('name', 'check');
await waitForChanges();
await waitForStable(root);

Attribute Assertions

GoalMatcher
Attribute presentexpect(el).toHaveAttribute('attr')
Attribute + valueexpect(el).toEqualAttribute('attr', value) — not toHaveAttribute with 2 args
Attribute absentexpect(el).not.toHaveAttribute('attr')
CSS class presentexpect(el).toHaveClass('class-name')

Mock Cleanup

Always restore mocks:

tsx
afterEach(() => {
  vi.restoreAllMocks();
});

Running the Tests

bash
# Run all unit tests
pnpm exec nx run beeq:e2e

# Run tests for a specific file
pnpm exec nx run beeq:e2e -- bq-<component>.e2e.tsx

# Watch mode
pnpm exec nx run beeq:e2e -- bq-<component>.e2e.tsx --watch

© Endava, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/write-e2e-tests of Endava/BEEQ.

Open the folder on GitHubat commit 5f4728d

Compare with similar skills

Write E2E Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Write E2E Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Write E2E Tests this skillEndava/BEEQ163—~1.3kAutomated safety check: PassApache-2.0
React Testingaffaan-m/ECC274k1 repos~3.3kAutomated safety check: PassMIT
Svelte Testingspences10/sveltest113—~579Automated safety check: PassMIT
Playwright Testingchongdashu/vibejam-starter-pack149—~2.1kAutomated safety check: PassNone
Ha Frontend Testinghome-assistant/frontend5.7k—~1.7kAutomated safety check: PassApache-2.0
Playwright Testingchongdashu/vibejam-starter-pack149—~2.2kAutomated safety check: PassNone

Similar skills

  • React Testing

    affaan-m/ECC

    React component testing with React Testing Library, Vitest/Jest, MSW for network mocking, accessibility assertions with axe, and the decision boundary between component tests and Playwright/Cypress…

    274k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Svelte Testing

    spences10/sveltest

    Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.

    113 GitHub stars~579 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Ha Frontend Testing

    home-assistant/frontend

    Home Assistant frontend testing and validation workflow. An agent skill from home-assistant/frontend.

    5.7k GitHub stars~1.7k tokensUpdated today
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.2k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Frontend Playwright E2E

    ansible/ansible-ui

    Write, run, and debug Playwright E2E / integration / live tests.

    113 GitHub stars~2.5k tokensUpdated yesterday
    Testing & QAAuto-check: notes

More from Endava/BEEQ

All 9 skills in this repo
  • Beeq

    Endava/BEEQ

    Builds, styles, and reviews UI with BEEQ, Endava's web-component design system.

    163 GitHub stars~5.6k tokensUpdated yesterday
    Auto-check passed
  • Create Component

    Endava/BEEQ

    Create a new BEEQ StencilJS web component. An agent skill from Endava/BEEQ.

    163 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Audit and fix WCAG 2.1 Level AA accessibility issues in BEEQ StencilJS components.

    163 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Review Component

    Endava/BEEQ

    Review a BEEQ StencilJS component against design system guidelines and project standards.

    163 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Write Stories

    Endava/BEEQ

    Write Storybook stories and MDX docs for BEEQ web components.

    163 GitHub stars~968 tokensUpdated yesterday
    Auto-check passed
  • Write Unit Tests

    Endava/BEEQ

    Write Vitest unit tests for BEEQ shared utilities. An agent skill from Endava/BEEQ.

    163 GitHub stars~795 tokensUpdated yesterday
    Auto-check passed

Questions about Write E2E Tests

What does Write E2E Tests do?

Write E2E tests for BEEQ StencilJS components using @stencil/vitest in browser mode (Playwright/Chromium). Write E2E Tests is an agent skill from Endava/BEEQ. Write E2E tests for BEEQ StencilJS components using @stencil/vitest in browser mode (Playwright/Chromium).

When should I use Write E2E Tests?

Write E2E Tests fits situations like: fixing E2E tests; keyboard interactions; accessibility attributes; CSS custom properties for bq- components.

How do I install Write E2E Tests in Claude Code?

Run `npx skills add Endava/BEEQ --skill write-e2e-tests -a claude-code`. Or copy the skill folder (.agents/skills/write-e2e-tests in Endava/BEEQ) into .claude/skills/write-e2e-tests in your project. Claude Code loads it when a task matches its description.

How do I install Write E2E Tests in Codex?

Run `npx skills add Endava/BEEQ --skill write-e2e-tests -a codex`. Or copy the skill folder (.agents/skills/write-e2e-tests in Endava/BEEQ) into .agents/skills/write-e2e-tests in your project. Codex loads it when a task matches its description.

Can I use Write E2E Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Endava/BEEQ --skill write-e2e-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/write-e2e-tests, .gemini/skills/write-e2e-tests, .github/skills/write-e2e-tests and .opencode/skills/write-e2e-tests in your project.

What does Write E2E Tests need to run?

Going by SKILL.md and its folder, Write E2E Tests needs the command-line tools its instructions call (pnpm).

Does Write E2E Tests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Write E2E Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Write E2E Tests use?

Write E2E Tests is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Write E2E Tests use?

About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Write E2E Tests?

Skills that share tags, products or a category with Write E2E Tests: React Testing (affaan-m/ECC, 274k stars), Svelte Testing (spences10/sveltest, 113 stars), Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars) and Ha Frontend Testing (home-assistant/frontend, 5.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Write E2E Tests?

Endava (a GitHub organization) maintains it in Endava/BEEQ, which has 163 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 6, 2026.

Source: Endava/BEEQ on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.