Skip to content

Commit

Permalink
add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Aug 1, 2024
1 parent 14501a4 commit eb93ba2
Show file tree
Hide file tree
Showing 5 changed files with 853 additions and 13 deletions.
12 changes: 1 addition & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,4 @@ node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
test-results/
16 changes: 16 additions & 0 deletions examples/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { test, expect } from "@playwright/test";

test("basic", async ({ page }) => {
await page.goto("/");

const button = page.locator("button");
const display = page.locator("h1");

await button.click();

await expect(await display.textContent()).toBe("1");

await button.click();

await expect(await display.textContent()).toBe("2");
});
Loading

0 comments on commit eb93ba2

Please sign in to comment.