Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playwright #1153

Merged
merged 38 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6c6f66e
Initialise playwright
microbit-grace Mar 13, 2024
e4a67b0
Downgrade to @playwright/test v1.30.0
microbit-grace Mar 13, 2024
3b1e7f4
Configure Playwright
microbit-grace Mar 13, 2024
dadd592
Upgrade playwright/test to v1.32.0
microbit-grace Mar 13, 2024
0f212a5
Add settings.spec.ts
microbit-grace Mar 13, 2024
be55bc4
Add reset.spec.ts
microbit-grace Mar 13, 2024
09f20ab
Add more test files WIP
microbit-grace Mar 14, 2024
cdd14bf
Add rest of playwright tests
microbit-grace Mar 15, 2024
c7a9bc0
Add accessibility.spec.ts
microbit-grace Mar 15, 2024
3c61a54
Rename *.spec.ts -> *.test.ts
microbit-grace Mar 15, 2024
83f8bf6
Remove playwright test match for *.spec.ts
microbit-grace Mar 15, 2024
bf32765
Update README.md
microbit-grace Mar 15, 2024
db74dbc
Add navigation to app into fixture
microbit-grace Mar 15, 2024
9a58c4e
Update package-lock.json
microbit-grace Mar 15, 2024
abc1a3e
Remove test examples from playwright init
microbit-grace Mar 15, 2024
9d15e4d
Refactoring (renaming and tidying) WIP
microbit-grace Mar 15, 2024
a6c75dd
Update package-lock.json
microbit-grace Mar 18, 2024
627a0e0
Replace app.ts with app-playwright.ts
microbit-grace Mar 18, 2024
499e1b2
Use `npm run serve` to serve editor
microbit-grace Mar 18, 2024
cadbe54
Configure webServer for CI
microbit-grace Mar 18, 2024
373dd28
Upgrade playwright to 1.33
microbit-grace Mar 19, 2024
32519c5
Refactoring
microbit-grace Mar 19, 2024
1cb5d93
Make playwright versions the same in package.json
microbit-grace Mar 19, 2024
d560992
Update build.yml
microbit-grace Mar 19, 2024
b86d830
Fix build.yml
microbit-grace Mar 19, 2024
731fe3e
Rerun CI
microbit-grace Mar 19, 2024
6a98602
Upgrade to playwright@latest
microbit-grace Mar 19, 2024
918d530
Upgrade to v1.42.1-jammy
microbit-grace Mar 19, 2024
be59f1d
Tweak tests to be less flaky
microbit-grace Mar 19, 2024
89c6abb
Add timeout minutes to build time
microbit-grace Mar 19, 2024
c580a85
Remove puppeteer and pptr-testing-library
microbit-grace Mar 19, 2024
179e918
Rename last `findXXX` to `expectXXX`
microbit-grace Mar 19, 2024
8c5684f
Use playwright instead of vitest for E2E
microbit-grace Mar 19, 2024
d6ea1ee
Remove playwright from package.json
microbit-grace Mar 19, 2024
55117e1
Refactor getSimulatorIframe
microbit-grace Mar 19, 2024
2339e62
Refactor typeInEditor
microbit-grace Mar 19, 2024
8962bb4
Tweak typeInEditor comment
microbit-grace Mar 19, 2024
4a7c055
Add playwright to dev
microbit-grace Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ concurrency:

jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -51,14 +52,18 @@ jobs:
if: env.STAGE == 'REVIEW' || env.STAGE == 'STAGING'
- run: curl --insecure -4 --retry 7 --retry-connrefused http://localhost:3000 1>/dev/null
if: env.STAGE == 'REVIEW' || env.STAGE == 'STAGING'
- run: npm run test:e2e:headless
- name: Run Playwright tests
if: env.STAGE == 'REVIEW' || env.STAGE == 'STAGING'
uses: docker://mcr.microsoft.com/playwright:v1.42.1-jammy
with:
args: npx playwright test
- name: Store reports
if: (env.STAGE == 'REVIEW' || env.STAGE == 'STAGING') && failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reports
path: reports/
retention-days: 3
- run: npm run deploy
if: github.repository_owner == 'microbit-foundation' && (env.STAGE == 'REVIEW' || success())
env:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ __pycache__
*.pyc
/reports/*
/crowdin/*
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ These are excluded from the normal test run.

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

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

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

Expand Down
Loading
Loading