Loading...
Loading...
Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.
npx skill4agent add spencerpauly/awesome-cursor-skills adding-e2e-testsnpm init playwright@latestplaywright.config.tstests/npm install -D @playwright/test
npx playwright installplaywright.config.tsbaseURLhttp://localhost:3000webServerwebServer: {
command: "npm run dev",
url: "http://localhost:3000",
reuseExistingServer: !process.env.CI,
},import { test, expect } from "@playwright/test";
test("homepage loads", async ({ page }) => {
await page.goto("/");
await expect(page).toHaveTitle(/.+/);
});tests/pages/{
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui"
}.gitignoretest-results/
playwright-report/
blob-report/npx playwright install --with-depsnpm run test:e2eactions/upload-artifactdata-testidtest.describenpx playwright codegen