chore: refactor e2e tests to playwright #6470
Annotations
10 errors, 1 warning, and 1 notice
test/helpers/playwright-custom-expects.js#L13
1) [chromium] › allowed-hosts.test.js:1285:5 › allowed hosts › check host headers › should always allow value from the `host` options if options.allowedHosts is auto
Error: A snapshot doesn't exist at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/snaps/allowed-hosts.test.js/allowed-hosts-check-host-headers-should-always-44b90-host-options-if-options-allowedHosts-is-auto-1.txt, writing actual.
at ../helpers/playwright-custom-expects.js:13
11 | try {
12 | const serialized = JSON.stringify(received);
> 13 | await expect(serialized).toMatchSnapshot();
| ^
14 | pass = true;
15 | } catch (e) {
16 | matcherResult = e.matcherResult;
at Object.toMatchSnapshotWithArray (/Users/runner/work/webpack-dev-server/webpack-dev-server/test/helpers/playwright-custom-expects.js:13:32)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/allowed-hosts.test.js:1324:33
|
test/helpers/playwright-custom-expects.js#L13
1) [chromium] › allowed-hosts.test.js:1285:5 › allowed hosts › check host headers › should always allow value from the `host` options if options.allowedHosts is auto
Error: A snapshot doesn't exist at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/snaps/allowed-hosts.test.js/allowed-hosts-check-host-headers-should-always-55f3c-host-options-if-options-allowedHosts-is-auto-2.txt, writing actual.
at ../helpers/playwright-custom-expects.js:13
11 | try {
12 | const serialized = JSON.stringify(received);
> 13 | await expect(serialized).toMatchSnapshot();
| ^
14 | pass = true;
15 | } catch (e) {
16 | matcherResult = e.matcherResult;
at Object.toMatchSnapshotWithArray (/Users/runner/work/webpack-dev-server/webpack-dev-server/test/helpers/playwright-custom-expects.js:13:32)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/allowed-hosts.test.js:1327:59
|
test/helpers/playwright-custom-expects.js#L13
1) [chromium] › allowed-hosts.test.js:1285:5 › allowed hosts › check host headers › should always allow value from the `host` options if options.allowedHosts is auto
Error: A snapshot doesn't exist at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/snaps/allowed-hosts.test.js/allowed-hosts-check-host-headers-should-always-064e0-host-options-if-options-allowedHosts-is-auto-3.txt, writing actual.
at ../helpers/playwright-custom-expects.js:13
11 | try {
12 | const serialized = JSON.stringify(received);
> 13 | await expect(serialized).toMatchSnapshot();
| ^
14 | pass = true;
15 | } catch (e) {
16 | matcherResult = e.matcherResult;
at Object.toMatchSnapshotWithArray (/Users/runner/work/webpack-dev-server/webpack-dev-server/test/helpers/playwright-custom-expects.js:13:32)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/allowed-hosts.test.js:1329:26
|
test/e2e/compress.test.js#L162
2) [chromium] › compress.test.js:140:5 › compress option › as false › should handle GET request to bundle file
TypeError: Cannot read properties of undefined (reading 'actual')
160 | expect(
161 | response.headers()["content-encoding"])
> 162 | .toMatchSnapshotWithArray();
| ^
163 |
164 | expect(
165 | consoleMessages.map((message) => message.text()))
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/compress.test.js:162:8
|
test/e2e/compress.test.js#L162
2) [chromium] › compress.test.js:140:5 › compress option › as false › should handle GET request to bundle file
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
TypeError: Cannot read properties of undefined (reading 'actual')
160 | expect(
161 | response.headers()["content-encoding"])
> 162 | .toMatchSnapshotWithArray();
| ^
163 |
164 | expect(
165 | consoleMessages.map((message) => message.text()))
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/compress.test.js:162:8
|
test/e2e/compress.test.js#L1
2) [chromium] › compress.test.js:140:5 › compress option › as false › should handle GET request to bundle file
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: end of central directory record signature not found
|
test/e2e/compress.test.js#L162
2) [chromium] › compress.test.js:140:5 › compress option › as false › should handle GET request to bundle file
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
TypeError: Cannot read properties of undefined (reading 'actual')
160 | expect(
161 | response.headers()["content-encoding"])
> 162 | .toMatchSnapshotWithArray();
| ^
163 |
164 | expect(
165 | consoleMessages.map((message) => message.text()))
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/compress.test.js:162:8
|
test/e2e/compress.test.js#L162
2) [chromium] › compress.test.js:140:5 › compress option › as false › should handle GET request to bundle file
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
TypeError: Cannot read properties of undefined (reading 'actual')
160 | expect(
161 | response.headers()["content-encoding"])
> 162 | .toMatchSnapshotWithArray();
| ^
163 |
164 | expect(
165 | consoleMessages.map((message) => message.text()))
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/compress.test.js:162:8
|
<anonymous>#L9
3) [chromium] › api.test.js:41:5 › API › WEBPACK_SERVE environment variable › should be present ──
TypeError: The 'compilation' argument must be an instance of Compilation
at getCompilationHooks (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:168:10)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/javascript/ArrayPushCallbackChunkFormatPlugin.js:42:19
at Hook.eval (/Users/runner/work/webpack-dev-server/webpack-dev-server/<anonymous>:9:1)
at Hook.CALL_DELEGATE (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Compiler.js:1274:30)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Compiler.js:1319:29
at Hook.eval (/Users/runner/work/webpack-dev-server/webpack-dev-server/<anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Compiler.js:1314:28)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Watching.js:229:19
at Hook.eval (/Users/runner/work/webpack-dev-server/webpack-dev-server/<anonymous>:15:1)
at Hook.CALL_ASYNC_DELEGATE (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/tapable/lib/Hook.js:18:14)
at run (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Watching.js:173:33)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Watching.js:168:6
at Compiler.readRecords (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Compiler.js:1123:5)
at run (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Watching.js:164:26)
at Watching._go (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Watching.js:233:3)
at Watching._invalidate (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Watching.js:430:9)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/webpack/lib/Watching.js:70:28
|
test/e2e/api.test.js#L61
3) [chromium] › api.test.js:41:5 › API › WEBPACK_SERVE environment variable › should be present ──
Error: page.goto: net::ERR_CONNECTION_REFUSED at http://127.0.0.1:8158/
Call log:
- navigating to "http://127.0.0.1:8158/", waiting until "networkidle"
59 | expect(process.env.WEBPACK_SERVE).toBe("true");
60 |
> 61 | const response = await page.goto(`http://127.0.0.1:${port}/`, {
| ^
62 | waitUntil: "networkidle0",
63 | });
64 |
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/api.test.js:61:35
|
[chromium] › client-reconnect.test.js#L1
[chromium] › client-reconnect.test.js took 34.0s
|
2 failed
[chromium] › allowed-hosts.test.js:1285:5 › allowed hosts › check host headers › should always allow value from the `host` options if options.allowedHosts is auto
[chromium] › compress.test.js:140:5 › compress option › as false › should handle GET request to bundle file
5 flaky
[chromium] › api.test.js:41:5 › API › WEBPACK_SERVE environment variable › should be present ───
[chromium] › app.test.js:59:9 › app option › should work using "express" application and "http" server › should handle GET request to index route (/)
[chromium] › app.test.js:59:9 › app option › should work using "express" application and "spdy" server › should handle GET request to index route (/)
[chromium] › app.test.js:59:9 › app option › should work using "connect" application and "spdy" server › should handle GET request to index route (/)
[chromium] › app.test.js:59:9 › app option › should work using "connect (async)" application and "spdy" server › should handle GET request to index route (/)
1 skipped
110 passed (2.5m)
|
This job failed
Loading