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

chore: refactor e2e tests to playwright #5080

Open
wants to merge 166 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 143 commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
69e21f1
chore: setup playwright
mahdikhashan Mar 1, 2024
9a1b7e7
chore: disable parallel test running
mahdikhashan Mar 1, 2024
e690789
feat: remove example test from playwright setup step
mahdikhashan Mar 1, 2024
f371ae6
test: refactor test/e2e/states.test.js
mahdikhashan Mar 1, 2024
512e9ef
chore: setup playwright
mahdikhashan Mar 1, 2024
c451168
chore: rebase on master
mahdikhashan Jun 15, 2024
aa8ebcc
chore: add playwright after it was removed by merge conflicts
mahdikhashan May 12, 2024
764d300
chore: rebase on master
mahdikhashan Jun 15, 2024
b508045
test: remove old snapshots
mahdikhashan May 12, 2024
3882b7b
fix: move `playwright` requires after `webpack` to fix eslint warning
mahdikhashan May 12, 2024
a7adbfa
test: snapshots for `stats.test.js`
mahdikhashan May 12, 2024
124d006
test: move `progress.test.js` to playwright
mahdikhashan Jun 1, 2024
17d8da7
test: move `allowed-hosts.test.js` to playwright
mahdikhashan Jun 7, 2024
8b6536d
test: move `app.test.js` to playwright
mahdikhashan Jun 8, 2024
d753fb5
test: move `client.test.js` to playwright
mahdikhashan Jun 8, 2024
b2e867f
test: rename `client.test.js` to `client-refactored.test.js`
mahdikhashan Jun 8, 2024
c76af2d
test: move `client-reconnect.test.js` to Playwright
mahdikhashan Jun 8, 2024
35b555e
test: move `entry.test.js` to Playwright
mahdikhashan Jun 9, 2024
9957ee3
test: move `headers.test.js` to Playwright
mahdikhashan Jun 9, 2024
46d2120
test: move `history-api-fallback.test.js` to Playwright
mahdikhashan Jun 9, 2024
a163664
test: move `hot-and-live-reload.test.js` to Playwright
mahdikhashan Jun 9, 2024
9b11e01
test: move `ipc.test.js` to Playwright
mahdikhashan Jun 9, 2024
6ae0b39
test: move `web-socker-server.test.js` to Playwright
mahdikhashan Jun 9, 2024
7f54b1e
test: move `target.test.js` to Playwright
mahdikhashan Jun 9, 2024
72905b7
test: move `range-header.test.js` to Playwright
mahdikhashan Jun 9, 2024
fb4534c
test: move `range-header.test.js` to Playwright
mahdikhashan Jun 11, 2024
69fbd95
test: move `range-header.test.js` to Playwright
mahdikhashan Jun 11, 2024
a9f7e90
test: move `module-federation.test.js` to Playwright
mahdikhashan Jun 11, 2024
c5804d1
test: move `lazy-compilation.test.js` to Playwright
mahdikhashan Jun 11, 2024
44730ee
test: move `logging.test.js` to Playwright
mahdikhashan Jun 12, 2024
ed26d7a
test: move `multi-compiler.test.js` to Playwright
mahdikhashan Jun 12, 2024
e2b6f79
test: move `watch-files.test.js` to Playwright
mahdikhashan Jun 13, 2024
ed33c1d
test: move `watch-files.test.js` to Playwright
mahdikhashan Jun 13, 2024
01975fd
test: move `server-and-client-transport.test.js` to Playwright
mahdikhashan Jun 14, 2024
c35a665
test: move `server.test.js` to Playwright
mahdikhashan Jun 14, 2024
6e32b09
test: move `setup-exit-signals.test.js` to Playwright
mahdikhashan Jun 14, 2024
0f6d526
chore: add `jest-mock`
mahdikhashan Jun 15, 2024
c6866ce
test: failing tests
mahdikhashan Jun 15, 2024
4a434cf
chore: remove extra config
mahdikhashan Jun 15, 2024
b24cac0
chore: update playwright config
mahdikhashan Jul 2, 2024
391243b
fix: lint error
mahdikhashan Jul 2, 2024
ba581f1
fix: lint error
mahdikhashan Jul 2, 2024
f2b5215
fix: lint error
mahdikhashan Jul 2, 2024
b004d29
fix: revert fixture
mahdikhashan Jul 2, 2024
ac7e66f
feat: remove e2e for puppeteer path
mahdikhashan Jul 2, 2024
efed0ab
chore: rename playwright tests path to `e2e`
mahdikhashan Jul 2, 2024
194efc8
feat: move tests from `e2e-playwright` to `e2e`
mahdikhashan Jul 2, 2024
2422c38
feat: move tests from `e2e-playwright` to `e2e`
mahdikhashan Jul 2, 2024
a1db5bb
chore: ignore tests flagged with `*.ignore.*`
mahdikhashan Jul 2, 2024
8b5a432
chore: ignore spell checking for snapshots
mahdikhashan Jul 2, 2024
770dfcf
chore: ignore e2e tests flagged with `.ignore.`
mahdikhashan Jul 2, 2024
b712f5d
chore: update playwright tests command to be `test:e2e` instead of `t…
mahdikhashan Jul 2, 2024
ca440a7
ci: update github action pipeline by adding playwright tests
mahdikhashan Jul 2, 2024
0198183
chore: add `commitlint` to cspell.json words
mahdikhashan Jul 2, 2024
451c63e
Merge branch 'master' into issue-2843/refactor-e2e-tests-from-puppete…
mahdikhashan Jul 2, 2024
fa2f080
fix: prettify `hot-and-live-reload.test.js` file
mahdikhashan Jul 2, 2024
fc79cef
fix: prettify multiple tests
mahdikhashan Jul 2, 2024
be142a2
chore: ignore e2e tests in jest tests coverage run
mahdikhashan Jul 2, 2024
94c0398
ci: remove sharing option for playwright
mahdikhashan Jul 3, 2024
ad847ec
ci: ignore snapshots
mahdikhashan Jul 3, 2024
2b9a487
ci: add caching for snapshots
mahdikhashan Jul 3, 2024
222d64c
ci: remove ignore snapshots
mahdikhashan Jul 3, 2024
ad6e3e0
ci: prevent failing fast for all jobs if any fails
mahdikhashan Jul 3, 2024
a19f9a8
feat: add playwright test method
mahdikhashan Jul 19, 2024
f710750
feat: add custom matcher for playwright
mahdikhashan Jul 19, 2024
5cd5658
feat: update playwright config
mahdikhashan Jul 19, 2024
1b662b8
feat: replace jest with sinon
mahdikhashan Jul 19, 2024
5542e00
feat: update packages
mahdikhashan Jul 19, 2024
d2de702
feat: regenerate snapshots
mahdikhashan Jul 19, 2024
2194b0e
Merge branch 'master' into issue-2843/refactor-e2e-tests-from-puppete…
mahdikhashan Jul 22, 2024
297028b
ci: remove update-snapshot step
mahdikhashan Jul 22, 2024
6fa543c
chore: add jsdoc types to playwright config
mahdikhashan Jul 22, 2024
3a9d14b
chore: add `isCI` to the config
mahdikhashan Jul 22, 2024
c3a2f7c
chore: add `MAX_RETRIES` to config file
mahdikhashan Jul 22, 2024
ae857cd
chore: move snapshots to `snpas` folder
mahdikhashan Jul 22, 2024
42aad22
chore: move snapshots to `snpas` folder
mahdikhashan Jul 22, 2024
73db1e0
feat: add `rgba` word
mahdikhashan Jul 22, 2024
ea20ee7
feat: update labels, add a flaky and a mistake in snapshot
mahdikhashan Jul 24, 2024
dacc639
feat: remove eslint comment and update labels
mahdikhashan Jul 24, 2024
c87f84f
chore: fix `net::ERR_HTTP2_PROTOCOL_ERROR` failure on ci
mahdikhashan Jul 24, 2024
73c7b04
fix: lint error
mahdikhashan Jul 24, 2024
0aba203
feat: update labels for `host.test.js`
mahdikhashan Jul 24, 2024
c4233e1
feat: update labels for `overlay.test.js`
mahdikhashan Jul 24, 2024
bf11adb
feat: update labels for `options-middleware.test.js`
mahdikhashan Jul 24, 2024
76a469e
feat: remove redundant `beforeAll` in `web-socket-communication.test.js`
mahdikhashan Jul 24, 2024
b184afe
Merge branch 'master' into issue-2843/refactor-e2e-tests-from-puppete…
mahdikhashan Jul 25, 2024
3da63fe
fix: `api.test.js` test work duplicate in inner scope
mahdikhashan Jul 26, 2024
2296ca0
chore: rename snapshot path to look similar existing puppeteer one
mahdikhashan Jul 26, 2024
81cd13e
chore: pass custom extended name to snapshots generated by `toMatchSn…
mahdikhashan Jul 26, 2024
ec5fa86
Merge branch 'master' into issue-2843/refactor-e2e-tests-from-puppete…
mahdikhashan Jul 27, 2024
965ea9f
chore: check the argument of custom matcher to be an array
mahdikhashan Jul 27, 2024
f0a9f89
feat: add a custom test with `done` callback
mahdikhashan Jul 27, 2024
480b502
fix: `static-directory.test.js`
mahdikhashan Jul 27, 2024
f53c614
chore: add jsdoc and improve argument handling
mahdikhashan Jul 27, 2024
215fb24
feat: update `allowed-hosts.test.js` test suite using custom test object
mahdikhashan Jul 27, 2024
540c07b
ci: fix longpath error on windows
mahdikhashan Jul 27, 2024
77dd4ea
ci: add longpaths
mahdikhashan Jul 27, 2024
b1dd12c
feat: update `compress.test.js` and comment failing test-case
mahdikhashan Jul 27, 2024
0ecb064
feat: update `api.test.js`
mahdikhashan Jul 27, 2024
f1cb666
Merge branch 'master' into issue-2843/refactor-e2e-tests-from-puppete…
mahdikhashan Jul 28, 2024
375665a
Merge branch 'master' into issue-2843/refactor-e2e-tests-from-puppete…
mahdikhashan Jul 28, 2024
c3f7b16
feat: update `app.test.js`
mahdikhashan Jul 28, 2024
ab7cf84
feat: update `bonjour.test.js`
mahdikhashan Jul 28, 2024
ef8a227
feat: update `built-in-routes.test.js`
mahdikhashan Jul 28, 2024
954904b
feat: update `built-in-routes.test.js`
mahdikhashan Jul 28, 2024
92f6156
feat: update `client.test.js`
mahdikhashan Jul 28, 2024
c85de43
feat: update `client-reconnect.test.js`
mahdikhashan Jul 28, 2024
999a8bd
feat: update `entry.test.js`
mahdikhashan Jul 28, 2024
7c1bee7
feat: update `headers.test.js`
mahdikhashan Jul 28, 2024
5f0de61
feat: remove old snap folder
mahdikhashan Jul 30, 2024
12799c6
feat: update snapshot folder and refactor tests
mahdikhashan Jul 30, 2024
c120892
fix: duplicate title issue
mahdikhashan Jul 30, 2024
5e91dd7
fix: remove extra comment
mahdikhashan Jul 30, 2024
cf67985
fix: remove `204` from response status
mahdikhashan Jul 30, 2024
45ec116
chore: fix CI
snitin315 Jul 31, 2024
63670d9
chore: fix CI
snitin315 Jul 31, 2024
64bb8ea
chore: fix CI
snitin315 Jul 31, 2024
ee29b46
test: add host test snaps
snitin315 Jul 31, 2024
943e397
test: fix allowed-hosts test
snitin315 Jul 31, 2024
210ff8a
test: update api test
snitin315 Jul 31, 2024
fc53905
test: update lazy-compilation test
snitin315 Jul 31, 2024
bbb31a4
test: update snaps
snitin315 Jul 31, 2024
c5b9473
chore: udpate playwright config
snitin315 Jul 31, 2024
383bbc9
chore: fix tests on windows
snitin315 Jul 31, 2024
4b07fcc
fix: spelling lint job
mahdikhashan Jul 31, 2024
5142e7a
fix: lint job
mahdikhashan Jul 31, 2024
8a9c533
fix: ignore foo.js in overlay-config fixture
mahdikhashan Jul 31, 2024
1cd209d
fix: ignore foo.js in overlay-config fixture
mahdikhashan Jul 31, 2024
9bc2602
fix: lint job
mahdikhashan Jul 31, 2024
e17e676
fix: lint job
mahdikhashan Jul 31, 2024
f1f47a5
fix: lint job
mahdikhashan Jul 31, 2024
77b6523
chore: fix overlay tests
snitin315 Aug 2, 2024
c8815ad
chore: udpate configs
snitin315 Aug 2, 2024
3dfe585
chore: fix overlay tests
snitin315 Aug 3, 2024
a7b204c
chore: skip failing E2Es
snitin315 Aug 3, 2024
d7b92d8
fix: label overlay as slow test
mahdikhashan Aug 3, 2024
fee0ba7
fix: skip `should not show initially, then show on an error, then hid…
mahdikhashan Aug 3, 2024
ef3f14c
fix: `history-api-fallback.test.js` test
mahdikhashan Aug 3, 2024
a2632ae
chore: label `server.test.js` test
mahdikhashan Aug 3, 2024
176b747
chore: label `history-api-fallback.test.js` test
mahdikhashan Aug 3, 2024
24fc9f7
chore: remove annotations
snitin315 Aug 4, 2024
f4c7d08
chore: fix tests on windows
snitin315 Aug 4, 2024
6df1555
chore: fix tests on windows
snitin315 Aug 4, 2024
7a78abd
chore: fix tests on windows
snitin315 Aug 4, 2024
9e470b5
chore: fix tests on windows
snitin315 Aug 4, 2024
9998d51
chore: fix tests on windows
snitin315 Aug 4, 2024
ead0cf8
chore: fix tests on windows
snitin315 Aug 4, 2024
a6a9ceb
chore: add code coverage
mahdikhashan Aug 4, 2024
3f2f662
fix: apply prettier
mahdikhashan Aug 4, 2024
790a871
fix: code coverage
mahdikhashan Aug 4, 2024
6b347ef
chore: prepend nyc to e2e test command
mahdikhashan Aug 4, 2024
b101a6d
chore: update package.json
snitin315 Aug 5, 2024
547f7db
Merge branch 'master' into issue-2843/refactor-e2e-tests-from-puppete…
mahdikhashan Aug 9, 2024
3105fe8
fix: remove lock
mahdikhashan Aug 9, 2024
78e4048
fix: update lock
mahdikhashan Aug 9, 2024
5e2391c
feat: revert skipped test-case
mahdikhashan Aug 9, 2024
c42847a
fix: remove comment
mahdikhashan Aug 9, 2024
ecb160a
fix: remove comment
mahdikhashan Aug 9, 2024
c049129
fix: `static-directory.test.js` flaky test-case
mahdikhashan Aug 9, 2024
d83e240
fix: `static-directory.test.js` test
mahdikhashan Aug 9, 2024
ff50b55
chore: disable retries
mahdikhashan Aug 9, 2024
02bd9e0
chore: disable headless on ci
mahdikhashan Aug 9, 2024
e54f61e
chore: disable headless on ci
mahdikhashan Aug 9, 2024
80bf569
chore: add nyc_output to .gitignore
mahdikhashan Aug 19, 2024
5a37b5d
feat: merge master into branch
mahdikhashan Aug 19, 2024
1c0b48f
feat: update tests
mahdikhashan Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"swiftshader",
"hoge",
"subsubcomain",
"commitlint",
"noselect",
"rgba",
"longpaths",
"noselect",
"commitlint"
],
Expand All @@ -78,6 +82,7 @@
"package-lock.json",
"node_modules",
"coverage",
"*.log"
"*.log",
"*-snapshots"
]
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ node_modules
examples/**/main.js
examples/client/trusted-types-overlay/app.js
test/fixtures/reload-config/foo.js

# ignore tests files
**/*.ignore.*
17 changes: 11 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }} (${{ matrix.shard }})

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x, 20.x, 22.x]
Expand All @@ -80,6 +81,10 @@ jobs:
cancel-in-progress: true

steps:
- name: Support long paths
if: matrix.os == 'windows-latest'
run: git config --system core.longpaths true

- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -97,12 +102,6 @@ jobs:
node ./scripts/prepare-test-for-old-node.js
if: matrix.node-version == '18.x'

- name: Setup firefox
if: matrix.os != 'windows-latest'
uses: browser-actions/setup-firefox@latest
with:
firefox-version: latest

- name: Link webpack-dev-server
run: |
cp -R client tmp-client
Expand All @@ -119,6 +118,12 @@ jobs:
run: npm run test:coverage -- --ci --shard=${{ matrix.shard }}
if: matrix.node-version != '18.x'

- name: Install Playwright browsers and dependencies
run: npx playwright install --with-deps

- name: Run E2E tests for webpack version ${{ matrix.webpack-version }}
run: npm run test:e2e -- --shard=${{ matrix.shard }}

- name: Submit coverage data to codecov
uses: codecov/codecov-action@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ test/fixtures/watch-files-config/public/assets/non-exist.txt
test/fixtures/reload-config/main.css
test/fixtures/reload-config-2/main.css
!/test/fixtures/static-config/public/node_modules
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ module.exports = {
"<rootDir>/test/",
"<rootDir>/client/",
],
testPathIgnorePatterns: ["<rootDir>/bin/this/process-arguments.js"],
testPathIgnorePatterns: [
"<rootDir>/bin/this/process-arguments.js",
"<rootDir>/test/e2e",
],
snapshotResolver: "<rootDir>/test/helpers/snapshotResolver.js",
setupFilesAfterEnv: ["<rootDir>/scripts/setupTest.js"],
globalSetup: "<rootDir>/scripts/globalSetupTest.js",
Expand Down
Loading
Loading