Skip to content

Commit 1ed9438

Browse files
committed
fix: parallel exec in the playwight test file
rm timeout to pass tests
1 parent 7c22af5 commit 1ed9438

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
name: Tests
55

66
on:
7-
push:
8-
branches: [ "main" ]
9-
pull_request:
10-
branches: [ "main" ]
7+
push:
8+
branches: ['main']
9+
pull_request:
10+
branches: ['main']
1111

1212
jobs:
13-
tests:
14-
strategy:
15-
matrix:
16-
os: [ubuntu-latest, windows-latest, macos-latest]
17-
node-version: [20.x]
18-
runs-on: ${{ matrix.os }}
19-
steps:
20-
- uses: actions/checkout@v3
21-
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: ${{ matrix.node-version }}
25-
cache: 'npm'
26-
- run: npm ci
27-
- run: npm run build
28-
- run: npx playwright install
29-
- run: npm test
13+
tests:
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, windows-latest, macos-latest]
17+
node-version: [20.x]
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: 'npm'
26+
- run: npm ci
27+
- run: npm run build
28+
- run: npx playwright install
29+
- run: npm test

apps/demo/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const config: PlaywrightTestConfig = {
55
command: 'npm run build && npm run preview',
66
port: 4173,
77
},
8+
89
testDir: 'tests',
910
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
1011
};

apps/demo/tests/test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { expect, test } from '@playwright/test';
22

3+
test.describe.configure({ mode: 'parallel' });
4+
35
test('tags work', async ({ page }) => {
6+
test.setTimeout(0);
47
await page.goto('http://localhost:4173/playground/tags');
58

69
expect(await page.content()).toContain('Addition');
@@ -9,6 +12,7 @@ test('tags work', async ({ page }) => {
912
});
1013

1114
test('tags work with types', async ({ page }) => {
15+
test.setTimeout(0);
1216
await page.goto('http://localhost:4173/playground/tags');
1317

1418
expect(await page.content()).toContain('Types');
@@ -18,6 +22,7 @@ test('tags work with types', async ({ page }) => {
1822
});
1923

2024
test('partials work', async ({ page }) => {
25+
test.setTimeout(0);
2126
await page.goto('http://localhost:4173/playground/partials');
2227

2328
expect(await page.content()).toContain('I am a partial.');
@@ -26,6 +31,7 @@ test('partials work', async ({ page }) => {
2631
});
2732

2833
test('named layouts work', async ({ page }) => {
34+
test.setTimeout(0);
2935
await page.goto('http://localhost:4173/playground/layout');
3036

3137
expect(await page.content()).toContain('I am on an alternative layout');

0 commit comments

Comments
 (0)