From ed26d7a090d02ad66cc67cbc04bd5e139016058f Mon Sep 17 00:00:00 2001 From: Mahdi Khashan Date: Wed, 12 Jun 2024 13:06:50 +0200 Subject: [PATCH] test: move `multi-compiler.test.js` to Playwright --- test/e2e-playwright/multi-compiler.test.js | 769 ++++++++++++++++++ ...ation-and-do-nothing-1-chromium-darwin.txt | 1 + ...ation-and-do-nothing-2-chromium-darwin.txt | 1 + ...-and-browser-entries-3-chromium-darwin.txt | 1 + ...r-and-server-entries-4-chromium-darwin.txt | 1 + ...rowser-entry-changed-1-chromium-darwin.txt | 1 + ...-and-browser-entries-1-chromium-darwin.txt | 1 + ...r-and-server-entries-2-chromium-darwin.txt | 1 + ...r-and-server-entries-1-chromium-darwin.txt | 1 + ...-and-browser-entries-4-chromium-darwin.txt | 1 + ...rowser-entry-changed-2-chromium-darwin.txt | 1 + ...rowser-entry-changed-1-chromium-darwin.txt | 1 + ...rowser-entry-changed-2-chromium-darwin.txt | 1 + ...-and-browser-entries-2-chromium-darwin.txt | 1 + ...r-and-server-entries-3-chromium-darwin.txt | 1 + ...ation-and-do-nothing-1-chromium-darwin.txt | 1 + ...ation-and-do-nothing-2-chromium-darwin.txt | 1 + ...changing-own-entries-1-chromium-darwin.txt | 1 + ...changing-own-entries-1-chromium-darwin.txt | 1 + ...changing-own-entries-3-chromium-darwin.txt | 1 + ...changing-own-entries-1-chromium-darwin.txt | 1 + ...changing-own-entries-4-chromium-darwin.txt | 1 + ...changing-own-entries-2-chromium-darwin.txt | 1 + ...changing-own-entries-2-chromium-darwin.txt | 1 + ...changing-own-entries-3-chromium-darwin.txt | 1 + ...anging-other-entries-4-chromium-darwin.txt | 1 + ...changing-own-entries-3-chromium-darwin.txt | 1 + ...anging-other-entries-1-chromium-darwin.txt | 1 + ...changing-own-entries-2-chromium-darwin.txt | 1 + ...anging-other-entries-3-chromium-darwin.txt | 1 + ...changing-own-entries-4-chromium-darwin.txt | 1 + ...anging-other-entries-2-chromium-darwin.txt | 1 + ...changing-own-entries-4-chromium-darwin.txt | 1 + ...tions-and-do-nothing-1-chromium-darwin.txt | 1 + ...tions-and-do-nothing-2-chromium-darwin.txt | 1 + ...tions-and-do-nothing-3-chromium-darwin.txt | 1 + ...tions-and-do-nothing-4-chromium-darwin.txt | 1 + 37 files changed, 805 insertions(+) create mode 100644 test/e2e-playwright/multi-compiler.test.js create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-one-web-target-configuration-and-do-nothing-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-one-web-target-configuration-and-do-nothing-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-2a901-iler-when-changing-server-and-browser-entries-3-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-3e000-iler-when-changing-browser-and-server-entries-4-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-40d3e-r-browser-compiler-when-browser-entry-changed-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-4663e-iler-when-changing-server-and-browser-entries-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-5786e-iler-when-changing-browser-and-server-entries-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-922e7-iler-when-changing-browser-and-server-entries-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-9410f-iler-when-changing-server-and-browser-entries-4-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-9d363-ompiler-by-default-when-browser-entry-changed-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-a918f-ompiler-by-default-when-browser-entry-changed-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-c0518-r-browser-compiler-when-browser-entry-changed-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-d44d3-iler-when-changing-server-and-browser-entries-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-f365f-iler-when-changing-browser-and-server-entries-3-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-configuration-and-do-nothing-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-configuration-and-do-nothing-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-02616--and-do-live-reload-when-changing-own-entries-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-2882d--and-do-hot-reload-when-changing-own-entries-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-5fabc--and-do-hot-reload-when-changing-own-entries-3-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-74f3b-t-reload-by-default-when-changing-own-entries-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-75bd6--and-do-live-reload-when-changing-own-entries-4-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-8e6b2-t-reload-by-default-when-changing-own-entries-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-984de--and-do-live-reload-when-changing-own-entries-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-a3bfc--and-do-live-reload-when-changing-own-entries-3-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-a682a-nd-do-live-reload-when-changing-other-entries-4-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-b9900-t-reload-by-default-when-changing-own-entries-3-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-d2439-nd-do-live-reload-when-changing-other-entries-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-e2618--and-do-hot-reload-when-changing-own-entries-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-e94da-nd-do-live-reload-when-changing-other-entries-3-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-ecb85--and-do-hot-reload-when-changing-own-entries-4-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-eccbf-nd-do-live-reload-when-changing-other-entries-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-fbe64-t-reload-by-default-when-changing-own-entries-4-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-1-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-2-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-3-chromium-darwin.txt create mode 100644 test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-4-chromium-darwin.txt diff --git a/test/e2e-playwright/multi-compiler.test.js b/test/e2e-playwright/multi-compiler.test.js new file mode 100644 index 0000000000..e3686c1e19 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js @@ -0,0 +1,769 @@ +"use strict"; + +const path = require("path"); +const fs = require("graceful-fs"); +const webpack = require("webpack"); +const { test } = require("@playwright/test"); +const { describe } = require("@playwright/test"); +const { expect } = require("@playwright/test"); +const Server = require("../../lib/Server"); +const oneWebTargetConfiguration = require("../fixtures/multi-compiler-one-configuration/webpack.config"); +const twoWebTargetConfiguration = require("../fixtures/multi-compiler-two-configurations/webpack.config"); +const universalConfiguration = require("../fixtures/universal-compiler-config/webpack.config"); +const port = require("../ports-map")["multi-compiler"]; + +describe("multi compiler", () => { + test(`should work with one web target configuration and do nothing`, async ({ + page, + }) => { + const compiler = webpack(oneWebTargetConfiguration); + const devServerOptions = { + port, + }; + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + const pageErrors = []; + const consoleMessages = []; + + page + .on("console", (message) => { + consoleMessages.push(message.text()); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/`, { + waitUntil: "networkidle0", + }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + } + }); + + test(`should work with web target configurations and do nothing`, async ({ + page, + }) => { + const compiler = webpack(twoWebTargetConfiguration); + const devServerOptions = { + port, + }; + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + let pageErrors = []; + let consoleMessages = []; + + page + .on("console", (message) => { + consoleMessages.push(message.text()); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/one-main.html`, { + waitUntil: "networkidle0", + }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + + pageErrors = []; + consoleMessages = []; + + await page.goto(`http://127.0.0.1:${port}/two-main.html`, { + waitUntil: "networkidle0", + }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + } + }); + + test(`should work with web target configurations when hot and live reloads are enabled, and do hot reload by default when changing own entries`, async ({ + page, + }) => { + const compiler = webpack(twoWebTargetConfiguration); + const devServerOptions = { + port, + hot: true, + liveReload: true, + }; + const pathToOneEntry = path.resolve( + __dirname, + "../fixtures/multi-compiler-two-configurations/one.js", + ); + const originalOneEntryContent = fs.readFileSync(pathToOneEntry); + const pathToTwoEntry = path.resolve( + __dirname, + "../fixtures/multi-compiler-two-configurations/two.js", + ); + const originalTwoEntryContent = fs.readFileSync(pathToTwoEntry); + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + let pageErrors = []; + let consoleMessages = []; + + page + .on("console", (message) => { + let text = message.text(); + + if (/Error: Aborted because/.test(text)) { + const splittedText = text.split("\n"); + + text = `${splittedText[0]}\n${splittedText[1]}\n `; + } + + consoleMessages.push(text); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/one-main.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync(pathToOneEntry, `${originalOneEntryContent}// comment`); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + + pageErrors = []; + consoleMessages = []; + + await page.goto(`http://127.0.0.1:${port}/two-main.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync(pathToTwoEntry, `${originalTwoEntryContent}// comment`); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + + fs.writeFileSync(pathToOneEntry, originalOneEntryContent); + fs.writeFileSync(pathToTwoEntry, originalTwoEntryContent); + } + }); + + test(`should work with web target configurations when only hot reload is enabled, and do hot reload when changing own entries`, async ({ + page, + }) => { + const compiler = webpack(twoWebTargetConfiguration); + const devServerOptions = { + port, + hot: true, + liveReload: false, + }; + const pathToOneEntry = path.resolve( + __dirname, + "../fixtures/multi-compiler-two-configurations/one.js", + ); + const originalOneEntryContent = fs.readFileSync(pathToOneEntry); + const pathToTwoEntry = path.resolve( + __dirname, + "../fixtures/multi-compiler-two-configurations/two.js", + ); + const originalTwoEntryContent = fs.readFileSync(pathToTwoEntry); + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + let pageErrors = []; + let consoleMessages = []; + + page + .on("console", (message) => { + let text = message.text(); + + if (/Error: Aborted because/.test(text)) { + const splittedText = text.split("\n"); + + text = `${splittedText[0]}\n${splittedText[1]}\n `; + } + + consoleMessages.push(text); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/one-main.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync(pathToOneEntry, `${originalOneEntryContent}// comment`); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + + pageErrors = []; + consoleMessages = []; + + await page.goto(`http://127.0.0.1:${port}/two-main.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync(pathToTwoEntry, `${originalTwoEntryContent}// comment`); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + + fs.writeFileSync(pathToOneEntry, originalOneEntryContent); + fs.writeFileSync(pathToTwoEntry, originalTwoEntryContent); + } + }); + + test(`should work with web target configurations when only live reload is enabled, and do live reload when changing own entries`, async ({ + page, + }) => { + const compiler = webpack(twoWebTargetConfiguration); + const devServerOptions = { + port, + hot: false, + liveReload: true, + }; + const pathToOneEntry = path.resolve( + __dirname, + "../fixtures/multi-compiler-two-configurations/one.js", + ); + const originalOneEntryContent = fs.readFileSync(pathToOneEntry); + const pathToTwoEntry = path.resolve( + __dirname, + "../fixtures/multi-compiler-two-configurations/two.js", + ); + const originalTwoEntryContent = fs.readFileSync(pathToTwoEntry); + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + let pageErrors = []; + let consoleMessages = []; + + page + .on("console", (message) => { + consoleMessages.push(message.text()); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/one-main.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync(pathToOneEntry, `${originalOneEntryContent}// comment`); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + + pageErrors = []; + consoleMessages = []; + + await page.goto(`http://127.0.0.1:${port}/two-main.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync(pathToTwoEntry, `${originalTwoEntryContent}// comment`); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + + fs.writeFileSync(pathToOneEntry, originalOneEntryContent); + fs.writeFileSync(pathToTwoEntry, originalTwoEntryContent); + } + }); + + test(`should work with web target configurations when only live reload is enabled and do live reload when changing other entries`, async ({ + page, + }) => { + const compiler = webpack(twoWebTargetConfiguration); + const devServerOptions = { + port, + hot: false, + liveReload: true, + }; + const pathToOneEntry = path.resolve( + __dirname, + "../fixtures/multi-compiler-two-configurations/one.js", + ); + const originalOneEntryContent = fs.readFileSync(pathToOneEntry); + const pathToTwoEntry = path.resolve( + __dirname, + "../fixtures/multi-compiler-two-configurations/two.js", + ); + const originalTwoEntryContent = fs.readFileSync(pathToTwoEntry); + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + let pageErrors = []; + let consoleMessages = []; + + page + .on("console", (message) => { + consoleMessages.push(message.text()); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/one-main.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync(pathToTwoEntry, `${originalTwoEntryContent}// comment`); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + + pageErrors = []; + consoleMessages = []; + + await page.goto(`http://127.0.0.1:${port}/two-main.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync(pathToOneEntry, `${originalOneEntryContent}// comment`); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + + fs.writeFileSync(pathToOneEntry, originalOneEntryContent); + fs.writeFileSync(pathToTwoEntry, originalTwoEntryContent); + } + }); + + test("should work with universal configuration and do nothing", async ({ + page, + }) => { + const compiler = webpack(universalConfiguration); + const devServerOptions = { + port, + }; + const server = new Server(devServerOptions, compiler); + + await server.start(); + + const pageErrors = []; + const consoleMessages = []; + try { + const serverResponse = await page.goto( + `http://127.0.0.1:${port}/server.js`, + { + waitUntil: "networkidle0", + }, + ); + + const serverResponseText = await serverResponse.text(); + + expect(serverResponseText).toContain("Hello from the server"); + expect(serverResponseText).not.toContain("WebsocketServer"); + + page + .on("console", (message) => { + consoleMessages.push(message.text()); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/browser.html`, { + waitUntil: "networkidle0", + }); + } catch (error) { + throw error; + } finally { + await server.stop(); + } + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + }); + + test(`should work with universal configuration when hot and live reloads are enabled, and do hot reload for browser compiler by default when browser entry changed`, async ({ + page, + }) => { + const compiler = webpack(universalConfiguration); + const devServerOptions = { + port, + hot: true, + liveReload: true, + }; + const pathToBrowserEntry = path.resolve( + __dirname, + "../fixtures/universal-compiler-config/browser.js", + ); + const originalBrowserEntryContent = fs.readFileSync(pathToBrowserEntry); + const pathToServerEntry = path.resolve( + __dirname, + "../fixtures/universal-compiler-config/server.js", + ); + const originalServerEntryContent = fs.readFileSync(pathToServerEntry); + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + const serverResponse = await page.goto( + `http://127.0.0.1:${port}/server.js`, + { + waitUntil: "networkidle0", + }, + ); + + const serverResponseText = await serverResponse.text(); + + expect(serverResponseText).toContain("Hello from the server"); + expect(serverResponseText).not.toContain("WebsocketServer"); + + const pageErrors = []; + const consoleMessages = []; + + page + .on("console", (message) => { + let text = message.text(); + + if (/Error: Aborted because/.test(text)) { + const splittedText = text.split("\n"); + + text = `${splittedText[0]}\n${splittedText[1]}\n `; + } + + consoleMessages.push(text); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/browser.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync( + pathToBrowserEntry, + `${originalBrowserEntryContent}// comment`, + ); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + + fs.writeFileSync(pathToBrowserEntry, originalBrowserEntryContent); + fs.writeFileSync(pathToServerEntry, originalServerEntryContent); + } + }); + + test(`should work with universal configuration when only hot reload is enabled, and do hot reload for browser compiler when browser entry changed`, async ({ + page, + }) => { + const compiler = webpack(universalConfiguration); + const devServerOptions = { + port, + hot: true, + liveReload: false, + }; + const pathToBrowserEntry = path.resolve( + __dirname, + "../fixtures/universal-compiler-config/browser.js", + ); + const originalBrowserEntryContent = fs.readFileSync(pathToBrowserEntry); + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + const serverResponse = await page.goto( + `http://127.0.0.1:${port}/server.js`, + { + waitUntil: "networkidle0", + }, + ); + + const serverResponseText = await serverResponse.text(); + + expect(serverResponseText).toContain("Hello from the server"); + expect(serverResponseText).not.toContain("WebsocketServer"); + + const pageErrors = []; + const consoleMessages = []; + + page + .on("console", (message) => { + let text = message.text(); + + if (/Error: Aborted because/.test(text)) { + const splittedText = text.split("\n"); + + text = `${splittedText[0]}\n${splittedText[1]}\n `; + } + + consoleMessages.push(text); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/browser.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync( + pathToBrowserEntry, + `${originalBrowserEntryContent}// comment`, + ); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + + fs.writeFileSync(pathToBrowserEntry, originalBrowserEntryContent); + } + }); + + test(`should work with universal configuration when only live reload is enabled, and do live reload for browser compiler when changing browser and server entries`, async ({ + page, + }) => { + const compiler = webpack(universalConfiguration); + const devServerOptions = { + port, + hot: false, + liveReload: true, + }; + const pathToBrowserEntry = path.resolve( + __dirname, + "../fixtures/universal-compiler-config/browser.js", + ); + const originalBrowserEntryContent = fs.readFileSync(pathToBrowserEntry); + const pathToServerEntry = path.resolve( + __dirname, + "../fixtures/universal-compiler-config/server.js", + ); + const originalServerEntryContent = fs.readFileSync(pathToServerEntry); + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + const serverResponse = await page.goto( + `http://127.0.0.1:${port}/server.js`, + { + waitUntil: "networkidle0", + }, + ); + + const serverResponseText = await serverResponse.text(); + + expect(serverResponseText).toContain("Hello from the server"); + expect(serverResponseText).not.toContain("WebsocketServer"); + + let pageErrors = []; + let consoleMessages = []; + + page + .on("console", (message) => { + consoleMessages.push(message.text()); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/browser.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync( + pathToBrowserEntry, + `${originalBrowserEntryContent}// comment`, + ); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + + pageErrors = []; + consoleMessages = []; + + await page.goto(`http://127.0.0.1:${port}/browser.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync( + pathToServerEntry, + `${originalServerEntryContent}// comment`, + ); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + + fs.writeFileSync(pathToBrowserEntry, originalBrowserEntryContent); + fs.writeFileSync(pathToServerEntry, originalServerEntryContent); + } + }); + + test(`should work with universal configuration when only live reload is enabled, and do live reload for browser compiler when changing server and browser entries`, async ({ + page, + }) => { + const compiler = webpack(universalConfiguration); + const devServerOptions = { + port, + hot: false, + liveReload: true, + }; + const pathToBrowserEntry = path.resolve( + __dirname, + "../fixtures/universal-compiler-config/browser.js", + ); + const originalBrowserEntryContent = fs.readFileSync(pathToBrowserEntry); + const pathToServerEntry = path.resolve( + __dirname, + "../fixtures/universal-compiler-config/server.js", + ); + const originalServerEntryContent = fs.readFileSync(pathToServerEntry); + + const server = new Server(devServerOptions, compiler); + + await server.start(); + + try { + const serverResponse = await page.goto( + `http://127.0.0.1:${port}/server.js`, + { + waitUntil: "networkidle0", + }, + ); + + const serverResponseText = await serverResponse.text(); + + expect(serverResponseText).toContain("Hello from the server"); + expect(serverResponseText).not.toContain("WebsocketServer"); + + let pageErrors = []; + let consoleMessages = []; + + page + .on("console", (message) => { + consoleMessages.push(message.text()); + }) + .on("pageerror", (error) => { + pageErrors.push(error); + }); + + await page.goto(`http://127.0.0.1:${port}/browser.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync( + pathToServerEntry, + `${originalServerEntryContent}// comment`, + ); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + + pageErrors = []; + consoleMessages = []; + + await page.goto(`http://127.0.0.1:${port}/browser.html`, { + waitUntil: "networkidle0", + }); + + fs.writeFileSync( + pathToBrowserEntry, + `${originalBrowserEntryContent}// comment`, + ); + + await page.waitForNavigation({ waitUntil: "networkidle0" }); + + expect(JSON.stringify(consoleMessages)).toMatchSnapshot(); + expect(JSON.stringify(pageErrors)).toMatchSnapshot(); + } catch (error) { + throw error; + } finally { + await server.stop(); + + fs.writeFileSync(pathToBrowserEntry, originalBrowserEntryContent); + fs.writeFileSync(pathToServerEntry, originalServerEntryContent); + } + }); +}); diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-one-web-target-configuration-and-do-nothing-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-one-web-target-configuration-and-do-nothing-1-chromium-darwin.txt new file mode 100644 index 0000000000..eb2ebfc5ea --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-one-web-target-configuration-and-do-nothing-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","Hey."] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-one-web-target-configuration-and-do-nothing-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-one-web-target-configuration-and-do-nothing-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-one-web-target-configuration-and-do-nothing-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-2a901-iler-when-changing-server-and-browser-entries-3-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-2a901-iler-when-changing-server-and-browser-entries-3-chromium-darwin.txt new file mode 100644 index 0000000000..33739f87f2 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-2a901-iler-when-changing-server-and-browser-entries-3-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","Hello from the browser","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App updated. Reloading...","[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","Hello from the browser"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-3e000-iler-when-changing-browser-and-server-entries-4-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-3e000-iler-when-changing-browser-and-server-entries-4-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-3e000-iler-when-changing-browser-and-server-entries-4-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-40d3e-r-browser-compiler-when-browser-entry-changed-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-40d3e-r-browser-compiler-when-browser-entry-changed-1-chromium-darwin.txt new file mode 100644 index 0000000000..0cb55e68f8 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-40d3e-r-browser-compiler-when-browser-entry-changed-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading disabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","Hello from the browser","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App hot update...","[HMR] Checking for updates on the server...","[HMR] Cannot apply update. Need to do a full reload!","[HMR] Error: Aborted because ./browser.js is not accepted\nUpdate propagation: ./browser.js\n ","[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading disabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","Hello from the browser"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-4663e-iler-when-changing-server-and-browser-entries-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-4663e-iler-when-changing-server-and-browser-entries-1-chromium-darwin.txt new file mode 100644 index 0000000000..33739f87f2 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-4663e-iler-when-changing-server-and-browser-entries-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","Hello from the browser","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App updated. Reloading...","[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","Hello from the browser"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-5786e-iler-when-changing-browser-and-server-entries-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-5786e-iler-when-changing-browser-and-server-entries-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-5786e-iler-when-changing-browser-and-server-entries-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-922e7-iler-when-changing-browser-and-server-entries-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-922e7-iler-when-changing-browser-and-server-entries-1-chromium-darwin.txt new file mode 100644 index 0000000000..33739f87f2 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-922e7-iler-when-changing-browser-and-server-entries-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","Hello from the browser","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App updated. Reloading...","[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","Hello from the browser"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-9410f-iler-when-changing-server-and-browser-entries-4-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-9410f-iler-when-changing-server-and-browser-entries-4-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-9410f-iler-when-changing-server-and-browser-entries-4-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-9d363-ompiler-by-default-when-browser-entry-changed-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-9d363-ompiler-by-default-when-browser-entry-changed-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-9d363-ompiler-by-default-when-browser-entry-changed-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-a918f-ompiler-by-default-when-browser-entry-changed-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-a918f-ompiler-by-default-when-browser-entry-changed-1-chromium-darwin.txt new file mode 100644 index 0000000000..c42c621f1a --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-a918f-ompiler-by-default-when-browser-entry-changed-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","Hello from the browser","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App hot update...","[HMR] Checking for updates on the server...","[HMR] Cannot apply update. Need to do a full reload!","[HMR] Error: Aborted because ./browser.js is not accepted\nUpdate propagation: ./browser.js\n ","[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","Hello from the browser"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-c0518-r-browser-compiler-when-browser-entry-changed-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-c0518-r-browser-compiler-when-browser-entry-changed-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-c0518-r-browser-compiler-when-browser-entry-changed-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-d44d3-iler-when-changing-server-and-browser-entries-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-d44d3-iler-when-changing-server-and-browser-entries-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-d44d3-iler-when-changing-server-and-browser-entries-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-f365f-iler-when-changing-browser-and-server-entries-3-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-f365f-iler-when-changing-browser-and-server-entries-3-chromium-darwin.txt new file mode 100644 index 0000000000..33739f87f2 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-conf-f365f-iler-when-changing-browser-and-server-entries-3-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","Hello from the browser","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App updated. Reloading...","[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","Hello from the browser"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-configuration-and-do-nothing-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-configuration-and-do-nothing-1-chromium-darwin.txt new file mode 100644 index 0000000000..646ad8f3b9 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-configuration-and-do-nothing-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","Hello from the browser"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-configuration-and-do-nothing-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-configuration-and-do-nothing-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-universal-configuration-and-do-nothing-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-02616--and-do-live-reload-when-changing-own-entries-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-02616--and-do-live-reload-when-changing-own-entries-1-chromium-darwin.txt new file mode 100644 index 0000000000..330dec4a5c --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-02616--and-do-live-reload-when-changing-own-entries-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","one","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App updated. Reloading...","[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","one"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-2882d--and-do-hot-reload-when-changing-own-entries-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-2882d--and-do-hot-reload-when-changing-own-entries-1-chromium-darwin.txt new file mode 100644 index 0000000000..36d014361b --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-2882d--and-do-hot-reload-when-changing-own-entries-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading disabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","one","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App hot update...","[HMR] Checking for updates on the server...","[HMR] Cannot apply update. Need to do a full reload!","[HMR] Error: Aborted because ./one.js is not accepted\nUpdate propagation: ./one.js\n ","[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading disabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","one"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-5fabc--and-do-hot-reload-when-changing-own-entries-3-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-5fabc--and-do-hot-reload-when-changing-own-entries-3-chromium-darwin.txt new file mode 100644 index 0000000000..147cc33896 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-5fabc--and-do-hot-reload-when-changing-own-entries-3-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading disabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","two","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App hot update...","[HMR] Checking for updates on the server...","[HMR] Cannot apply update. Need to do a full reload!","[HMR] Error: Aborted because ./two.js is not accepted\nUpdate propagation: ./two.js\n ","[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading disabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","two"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-74f3b-t-reload-by-default-when-changing-own-entries-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-74f3b-t-reload-by-default-when-changing-own-entries-1-chromium-darwin.txt new file mode 100644 index 0000000000..a1c29d6025 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-74f3b-t-reload-by-default-when-changing-own-entries-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","one","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App hot update...","[HMR] Checking for updates on the server...","[HMR] Cannot apply update. Need to do a full reload!","[HMR] Error: Aborted because ./one.js is not accepted\nUpdate propagation: ./one.js\n ","[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","one"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-75bd6--and-do-live-reload-when-changing-own-entries-4-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-75bd6--and-do-live-reload-when-changing-own-entries-4-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-75bd6--and-do-live-reload-when-changing-own-entries-4-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-8e6b2-t-reload-by-default-when-changing-own-entries-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-8e6b2-t-reload-by-default-when-changing-own-entries-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-8e6b2-t-reload-by-default-when-changing-own-entries-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-984de--and-do-live-reload-when-changing-own-entries-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-984de--and-do-live-reload-when-changing-own-entries-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-984de--and-do-live-reload-when-changing-own-entries-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-a3bfc--and-do-live-reload-when-changing-own-entries-3-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-a3bfc--and-do-live-reload-when-changing-own-entries-3-chromium-darwin.txt new file mode 100644 index 0000000000..3b27f7cbfc --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-a3bfc--and-do-live-reload-when-changing-own-entries-3-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","two","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App updated. Reloading...","[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","two"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-a682a-nd-do-live-reload-when-changing-other-entries-4-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-a682a-nd-do-live-reload-when-changing-other-entries-4-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-a682a-nd-do-live-reload-when-changing-other-entries-4-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-b9900-t-reload-by-default-when-changing-own-entries-3-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-b9900-t-reload-by-default-when-changing-own-entries-3-chromium-darwin.txt new file mode 100644 index 0000000000..7808570b99 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-b9900-t-reload-by-default-when-changing-own-entries-3-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","two","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App hot update...","[HMR] Checking for updates on the server...","[HMR] Cannot apply update. Need to do a full reload!","[HMR] Error: Aborted because ./two.js is not accepted\nUpdate propagation: ./two.js\n ","[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","two"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-d2439-nd-do-live-reload-when-changing-other-entries-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-d2439-nd-do-live-reload-when-changing-other-entries-1-chromium-darwin.txt new file mode 100644 index 0000000000..330dec4a5c --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-d2439-nd-do-live-reload-when-changing-other-entries-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","one","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App updated. Reloading...","[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","one"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-e2618--and-do-hot-reload-when-changing-own-entries-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-e2618--and-do-hot-reload-when-changing-own-entries-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-e2618--and-do-hot-reload-when-changing-own-entries-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-e94da-nd-do-live-reload-when-changing-other-entries-3-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-e94da-nd-do-live-reload-when-changing-other-entries-3-chromium-darwin.txt new file mode 100644 index 0000000000..3b27f7cbfc --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-e94da-nd-do-live-reload-when-changing-other-entries-3-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","two","[webpack-dev-server] App updated. Recompiling...","[webpack-dev-server] App updated. Reloading...","[webpack-dev-server] Server started: Hot Module Replacement disabled, Live Reloading enabled, Progress disabled, Overlay enabled.","two"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-ecb85--and-do-hot-reload-when-changing-own-entries-4-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-ecb85--and-do-hot-reload-when-changing-own-entries-4-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-ecb85--and-do-hot-reload-when-changing-own-entries-4-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-eccbf-nd-do-live-reload-when-changing-other-entries-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-eccbf-nd-do-live-reload-when-changing-other-entries-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-eccbf-nd-do-live-reload-when-changing-other-entries-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-fbe64-t-reload-by-default-when-changing-own-entries-4-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-fbe64-t-reload-by-default-when-changing-own-entries-4-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-con-fbe64-t-reload-by-default-when-changing-own-entries-4-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-1-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-1-chromium-darwin.txt new file mode 100644 index 0000000000..37e6ef978b --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-1-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","one"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-2-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-2-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-2-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-3-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-3-chromium-darwin.txt new file mode 100644 index 0000000000..4f3ea4620e --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-3-chromium-darwin.txt @@ -0,0 +1 @@ +["[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.","[HMR] Waiting for update signal from WDS...","two"] \ No newline at end of file diff --git a/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-4-chromium-darwin.txt b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-4-chromium-darwin.txt new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/test/e2e-playwright/multi-compiler.test.js-snapshots/multi-compiler-should-work-with-web-target-configurations-and-do-nothing-4-chromium-darwin.txt @@ -0,0 +1 @@ +[] \ No newline at end of file