diff --git a/.github/workflows/validate-skill.yml b/.github/workflows/validate-skill.yml new file mode 100644 index 0000000..8d31b2c --- /dev/null +++ b/.github/workflows/validate-skill.yml @@ -0,0 +1,17 @@ +name: Validate AI Skill + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + agnix: + name: Agnix Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Validate agent configs + uses: agent-sh/agnix@12a1917d13e7c804bc91768c30dd4159f536c5c6 diff --git a/SKILL.md b/SKILL.md index 1e81582..4cf7e4b 100644 --- a/SKILL.md +++ b/SKILL.md @@ -1,6 +1,6 @@ --- -name: playwright-best-practices -description: Writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions, multi-tab/popup flows, mobile/responsive layouts, touch gestures, GraphQL, error handling, offline mode, multi-user collaboration, third-party services (payments, email verification), console error monitoring, global setup/teardown, test annotations (skip, fixme, slow), test tags (@smoke, @fast, @critical, filtering with --grep), project dependencies, security testing (XSS, CSRF, auth), performance budgets (Web Vitals, Lighthouse), iframes, component testing, canvas/WebGL, service workers/PWA, test coverage, i18n/localization, Electron apps, or browser extension testing. Covers E2E, component, API, visual, accessibility, security, Electron, and extension testing. +name: playwright-best-practices-skill +description: Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions, multi-tab/popup flows, mobile/responsive layouts, touch gestures, GraphQL, error handling, offline mode, multi-user collaboration, third-party services (payments, email verification), console error monitoring, global setup/teardown, test annotations (skip, fixme, slow), test tags (@smoke, @fast, @critical, filtering with --grep), project dependencies, security testing (XSS, CSRF, auth), performance budgets (Web Vitals, Lighthouse), iframes, component testing, canvas/WebGL, service workers/PWA, test coverage, i18n/localization, Electron apps, or browser extension testing. Covers E2E, component, API, visual, accessibility, security, Electron, and extension testing. license: MIT metadata: author: currents.dev diff --git a/testing-patterns/forms-validation.md b/testing-patterns/forms-validation.md index 9a473ea..2cfdd8c 100644 --- a/testing-patterns/forms-validation.md +++ b/testing-patterns/forms-validation.md @@ -150,7 +150,7 @@ test("complete a multi-step booking wizard", async ({ page }) => { await test.step("enter guest information", async () => { await expect( - page.getByRole("heading", { name: "Guest Info" }) + page.getByRole("heading", { name: "Guest Info" }), ).toBeVisible(); await page.getByLabel("Full name").fill("Alice Smith"); @@ -162,7 +162,7 @@ test("complete a multi-step booking wizard", async ({ page }) => { await test.step("select room options", async () => { await expect( - page.getByRole("heading", { name: "Room Selection" }) + page.getByRole("heading", { name: "Room Selection" }), ).toBeVisible(); await page.getByLabel("Room type").selectOption("suite"); @@ -174,7 +174,7 @@ test("complete a multi-step booking wizard", async ({ page }) => { await test.step("confirm booking", async () => { await expect( - page.getByRole("heading", { name: "Confirmation" }) + page.getByRole("heading", { name: "Confirmation" }), ).toBeVisible(); await expect(page.getByText("Alice Smith")).toBeVisible(); @@ -184,7 +184,7 @@ test("complete a multi-step booking wizard", async ({ page }) => { }); await expect( - page.getByRole("heading", { name: "Booking complete" }) + page.getByRole("heading", { name: "Booking complete" }), ).toBeVisible(); }); @@ -242,7 +242,7 @@ test("form submission shows server-side validation errors", async ({ await page.getByRole("button", { name: "Sign up" }).click(); await expect( - page.getByText("Email address already registered") + page.getByText("Email address already registered"), ).toBeVisible(); }); @@ -253,7 +253,9 @@ test("form shows loading state during submission", async ({ page }) => { await page.getByLabel("Email").fill("user@test.com"); await page.getByLabel("Details").fill("Found an issue"); - const submit = page.getByRole("button", { name: /Submit feedback|Submitting/ }); + const submit = page.getByRole("button", { + name: /Submit feedback|Submitting/, + }); await submit.click(); await expect(submit).toHaveText(/Submitting/); @@ -371,7 +373,7 @@ test("native HTML5 validation with required attribute", async ({ page }) => { const emailInput = page.getByLabel("Email"); const validationMessage = await emailInput.evaluate( - (el: HTMLInputElement) => el.validationMessage + (el: HTMLInputElement) => el.validationMessage, ); expect(validationMessage).toBeTruthy(); }); @@ -536,7 +538,7 @@ await page.getByLabel("Date").fill("2025-06-15"); await page.getByLabel("Date").dispatchEvent("change"); ``` -### `selectOption()` throws "not a `.