Skip to content

Commit 4249e11

Browse files
Migrate to Playwright from Puppeteer (#1153)
1 parent 4425d16 commit 4249e11

21 files changed

+1001
-2272
lines changed

Diff for: .github/workflows/build.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ concurrency:
1313

1414
jobs:
1515
build:
16+
timeout-minutes: 15
1617
runs-on: ubuntu-latest
1718
permissions:
1819
contents: read
@@ -51,14 +52,18 @@ jobs:
5152
if: env.STAGE == 'REVIEW' || env.STAGE == 'STAGING'
5253
- run: curl --insecure -4 --retry 7 --retry-connrefused http://localhost:3000 1>/dev/null
5354
if: env.STAGE == 'REVIEW' || env.STAGE == 'STAGING'
54-
- run: npm run test:e2e:headless
55+
- name: Run Playwright tests
5556
if: env.STAGE == 'REVIEW' || env.STAGE == 'STAGING'
57+
uses: docker://mcr.microsoft.com/playwright:v1.42.1-jammy
58+
with:
59+
args: npx playwright test
5660
- name: Store reports
5761
if: (env.STAGE == 'REVIEW' || env.STAGE == 'STAGING') && failure()
58-
uses: actions/upload-artifact@v3
62+
uses: actions/upload-artifact@v4
5963
with:
6064
name: reports
6165
path: reports/
66+
retention-days: 3
6267
- run: npm run deploy
6368
if: github.repository_owner == 'microbit-foundation' && (env.STAGE == 'REVIEW' || success())
6469
env:

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ __pycache__
2626
*.pyc
2727
/reports/*
2828
/crowdin/*
29+
/test-results/
30+
/playwright-report/
31+
/blob-report/
32+
/playwright/.cache/

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ These are excluded from the normal test run.
5454

5555
The tests expect the app to already be running on http://localhost:3000, for example via `npm start`.
5656

57-
We use [Puppeteer](https://pptr.dev/) and the helpers provided by [Testing Library](https://testing-library.com/docs/pptr-testing-library/intro/).
57+
We use [Playwright](https://playwright.dev/).
5858

5959
The CI tests run these end-to-end tests against a production build.
6060

0 commit comments

Comments
 (0)