skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
spencerpauly/awesome-cursor-skills418 installs

adding-e2e-tests

Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.

How do I install this agent skill?

npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill adding-e2e-tests
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides standard and safe instructions for setting up Playwright end-to-end testing in a project, utilizing official packages and well-known best practices.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

  • ZeroLeakspass

    Score: 93/100 · 2 sections analyzed

What does this agent skill do?

Add E2E Tests (Playwright)

Use this skill when the user asks to add end-to-end tests, browser tests, integration tests, or set up Playwright.

Steps

  1. Install Playwright

    npm init playwright@latest
    

    This creates playwright.config.ts, a tests/ directory, and installs browsers. If the project already has a test runner, install manually:

    npm install -D @playwright/test
    npx playwright install
    
  2. Configure playwright.config.ts

    • Set baseURL to the local dev server URL (e.g. http://localhost:3000).

    • Configure webServer to start the dev server automatically:

      webServer: {
        command: "npm run dev",
        url: "http://localhost:3000",
        reuseExistingServer: !process.env.CI,
      },
      
    • Enable only chromium for local dev speed; enable all browsers in CI.

  3. Create a smoke test — write a basic test that verifies the app loads:

    import { test, expect } from "@playwright/test";
    
    test("homepage loads", async ({ page }) => {
      await page.goto("/");
      await expect(page).toHaveTitle(/.+/);
    });
    
  4. Add page object pattern (optional) — for larger apps, create a tests/pages/ directory with page objects that encapsulate selectors and actions.

  5. Add npm scripts

    {
      "test:e2e": "playwright test",
      "test:e2e:ui": "playwright test --ui"
    }
    
  6. Add to .gitignore

    test-results/
    playwright-report/
    blob-report/
    
  7. CI integration — add a GitHub Actions step that runs npx playwright install --with-deps then npm run test:e2e. Use the official actions/upload-artifact to save the HTML report on failure.

Notes

  • Use data-testid attributes for selectors instead of CSS classes.
  • Use test.describe to group related tests.
  • Run npx playwright codegen to record tests interactively.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/spencerpauly/awesome-cursor-skills/adding-e2e-tests">View adding-e2e-tests on skillZs</a>