chore: refactor e2e tests to playwright #6540
Annotations
10 errors, 1 warning, and 1 notice
Run E2E tests for webpack version latest:
test/helpers/playwright-custom-expects.js#L41
1) [chromium] › allowed-hosts.test.js:1302:7 › 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/__snapshots__/allowed-hosts.test.js/allowed-hosts-check-host-headers-should-always-allow-value-from-the-host-options-if-options-allowedHosts-is-auto-response-status-snap.webpack5, writing actual.
at ../helpers/playwright-custom-expects.js:41
39 | try {
40 | const serialized = JSON.stringify(received);
> 41 | await expect(serialized).toMatchSnapshot({
| ^
42 | name: snapshotFilePath,
43 | });
44 | pass = true;
at Object.toMatchSnapshotWithArray (/Users/runner/work/webpack-dev-server/webpack-dev-server/test/helpers/playwright-custom-expects.js:41:32)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/allowed-hosts.test.js:1347:37
|
Run E2E tests for webpack version latest:
test/helpers/playwright-custom-expects.js#L41
1) [chromium] › allowed-hosts.test.js:1302:7 › 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/__snapshots__/allowed-hosts.test.js/allowed-hosts-check-host-headers-should-always-allow-value-from-the-host-options-if-options-allowedHosts-is-auto-console-messages-snap.webpack5, writing actual.
at ../helpers/playwright-custom-expects.js:41
39 | try {
40 | const serialized = JSON.stringify(received);
> 41 | await expect(serialized).toMatchSnapshot({
| ^
42 | name: snapshotFilePath,
43 | });
44 | pass = true;
at Object.toMatchSnapshotWithArray (/Users/runner/work/webpack-dev-server/webpack-dev-server/test/helpers/playwright-custom-expects.js:41:32)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/allowed-hosts.test.js:1350:13
|
Run E2E tests for webpack version latest:
test/helpers/playwright-custom-expects.js#L41
1) [chromium] › allowed-hosts.test.js:1302:7 › 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/__snapshots__/allowed-hosts.test.js/allowed-hosts-check-host-headers-should-always-allow-value-from-the-host-options-if-options-allowedHosts-is-auto-page-errors-snap.webpack5, writing actual.
at ../helpers/playwright-custom-expects.js:41
39 | try {
40 | const serialized = JSON.stringify(received);
> 41 | await expect(serialized).toMatchSnapshot({
| ^
42 | name: snapshotFilePath,
43 | });
44 | pass = true;
at Object.toMatchSnapshotWithArray (/Users/runner/work/webpack-dev-server/webpack-dev-server/test/helpers/playwright-custom-expects.js:41:32)
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/allowed-hosts.test.js:1351:30
|
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, mergeTests } = require("@playwright/test");
| ^
4 |
5 | const customTest = test.extend({
6 | // eslint-disable-next-line no-empty-pattern
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._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.i.<computed>.ut._extensions.<computed> [as .js] (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
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._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.i.<computed>.ut._extensions.<computed> [as .js] (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
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._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.i.<computed>.ut._extensions.<computed> [as .js] (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
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/test/helpers/playwright-test.js:3:30)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module.f._compile (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:994)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.i.<computed>.ut._extensions.<computed> [as .js] (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:1010)
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/test/e2e/api.test.js:6:18)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module.f._compile (/Users/runner/work/webpack-dev-server/webpack-dev-server/node_modules/playwright/lib/utilsBundleImpl.js:16:994)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.i.<computed>.ut._extensions.<computed> [as .js] (/Users/runner/work/webpack-dev-server/webpack-dev-s
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L97
2) [chromium] › app.test.js:59:9 › app option › should work using "express" application and "http" server › should handle GET request to index route (/)
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Screenshot comparison failed:
465 pixels (ratio 0.01 of all image pixels) are different.
Expected: /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/__snapshots__/app.test.js/app-option-should-work-using-express-applica-6efea--should-handle-GET-request-to-index-route-1.png
Received: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-f48d6-GET-request-to-index-route--chromium-retry1/app-option-should-work-usi-6efea-equest-to-index-route-1-actual.png
Diff: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-f48d6-GET-request-to-index-route--chromium-retry1/app-option-should-work-usi-6efea-equest-to-index-route-1-diff.png
Call log:
- expect.toHaveScreenshot with timeout 5000ms
- verifying given screenshot expectation
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- 465 pixels (ratio 0.01 of all image pixels) are different.
- waiting 100ms before taking screenshot
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- captured a stable screenshot
- 465 pixels (ratio 0.01 of all image pixels) are different.
95 |
96 | expect(response.status()).toEqual(200);
> 97 | await expect(page).toHaveScreenshot();
| ^
98 | expect(
99 | consoleMessages.map((message) => message.text()),
100 | ).toMatchSnapshotWithArray("console messages");
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:97:30
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L97
2) [chromium] › app.test.js:59:9 › app option › should work using "express" application and "http" server › should handle GET request to index route (/)
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Screenshot comparison failed:
465 pixels (ratio 0.01 of all image pixels) are different.
Expected: /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/__snapshots__/app.test.js/app-option-should-work-using-express-applica-6efea--should-handle-GET-request-to-index-route-1.png
Received: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-f48d6-GET-request-to-index-route--chromium-retry2/app-option-should-work-usi-6efea-equest-to-index-route-1-actual.png
Diff: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-f48d6-GET-request-to-index-route--chromium-retry2/app-option-should-work-usi-6efea-equest-to-index-route-1-diff.png
Call log:
- expect.toHaveScreenshot with timeout 5000ms
- verifying given screenshot expectation
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- 465 pixels (ratio 0.01 of all image pixels) are different.
- waiting 100ms before taking screenshot
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- captured a stable screenshot
- 465 pixels (ratio 0.01 of all image pixels) are different.
95 |
96 | expect(response.status()).toEqual(200);
> 97 | await expect(page).toHaveScreenshot();
| ^
98 | expect(
99 | consoleMessages.map((message) => message.text()),
100 | ).toMatchSnapshotWithArray("console messages");
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:97:30
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L97
2) [chromium] › app.test.js:59:9 › app option › should work using "express" application and "http" server › should handle GET request to index route (/)
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
Error: Screenshot comparison failed:
465 pixels (ratio 0.01 of all image pixels) are different.
Expected: /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/__snapshots__/app.test.js/app-option-should-work-using-express-applica-6efea--should-handle-GET-request-to-index-route-1.png
Received: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-f48d6-GET-request-to-index-route--chromium-retry3/app-option-should-work-usi-6efea-equest-to-index-route-1-actual.png
Diff: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-f48d6-GET-request-to-index-route--chromium-retry3/app-option-should-work-usi-6efea-equest-to-index-route-1-diff.png
Call log:
- expect.toHaveScreenshot with timeout 5000ms
- verifying given screenshot expectation
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- 465 pixels (ratio 0.01 of all image pixels) are different.
- waiting 100ms before taking screenshot
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- captured a stable screenshot
- 465 pixels (ratio 0.01 of all image pixels) are different.
95 |
96 | expect(response.status()).toEqual(200);
> 97 | await expect(page).toHaveScreenshot();
| ^
98 | expect(
99 | consoleMessages.map((message) => message.text()),
100 | ).toMatchSnapshotWithArray("console messages");
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:97:30
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L97
3) [chromium] › app.test.js:59:9 › app option › should work using "express" application and "https" server › should handle GET request to index route (/)
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Screenshot comparison failed:
465 pixels (ratio 0.01 of all image pixels) are different.
Expected: /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/__snapshots__/app.test.js/app-option-should-work-using-express-applica-a1fb3--should-handle-GET-request-to-index-route-1.png
Received: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-15bf8-GET-request-to-index-route--chromium-retry1/app-option-should-work-usi-a1fb3-equest-to-index-route-1-actual.png
Diff: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-15bf8-GET-request-to-index-route--chromium-retry1/app-option-should-work-usi-a1fb3-equest-to-index-route-1-diff.png
Call log:
- expect.toHaveScreenshot with timeout 5000ms
- verifying given screenshot expectation
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- 465 pixels (ratio 0.01 of all image pixels) are different.
- waiting 100ms before taking screenshot
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- captured a stable screenshot
- 465 pixels (ratio 0.01 of all image pixels) are different.
95 |
96 | expect(response.status()).toEqual(200);
> 97 | await expect(page).toHaveScreenshot();
| ^
98 | expect(
99 | consoleMessages.map((message) => message.text()),
100 | ).toMatchSnapshotWithArray("console messages");
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:97:30
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L97
3) [chromium] › app.test.js:59:9 › app option › should work using "express" application and "https" server › should handle GET request to index route (/)
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Screenshot comparison failed:
465 pixels (ratio 0.01 of all image pixels) are different.
Expected: /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/__snapshots__/app.test.js/app-option-should-work-using-express-applica-a1fb3--should-handle-GET-request-to-index-route-1.png
Received: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-15bf8-GET-request-to-index-route--chromium-retry2/app-option-should-work-usi-a1fb3-equest-to-index-route-1-actual.png
Diff: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-15bf8-GET-request-to-index-route--chromium-retry2/app-option-should-work-usi-a1fb3-equest-to-index-route-1-diff.png
Call log:
- expect.toHaveScreenshot with timeout 5000ms
- verifying given screenshot expectation
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- 465 pixels (ratio 0.01 of all image pixels) are different.
- waiting 100ms before taking screenshot
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- captured a stable screenshot
- 465 pixels (ratio 0.01 of all image pixels) are different.
95 |
96 | expect(response.status()).toEqual(200);
> 97 | await expect(page).toHaveScreenshot();
| ^
98 | expect(
99 | consoleMessages.map((message) => message.text()),
100 | ).toMatchSnapshotWithArray("console messages");
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:97:30
|
Run E2E tests for webpack version latest:
test/e2e/app.test.js#L97
3) [chromium] › app.test.js:59:9 › app option › should work using "express" application and "https" server › should handle GET request to index route (/)
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
Error: Screenshot comparison failed:
465 pixels (ratio 0.01 of all image pixels) are different.
Expected: /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/__snapshots__/app.test.js/app-option-should-work-using-express-applica-a1fb3--should-handle-GET-request-to-index-route-1.png
Received: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-15bf8-GET-request-to-index-route--chromium-retry3/app-option-should-work-usi-a1fb3-equest-to-index-route-1-actual.png
Diff: /Users/runner/work/webpack-dev-server/webpack-dev-server/test-results/app-app-option-should-work-15bf8-GET-request-to-index-route--chromium-retry3/app-option-should-work-usi-a1fb3-equest-to-index-route-1-diff.png
Call log:
- expect.toHaveScreenshot with timeout 5000ms
- verifying given screenshot expectation
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- 465 pixels (ratio 0.01 of all image pixels) are different.
- waiting 100ms before taking screenshot
- taking page screenshot
- disabled all CSS animations
- waiting for fonts to load...
- fonts loaded
- captured a stable screenshot
- 465 pixels (ratio 0.01 of all image pixels) are different.
95 |
96 | expect(response.status()).toEqual(200);
> 97 | await expect(page).toHaveScreenshot();
| ^
98 | expect(
99 | consoleMessages.map((message) => message.text()),
100 | ).toMatchSnapshotWithArray("console messages");
at /Users/runner/work/webpack-dev-server/webpack-dev-server/test/e2e/app.test.js:97:30
|
Run E2E tests for webpack version latest:
[chromium] › client-reconnect.test.js#L1
[chromium] › client-reconnect.test.js took 34.5s
|
Run E2E tests for webpack version latest
28 failed
[chromium] › allowed-hosts.test.js:1302:7 › allowed hosts › check host headers › should always allow value from the `host` options if options.allowedHosts is auto
[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 "https" 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 "http" server › should handle GET request to index route (/)
[chromium] › app.test.js:59:9 › app option › should work using "connect" application and "https" 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 "http" server › should handle GET request to index route (/)
[chromium] › app.test.js:59:9 › app option › should work using "connect (async)" application and "https" 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 (/)
[chromium] › built-in-routes.test.js:123:5 › Built in routes › with simple config › should handle GET request to directory index and list all middleware directories
[chromium] › built-in-routes.test.js:271:5 › Built in routes › with multi config › should handle GET request to directory index and list all middleware directories
[chromium] › history-api-fallback.test.js:42:5 › historyApiFallback option › as boolean › should handle GET request to directory
[chromium] › history-api-fallback.test.js:100:5 › historyApiFallback option › as object › should handle GET request to directory
[chromium] › history-api-fallback.test.js:162:5 › historyApiFallback option › as object with static › should handle GET request to directory
[chromium] › history-api-fallback.test.js:255:5 › historyApiFallback option › as object with static set to false › historyApiFallback should work and ignore static content
[chromium] › history-api-fallback.test.js:328:5 › historyApiFallback option › as object with static and rewrites › historyApiFallback respect rewrites for index
[chromium] › history-api-fallback.test.js:356:5 › historyApiFallback option › as object with static and rewrites › historyApiFallback respect rewrites and shows index for unknown urls
[chromium] › history-api-fallback.test.js:386:5 › historyApiFallback option › as object with static and rewrites › historyApiFallback respect any other specified rewrites
[chromium] › history-api-fallback.test.js:451:5 › historyApiFallback option › as object with the "verbose" option › request to directory and log
[chromium] › history-api-fallback.test.js:522:5 › historyApiFallback option › as object with the "logger" option › request to directory and log
[chromium] › history-api-fallback.test.js:590:5 › historyApiFallback option › in-memory files › should take precedence over static files
[chromium] › host.test.js:50:5 › host › should work using "local-ip" host and port as number ───
[chromium] › host.test.js:126:5 › host › should work using "local-ip" host and port as string ──
[chromium] › host.test.js:198:5 › host › should work using "local-ip" host and "auto" port ─────
[chromium] › host.test.js:50:5 › host › should work using "local-ipv4" host and port as number ─
[chromium] › host.test.js:126:5 › host › should work using "local-ipv4" host and port as string
[chromium] › host.test.js:198:5 › host › should work using "local-ipv4" host and "a
|
Loading