chore: refactor e2e tests to playwright #6581
Annotations
6 errors, 3 warnings, and 1 notice
Run E2E tests for webpack version latest:
<anonymous>#L9
1) [chromium] › api.test.js:37: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
|
Run E2E tests for webpack version latest:
test/e2e/api.test.js#L60
1) [chromium] › api.test.js:37: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"
58 | expect(process.env.WEBPACK_SERVE).toBe("true");
59 |
> 60 | const response = await page.goto(`http://127.0.0.1:${port}/`, {
| ^
61 | waitUntil: "networkidle0",
62 | });
63 |
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/api.test.js:60:37
|
Run E2E tests for webpack version latest:
test/helpers/playwright-test.js#L3
2) [chromium] › app.test.js:59:9 › app option › should work using "express" application and "http" server › should handle GET request to index route (/)
Error: Requiring @playwright/test second time,
First:
Error:
at ../helpers/playwright-test.js:3
1 | "use strict";
2 |
> 3 | const { test } = require("@playwright/test");
| ^
4 |
5 | const customTest = test.extend({
6 | done: [
at Object.<anonymous> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/index.js:69:33)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module.replacementCompile (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:64:4
at i.<computed>.ut._extensions.<computed> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:64:4
at i.<computed>.ut._extensions.<computed> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
at Object.<anonymous> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/test.js:17:13)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module.replacementCompile (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:64:4
at i.<computed>.ut._extensions.<computed> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:64:4
at i.<computed>.ut._extensions.<computed> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
at Object.<anonymous> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/@playwright/test/index.js:17:18)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module.replacementCompile (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:64:4
at i.<computed>.ut._extensions.<computed> (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/append-transform/index.js:64:4
at i.<computed>.ut._extensions.<computed> (/Users/runner/work/webpa
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L100
3) [chromium] › app.test.js:59:9 › app option › should work using "express" application and "spdy" server › should handle GET request to index route (/)
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toMatchSnapshotWithArray(expected)
Expected: "/Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-b0a77-GET-request-to-index-route--chromium-retry1/app-option-should-work-using-express-application-and-spdy-server-should-handle-GET-request-to-index-route-console-messages-snap-actual.webpack5"
Received: ["Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR"]
98 | expect(
99 | consoleMessages.map((message) => message.text()),
> 100 | ).toMatchSnapshotWithArray("console messages");
| ^
101 | expect(pageErrors).toMatchSnapshotWithArray("page errors");
102 | });
103 | });
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:100:13
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L100
4) [chromium] › app.test.js:59:9 › app option › should work using "connect" application and "spdy" server › should handle GET request to index route (/)
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toMatchSnapshotWithArray(expected)
Expected: "/Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-63572-GET-request-to-index-route--chromium-retry1/app-option-should-work-using-connect-application-and-spdy-server-should-handle-GET-request-to-index-route-console-messages-snap-actual.webpack5"
Received: ["Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR"]
98 | expect(
99 | consoleMessages.map((message) => message.text()),
> 100 | ).toMatchSnapshotWithArray("console messages");
| ^
101 | expect(pageErrors).toMatchSnapshotWithArray("page errors");
102 | });
103 | });
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:100:13
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L100
5) [chromium] › app.test.js:59:9 › app option › should work using "connect (async)" application and "spdy" server › should handle GET request to index route (/)
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(received).toMatchSnapshotWithArray(expected)
Expected: "/Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-88679-GET-request-to-index-route--chromium-retry1/app-option-should-work-using-connect-async-application-and-spdy-server-should-handle-GET-request-to-index-route-console-messages-snap-actual.webpack5"
Received: ["Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR"]
98 | expect(
99 | consoleMessages.map((message) => message.text()),
> 100 | ).toMatchSnapshotWithArray("console messages");
| ^
101 | expect(pageErrors).toMatchSnapshotWithArray("page errors");
102 | });
103 | });
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:100:13
|
Run E2E tests for webpack version latest:
[chromium] › client-reconnect.test.js#L1
[chromium] › client-reconnect.test.js took 34.3s
|
Run E2E tests for webpack version latest:
[chromium] › allowed-hosts.test.js#L1
[chromium] › allowed-hosts.test.js took 29.4s
|
Run E2E tests for webpack version latest:
[chromium] › host.test.js#L1
[chromium] › host.test.js took 20.0s
|
Run E2E tests for webpack version latest
5 flaky
[chromium] › api.test.js:37: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 (/)
143 passed (3.1m)
|
Loading