Skip to content

Commit 7f7deb4

Browse files
committed
Setup playwright ct
1 parent d73bfab commit 7f7deb4

File tree

8 files changed

+317
-104
lines changed

8 files changed

+317
-104
lines changed

.github/workflows/check.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ jobs:
1313
setup:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717

1818
- name: Setup Node
19-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: "lts/*"
2222
cache: "npm"
2323

2424
- run: npm ci
2525
- run: npm run tsc
2626
- run: npm run test
27+
28+
- run: npx playwright install chromium
29+
- run: npm run test-ct

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
lib
22
node_modules
3+
/test-results/
4+
/playwright-report/
5+
/blob-report/
6+
/playwright/.cache/

e2e/index.spec.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { test, expect } from "@playwright/experimental-ct-react";
2+
3+
test.use({ viewport: { width: 500, height: 1000 } });
4+
5+
test("should work", async ({ mount }) => {
6+
const component = await mount(<div>Learn React</div>);
7+
await expect(component).toContainText("Learn React");
8+
});

0 commit comments

Comments
 (0)