[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71W4E1RRQDZJ5MPHNPACF6G":3,"skill-same:01M71W4E1RRQDZJ5MPHNPACF6G":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M71W4E1RRQDZJ5MPHNPACF6G","test-implementation",null,"Implements runnable, verified `.spec.ts` files for specific Playwright test scenarios from the app-exploration inventory.","itlackey\u002Fakm-eval","itlackey","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6414031?v=4","01M6D08NHES2CPRGY5HCPJECD6","IT Lackey","01M71W0ZJQ3686SNJSCQZM3X4E",0,"MPL-2.0","https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval\u002Fblob\u002Fmain\u002Fcorpus\u002Flibrary\u002Fskills\u002Fe2e-testing\u002Ftest-implementation\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"test","test implementation","implementation","test scenarios","testing","test scenario","scenarios","2026","when","for","implementing","verified","inventory","app","scenario","e2e-testing","exploration","files","e2e","use","2026-11-10 13:02:02",false,"---\ndescription: Implements runnable, verified `.spec.ts` files for specific\n  Playwright test scenarios from the app-exploration inventory.\nwhen_to_use: Use when implementing a specific Playwright test scenario from the\n  inventory produced by `skills\u002Fe2e-testing\u002Fapp-exploration`.\nupdated: 2026-06-18\n---\n\n# Playwright Test Implementation\n\n## When to use this skill\nUse this skill when implementing a specific Playwright test scenario from the inventory produced by `skills\u002Fe2e-testing\u002Fapp-exploration`. Each invocation targets one scenario spec and produces a runnable, verified `.spec.ts` file.\n\nDo NOT use this skill to discover test scenarios — use `skills\u002Fe2e-testing\u002Fapp-exploration` first to generate the inventory JSON, then invoke this skill once per scenario.\n\n---\n\n## Prerequisites\n\nBefore beginning, confirm all of the following:\n\n- `playwright.config.ts` exists in the project root\n- A scenario spec object (from the inventory JSON) has been provided — it must include `route`, `scenarioType`, `steps`, and `assertions`\n- The app is running locally OR `playwright.config.ts` includes a `webServer` config block that starts it\n- You have read `knowledge\u002Fplaywright\u002Fbest-practices` — follow every pattern there; this skill references it but does not repeat it\n\n---\n\n## Step 1: Set Up Auth (if needed)\n\n### Check for existing auth setup\n\n```bash\nfind . -name \"auth.setup.ts\" -not -path \"*\u002Fnode_modules\u002F*\"\n```\n\nIf found, skip to Step 2. If not found, and the scenario requires authentication, create it now.\n\n### Create auth.setup.ts\n\nLocation: `tests\u002Fauth.setup.ts`\n\n```typescript\nimport { test as setup, expect } from '@playwright\u002Ftest';\nimport path from 'path';\n\nconst authFile = path.join(__dirname, '..\u002F.playwright\u002Fauth\u002Fuser.json');\n\nsetup('authenticate', async ({ page }) => {\n  await page.goto('\u002Flogin');\n  await page.getByLabel('Email').fill(process.env.TEST_USER_EMAIL!);\n  await page.getByLabel('Password').fill(process.env.TEST_USER_PASSWORD!);\n  await page.getByRole('button', { name: 'Sign in' }).click();\n  await expect(page).toHaveURL('\u002Fdashboard');\n  await page.context().storageState({ path: authFile });\n});\n```\n\nReplace selectors with those discovered during app exploration. Never hardcode credentials — use `process.env`.\n\n### Update playwright.config.ts\n\nAdd the setup project and wire it as a dependency for authenticated tests:\n\n```typescript\nprojects: [\n  {\n    name: 'setup',\n    testMatch: \u002Fauth\\.setup\\.ts\u002F,\n  },\n  {\n    name: 'chromium',\n    use: {\n      ...devices['Desktop Chrome'],\n      storageState: '.playwright\u002Fauth\u002Fuser.json',\n    },\n    dependencies: ['setup'],\n  },\n],\n```\n\nAdd `.playwright\u002F` to `.gitignore` — it holds session state, not source.\n\n---\n\n## Step 2: Create or Extend a Page Object Model (POM)\n\n### Decision tree\n\n| Condition | Action |\n|---|---|\n| A POM already exists for this route | Extend it — add missing locators and actions |\n| 3 or more tests will use this page | Create a new POM class |\n| Single-use interaction | Inline locators in the test — still use semantic selectors |\n\n### POM location convention\n\n`tests\u002Fpages\u002F\u003CRouteSlug>Page.ts`\n\nExamples: `DashboardPage.ts`, `CheckoutPage.ts`, `ArticleDetailPage.ts`\n\n### POM template\n\n```typescript\nimport { type Page, type Locator } from '@playwright\u002Ftest';\n\nexport class CheckoutPage {\n  readonly page: Page;\n  readonly heading: Locator;\n  readonly totalAmount: Locator;\n  readonly placeOrderButton: Locator;\n\n  constructor(page: Page) {\n    this.page = page;\n    this.heading = page.getByRole('heading', { name: 'Checkout' });\n    this.totalAmount = page.getByTestId('order-total');\n    this.placeOrderButton = page.getByRole('button', { name: 'Place order' });\n  }\n\n  async goto() {\n    await this.page.goto('\u002Fcheckout');\n    await this.heading.waitFor();\n  }\n\n  async placeOrder() {\n    await this.placeOrderButton.click();\n  }\n}\n```\n\n### Selector priority (highest to lowest)\n\n1. `getByRole` — most resilient, accessibility-aligned\n2. `getByLabel` — for form fields\n3. `getByText` — for unique visible text\n4. `getByTestId` — for elements without semantic role (add `data-testid` to the app when needed)\n5. CSS selectors — only as a last resort; never use positional or dynamic class selectors\n\n---\n\n## Step 3: Write the Test File\n\n### Naming convention\n\n```\ntests\u002F\u003Croute-slug>.\u003Cscenario-type>.spec.ts\n```\n\nExamples:\n- `tests\u002Fcheckout.happy-path.spec.ts`\n- `tests\u002Flogin.error-states.spec.ts`\n- `tests\u002Farticle-detail.accessibility.spec.ts`\n\n### File structure\n\n```typescript\nimport { test, expect } from '@playwright\u002Ftest';\nimport { CheckoutPage } from '.\u002Fpages\u002FCheckoutPage';\n\ntest.describe('Checkout — happy path', () => {\n  let checkoutPage: CheckoutPage;\n\n  test.beforeEach(async ({ page }) => {\n    checkoutPage = new CheckoutPage(page);\n    await checkoutPage.goto();\n  });\n\n  test('shows order total before submission', async ({ page }) => {\n    await expect(checkoutPage.totalAmount).toBeVisible();\n    await expect(checkoutPage.totalAmount).not.toBeEmpty();\n  });\n\n  test('places order successfully', async ({ page }) => {\n    await checkoutPage.placeOrder();\n    await expect(page).toHaveURL(\u002F\\\u002Forder-confirmation\u002F);\n    await expect(page.getByRole('heading', { name: \u002Forder confirmed\u002Fi })).toBeVisible();\n  });\n});\n```\n\n### Mocking with page.route() for error scenarios\n\nUse `page.route()` to intercept network calls and simulate API errors. Always place route handlers before the action that triggers the request.\n\n```typescript\ntest('shows error banner when API is unavailable', async ({ page }) => {\n  await page.route('**\u002Fapi\u002Forders', (route) =>\n    route.fulfill({ status: 503, body: JSON.stringify({ error: 'Service unavailable' }) })\n  );\n\n  await checkoutPage.placeOrder();\n\n  await expect(page.getByRole('alert')).toBeVisible();\n  await expect(page.getByRole('alert')).toContainText(\u002Ftry again\u002Fi);\n});\n```\n\n### Web-first assertion patterns\n\nAlways use Playwright's built-in async assertions — they auto-retry until the condition is met or the timeout expires. Never use `expect(await element.textContent()).toBe(...)`.\n\n```typescript\n\u002F\u002F Correct — web-first\nawait expect(page.getByRole('status')).toHaveText('Saved');\n\n\u002F\u002F Wrong — point-in-time snapshot, not retried\nexpect(await page.getByRole('status').textContent()).toBe('Saved');\n```\n\n### Auth fixture usage\n\nTests in the `chromium` project automatically receive the stored auth state from `auth.setup.ts`. For tests that must run unauthenticated, override at the test level:\n\n```typescript\ntest.use({ storageState: { cookies: [], origins: [] } });\n\ntest('redirects unauthenticated users to login', async ({ page }) => {\n  await page.goto('\u002Fdashboard');\n  await expect(page).toHaveURL('\u002Flogin');\n});\n```\n\n### Responsive test with page.setViewportSize()\n\n```typescript\ntest('mobile nav collapses to hamburger menu', async ({ page }) => {\n  await page.setViewportSize({ width: 375, height: 812 });\n  await page.goto('\u002F');\n  await expect(page.getByRole('button', { name: 'Open menu' })).toBeVisible();\n  await expect(page.getByRole('navigation')).not.toBeVisible();\n});\n```\n\n### Accessibility assertion with @axe-core\u002Fplaywright\n\n```typescript\nimport AxeBuilder from '@axe-core\u002Fplaywright';\n\ntest('has no detectable accessibility violations', async ({ page }) => {\n  await page.goto('\u002Fcheckout');\n  const results = await new AxeBuilder({ page })\n    .withTags(['wcag2a', 'wcag2aa'])\n    .analyze();\n  expect(results.violations).toEqual([]);\n});\n```\n\nInstall if not present: `npm install -D @axe-core\u002Fplaywright`\n\n---\n\n## Step 4: Run and Verify\n\n### Run the new test file in isolation\n\n```bash\nnpx playwright test tests\u002F\u003Cyour-file>.spec.ts --project=chromium\n```\n\n### Capture trace on failure for debugging\n\n```bash\nnpx playwright test tests\u002F\u003Cyour-file>.spec.ts --trace on\nnpx playwright show-trace test-results\u002F\u003Crun-dir>\u002Ftrace.zip\n```\n\n### Run headed for live debugging\n\n```bash\nnpx playwright test tests\u002F\u003Cyour-file>.spec.ts --headed --project=chromium\n```\n\n### Open Playwright Inspector\n\n```bash\nnpx playwright test tests\u002F\u003Cyour-file>.spec.ts --debug\n```\n\nUse Inspector to step through actions, inspect locators, and verify selectors before committing them.\n\n### Verify no regressions in the suite\n\n```bash\nnpx playwright test --project=chromium\n```\n\nAll pre-existing tests must still pass before considering this task complete.\n\n---\n\n## Step 5: Self-Review Checklist\n\nRun through every item before marking the test as done.\n\n- [ ] All selectors use `getByRole`, `getByLabel`, `getByText`, or `getByTestId` — no raw CSS or XPath\n- [ ] All assertions are web-first (`await expect(...)`) — no `await element.textContent()` in assertions\n- [ ] No `waitForTimeout` or `page.waitForTimeout` anywhere in the file\n- [ ] Auth state is handled via fixture or explicit `test.use` override — no manual login steps in test body\n- [ ] Error scenarios use `page.route()` mocks — no dependency on a broken backend\n- [ ] `beforeEach` navigates to the page; individual tests assert behavior only\n- [ ] POM locators are defined once in the constructor — not repeated inline\n- [ ] Test file name follows `\u003Croute-slug>.\u003Cscenario-type>.spec.ts` convention\n- [ ] `.playwright\u002F` is in `.gitignore`\n- [ ] All tests in the file pass with `--project=chromium`\n- [ ] Full suite still passes — no regressions introduced\n\n---\n\n## Common Failure Patterns\n\n| Symptom | Root cause | Fix |\n|---|---|---|\n| Test timeout on element | Element never appeared in DOM | Check selector with Inspector; use `toBeVisible()` not `isVisible()` |\n| `storageState` auth rejected | Saved session expired | Delete `.playwright\u002Fauth\u002Fuser.json` and re-run `npx playwright test --project=setup` |\n| Flaky test (passes\u002Ffails randomly) | Race condition or timing assumption | Remove `waitForTimeout`; replace with a web-first assertion on the element that signals readiness |\n| Element not found | Selector matches nothing | Open headed mode or Inspector; verify selector against actual DOM structure |\n| `page.route` not intercepting | URL pattern mismatch | Log `request.url()` in a `page.on('request', ...)` handler to see the actual URL, then fix the glob |\n| Accessibility violations unexpected | New element added without ARIA role | Fix in the app (add `role`, `aria-label`, or semantic element); do not suppress axe violations in the test |\n| POM method throws on missing locator | Route changed; old locator stale | Update POM locator; run `npx playwright codegen \u003Curl>` to regenerate locators |\n| CI fails but local passes | Missing env vars or different base URL | Check `process.env.BASE_URL` and `process.env.TEST_USER_*` in CI environment config |\n\n---\n\n## References\n\n- `knowledge\u002Fplaywright\u002Fbest-practices` — canonical patterns for this project; this skill supplements, not replaces\n- `skills\u002Fe2e-testing\u002Fapp-exploration` — produces the scenario inventory consumed by this skill\n- Playwright docs: https:\u002F\u002Fplaywright.dev\u002Fdocs\u002Fwriting-tests\n- axe-core\u002Fplaywright: https:\u002F\u002Fgithub.com\u002Fdequelabs\u002Faxe-core-npm\u002Ftree\u002Fdevelop\u002Fpackages\u002Fplaywright\n","# Playwright Test Implementation\n\n## When to use this skill\nUse this skill when implementing a specific Playwright test scenario from the inventory produced by `skills\u002Fe2e-testing\u002Fapp-exploration`. Each invocation targets one scenario spec and produces a runnable, verified `.spec.ts` file.\n\nDo NOT use this skill to discover test scenarios — use `skills\u002Fe2e-testing\u002Fapp-exploration` first to generate the inventory JSON, then invoke this skill once per scenario.\n\n---\n\n## Prerequisites\n\nBefore beginning, confirm all of the following:\n\n- `playwright.config.ts` exists in the project root\n- A scenario spec object (from the inventory JSON) has been provided — it must include `route`, `scenarioType`, `steps`, and `assertions`\n- The app is running locally OR `playwright.config.ts` includes a `webServer` config block that starts it\n- You have read `knowledge\u002Fplaywright\u002Fbest-practices` — follow every pattern there; this skill references it but does not repeat it\n\n---\n\n## Step 1: Set Up Auth (if needed)\n\n### Check for existing auth setup\n\n```bash\nfind . -name \"auth.setup.ts\" -not -path \"*\u002Fnode_modules\u002F*\"\n```\n\nIf found, skip to Step 2. If not found, and the scenario requires authentication, create it now.\n\n### Create auth.setup.ts\n\nLocation: `tests\u002Fauth.setup.ts`\n\n```typescript\nimport { test as setup, expect } from '@playwright\u002Ftest';\nimport path from 'path';\n\nconst authFile = path.join(__dirname, '..\u002F.playwright\u002Fauth\u002Fuser.json');\n\nsetup('authenticate', async ({ page }) => {\n  await page.goto('\u002Flogin');\n  await page.getByLabel('Email').fill(process.env.TEST_USER_EMAIL!);\n  await page.getByLabel('Password').fill(process.env.TEST_USER_PASSWORD!);\n  await page.getByRole('button', { name: 'Sign in' }).click();\n  await expect(page).toHaveURL('\u002Fdashboard');\n  await page.context().storageState({ path: authFile });\n});\n```\n\nReplace selectors with those discovered during app exploration. Never hardcode credentials — use `process.env`.\n\n### Update playwright.config.ts\n\nAdd the setup project and wire it as a dependency for authenticated tests:\n\n```typescript\nprojects: [\n  {\n    name: 'setup',\n    testMatch: \u002Fauth\\.setup\\.ts\u002F,\n  },\n  {\n    name: 'chromium',\n    use: {\n      ...devices['Desktop Chrome'],\n      storageState: '.playwright\u002Fauth\u002Fuser.json',\n    },\n    dependencies: ['setup'],\n  },\n],\n```\n\nAdd `.playwright\u002F` to `.gitignore` — it holds session state, not source.\n\n---\n\n## Step 2: Create or Extend a Page Object Model (POM)\n\n### Decision tree\n\n| Condition | Action |\n|---|---|\n| A POM already exists for this route | Extend it — add missing locators and actions |\n| 3 or more tests will use this page | Create a new POM class |\n| Single-use interaction | Inline locators in the test — still use semantic selectors |\n\n### POM location convention\n\n`tests\u002Fpages\u002F\u003CRouteSlug>Page.ts`\n\nExamples: `DashboardPage.ts`, `CheckoutPage.ts`, `ArticleDetailPage.ts`\n\n### POM template\n\n```typescript\nimport { type Page, type Locator } from '@playwright\u002Ftest';\n\nexport class CheckoutPage {\n  readonly page: Page;\n  readonly heading: Locator;\n  readonly totalAmount: Locator;\n  readonly placeOrderButton: Locator;\n\n  constructor(page: Page) {\n    this.page = page;\n    this.heading = page.getByRole('heading', { name: 'Checkout' });\n    this.totalAmount = page.getByTestId('order-total');\n    this.placeOrderButton = page.getByRole('button', { name: 'Place order' });\n  }\n\n  async goto() {\n    await this.page.goto('\u002Fcheckout');\n    await this.heading.waitFor();\n  }\n\n  async placeOrder() {\n    await this.placeOrderButton.click();\n  }\n}\n```\n\n### Selector priority (highest to lowest)\n\n1. `getByRole` — most resilient, accessibility-aligned\n2. `getByLabel` — for form fields\n3. `getByText` — for unique visible text\n4. `getByTestId` — for elements without semantic role (add `data-testid` to the app when needed)\n5. CSS selectors — only as a last resort; never use positional or dynamic class selectors\n\n---\n\n## Step 3: Write the Test File\n\n### Naming convention\n\n```\ntests\u002F\u003Croute-slug>.\u003Cscenario-type>.spec.ts\n```\n\nExamples:\n- `tests\u002Fcheckout.happy-path.spec.ts`\n- `tests\u002Flogin.error-states.spec.ts`\n- `tests\u002Farticle-detail.accessibility.spec.ts`\n\n### File structure\n\n```typescript\nimport { test, expect } from '@playwright\u002Ftest';\nimport { CheckoutPage } from '.\u002Fpages\u002FCheckoutPage';\n\ntest.describe('Checkout — happy path', () => {\n  let checkoutPage: CheckoutPage;\n\n  test.beforeEach(async ({ page }) => {\n    checkoutPage = new CheckoutPage(page);\n    await checkoutPage.goto();\n  });\n\n  test('shows order total before submission', async ({ page }) => {\n    await expect(checkoutPage.totalAmount).toBeVisible();\n    await expect(checkoutPage.totalAmount).not.toBeEmpty();\n  });\n\n  test('places order successfully', async ({ page }) => {\n    await checkoutPage.placeOrder();\n    await expect(page).toHaveURL(\u002F\\\u002Forder-confirmation\u002F);\n    await expect(page.getByRole('heading', { name: \u002Forder confirmed\u002Fi })).toBeVisible();\n  });\n});\n```\n\n### Mocking with page.route() for error scenarios\n\nUse `page.route()` to intercept network calls and simulate API errors. Always place route handlers before the action that triggers the request.\n\n```typescript\ntest('shows error banner when API is unavailable', async ({ page }) => {\n  await page.route('**\u002Fapi\u002Forders', (route) =>\n    route.fulfill({ status: 503, body: JSON.stringify({ error: 'Service unavailable' }) })\n  );\n\n  await checkoutPage.placeOrder();\n\n  await expect(page.getByRole('alert')).toBeVisible();\n  await expect(page.getByRole('alert')).toContainText(\u002Ftry again\u002Fi);\n});\n```\n\n### Web-first assertion patterns\n\nAlways use Playwright's built-in async assertions — they auto-retry until the condition is met or the timeout expires. Never use `expect(await element.textContent()).toBe(...)`.\n\n```typescript\n\u002F\u002F Correct — web-first\nawait expect(page.getByRole('status')).toHaveText('Saved');\n\n\u002F\u002F Wrong — point-in-time snapshot, not retried\nexpect(await page.getByRole('status').textContent()).toBe('Saved');\n```\n\n### Auth fixture usage\n\nTests in the `chromium` project automatically receive the stored auth state from `auth.setup.ts`. For tests that must run unauthenticated, override at the test level:\n\n```typescript\ntest.use({ storageState: { cookies: [], origins: [] } });\n\ntest('redirects unauthenticated users to login', async ({ page }) => {\n  await page.goto('\u002Fdashboard');\n  await expect(page).toHaveURL('\u002Flogin');\n});\n```\n\n### Responsive test with page.setViewportSize()\n\n```typescript\ntest('mobile nav collapses to hamburger menu', async ({ page }) => {\n  await page.setViewportSize({ width: 375, height: 812 });\n  await page.goto('\u002F');\n  await expect(page.getByRole('button', { name: 'Open menu' })).toBeVisible();\n  await expect(page.getByRole('navigation')).not.toBeVisible();\n});\n```\n\n### Accessibility assertion with @axe-core\u002Fplaywright\n\n```typescript\nimport AxeBuilder from '@axe-core\u002Fplaywright';\n\ntest('has no detectable accessibility violations', async ({ page }) => {\n  await page.goto('\u002Fcheckout');\n  const results = await new AxeBuilder({ page })\n    .withTags(['wcag2a', 'wcag2aa'])\n    .analyze();\n  expect(results.violations).toEqual([]);\n});\n```\n\nInstall if not present: `npm install -D @axe-core\u002Fplaywright`\n\n---\n\n## Step 4: Run and Verify\n\n### Run the new test file in isolation\n\n```bash\nnpx playwright test tests\u002F\u003Cyour-file>.spec.ts --project=chromium\n```\n\n### Capture trace on failure for debugging\n\n```bash\nnpx playwright test tests\u002F\u003Cyour-file>.spec.ts --trace on\nnpx playwright show-trace test-results\u002F\u003Crun-dir>\u002Ftrace.zip\n```\n\n### Run headed for live debugging\n\n```bash\nnpx playwright test tests\u002F\u003Cyour-file>.spec.ts --headed --project=chromium\n```\n\n### Open Playwright Inspector\n\n```bash\nnpx playwright test tests\u002F\u003Cyour-file>.spec.ts --debug\n```\n\nUse Inspector to step through actions, inspect locators, and verify selectors before committing them.\n\n### Verify no regressions in the suite\n\n```bash\nnpx playwright test --project=chromium\n```\n\nAll pre-existing tests must still pass before considering this task complete.\n\n---\n\n## Step 5: Self-Review Checklist\n\nRun through every item before marking the test as done.\n\n- [ ] All selectors use `getByRole`, `getByLabel`, `getByText`, or `getByTestId` — no raw CSS or XPath\n- [ ] All assertions are web-first (`await expect(...)`) — no `await element.textContent()` in assertions\n- [ ] No `waitForTimeout` or `page.waitForTimeout` anywhere in the file\n- [ ] Auth state is handled via fixture or explicit `test.use` override — no manual login steps in test body\n- [ ] Error scenarios use `page.route()` mocks — no dependency on a broken backend\n- [ ] `beforeEach` navigates to the page; individual tests assert behavior only\n- [ ] POM locators are defined once in the constructor — not repeated inline\n- [ ] Test file name follows `\u003Croute-slug>.\u003Cscenario-type>.spec.ts` convention\n- [ ] `.playwright\u002F` is in `.gitignore`\n- [ ] All tests in the file pass with `--project=chromium`\n- [ ] Full suite still passes — no regressions introduced\n\n---\n\n## Common Failure Patterns\n\n| Symptom | Root cause | Fix |\n|---|---|---|\n| Test timeout on element | Element never appeared in DOM | Check selector with Inspector; use `toBeVisible()` not `isVisible()` |\n| `storageState` auth rejected | Saved session expired | Delete `.playwright\u002Fauth\u002Fuser.json` and re-run `npx playwright test --project=setup` |\n| Flaky test (passes\u002Ffails randomly) | Race condition or timing assumption | Remove `waitForTimeout`; replace with a web-first assertion on the element that signals readiness |\n| Element not found | Selector matches nothing | Open headed mode or Inspector; verify selector against actual DOM structure |\n| `page.route` not intercepting | URL pattern mismatch | Log `request.url()` in a `page.on('request', ...)` handler to see the actual URL, then fix the glob |\n| Accessibility violations unexpected | New element added without ARIA role | Fix in the app (add `role`, `aria-label`, or semantic element); do not suppress axe violations in the test |\n| POM method throws on missing locator | Route changed; old locator stale | Update POM locator; run `npx playwright codegen \u003Curl>` to regenerate locators |\n| CI fails but local passes | Missing env vars or different base URL | Check `process.env.BASE_URL` and `process.env.TEST_USER_*` in CI environment config |\n\n---\n\n## References\n\n- `knowledge\u002Fplaywright\u002Fbest-practices` — canonical patterns for this project; this skill supplements, not replaces\n- `skills\u002Fe2e-testing\u002Fapp-exploration` — produces the scenario inventory consumed by this skill\n- Playwright docs: https:\u002F\u002Fplaywright.dev\u002Fdocs\u002Fwriting-tests\n- axe-core\u002Fplaywright: https:\u002F\u002Fgithub.com\u002Fdequelabs\u002Faxe-core-npm\u002Ftree\u002Fdevelop\u002Fpackages\u002Fplaywright\n",{"updated":44,"description":7,"when_to_use":45},1781740800000,"Use when implementing a specific Playwright test scenario from the inventory produced by `skills\u002Fe2e-testing\u002Fapp-exploration`.","main","b293a8475fcbb20683373dc9735a2ecf0ca7889d","corpus\u002Flibrary\u002Fskills\u002Fe2e-testing\u002Ftest-implementation","https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval","https:\u002F\u002Fgithub.com\u002Fitlackey","2026-11-13 11:49:12",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add itlackey\u002Fakm-eval --skill test-implementation",{"tool":58,"command":59},"bunx","bunx skills add itlackey\u002Fakm-eval --skill test-implementation",{"tool":61,"command":62},"pnpm","pnpm dlx skills add itlackey\u002Fakm-eval --skill test-implementation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval\u002Fblob\u002Fmain\u002Fcorpus\u002Flibrary\u002Fskills\u002Fe2e-testing\u002Ftest-implementation\u002FSKILL.md",true,[],[67,75,82,89,96,103],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":74},"01M748G6310YQEN9SEY8E69V7F","tax-filing-checklist","Walk through the steps and documents needed to file an individual federal income tax return","https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval\u002Fblob\u002Fmain\u002Fevals\u002Fretrieval\u002Fassets\u002Fbooks\u002Flibrary\u002Fskills\u002Ftax-filing-checklist\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":74},"01M748G3C1CSMBM33KP2CCK7TB","patient-vitals-charting","Record patient vital signs consistently and flag values outside the normal reference range","https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval\u002Fblob\u002Fmain\u002Fevals\u002Fretrieval\u002Fassets\u002Fbooks\u002Flibrary\u002Fskills\u002Fpatient-vitals-charting\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":74},"01M748G05H68QFB8YVQKDHF66B","pasta-from-scratch","Make fresh egg pasta dough from scratch, roll it, and cut it into shapes","https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval\u002Fblob\u002Fmain\u002Fevals\u002Fretrieval\u002Fassets\u002Fbooks\u002Flibrary\u002Fskills\u002Fpasta-from-scratch\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":74},"01M748FXAQVJRX98HP8STRTD9P","knife-sharpening","Sharpen and hone kitchen knives to keep an edge safe and effective","https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval\u002Fblob\u002Fmain\u002Fevals\u002Fretrieval\u002Fassets\u002Fbooks\u002Flibrary\u002Fskills\u002Fknife-sharpening\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":74},"01M748FTJEZ0P6BXNERTHZ9KB3","first-aid-response","Respond to a first aid emergency using a scene-safety-first, ABC-based (airway, breathing, circulation) approach","https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval\u002Fblob\u002Fmain\u002Fevals\u002Fretrieval\u002Fassets\u002Fbooks\u002Flibrary\u002Fskills\u002Ffirst-aid-response\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":74},"01M748FQESZPA3ZW5SWKJNKMD0","contract-review-basics","Review a contract draft for missing terms, ambiguous language, and risky clauses before signing","https:\u002F\u002Fgithub.com\u002Fitlackey\u002Fakm-eval\u002Fblob\u002Fmain\u002Fevals\u002Fretrieval\u002Fassets\u002Fbooks\u002Flibrary\u002Fskills\u002Fcontract-review-basics\u002FSKILL.md",[],[]]