diff --git a/test/e2e/__snapshots__/web-socket-communication.test.js.snap.webpack4 b/test/e2e/__snapshots__/web-socket-communication.test.js.snap.webpack4 index af76846050..d1cd9ca1fb 100644 --- a/test/e2e/__snapshots__/web-socket-communication.test.js.snap.webpack4 +++ b/test/e2e/__snapshots__/web-socket-communication.test.js.snap.webpack4 @@ -24,6 +24,52 @@ Array [ exports[`web socket communication should work and close web socket client connection when web socket server closed ("ws"): page errors 1`] = `Array []`; +exports[`web socket communication should work and reconnect when the connection is lost ("sockjs"): console messages 1`] = ` +Array [ + "[HMR] Waiting for update signal from WDS...", + "Hey.", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", + "[webpack-dev-server] Disconnected!", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", + "[webpack-dev-server] App hot update...", + "[HMR] Checking for updates on the server...", + "Failed to load resource: the server responded with a status of 404 (Not Found)", + "[HMR] Cannot find update. Need to do a full reload!", + "[HMR] (Probably because of restarting the webpack-dev-server)", + "[HMR] Waiting for update signal from WDS...", + "Hey.", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", +] +`; + +exports[`web socket communication should work and reconnect when the connection is lost ("sockjs"): page errors 1`] = `Array []`; + +exports[`web socket communication should work and reconnect when the connection is lost ("ws"): console messages 1`] = ` +Array [ + "[HMR] Waiting for update signal from WDS...", + "Hey.", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", + "[webpack-dev-server] Disconnected!", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", + "[webpack-dev-server] App hot update...", + "[HMR] Checking for updates on the server...", + "Failed to load resource: the server responded with a status of 404 (Not Found)", + "[HMR] Cannot find update. Need to do a full reload!", + "[HMR] (Probably because of restarting the webpack-dev-server)", + "[HMR] Waiting for update signal from WDS...", + "Hey.", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", +] +`; + +exports[`web socket communication should work and reconnect when the connection is lost ("ws"): page errors 1`] = `Array []`; + exports[`web socket communication should work and terminate client that is not alive ("sockjs"): console messages 1`] = ` Array [ "[HMR] Waiting for update signal from WDS...", diff --git a/test/e2e/__snapshots__/web-socket-communication.test.js.snap.webpack5 b/test/e2e/__snapshots__/web-socket-communication.test.js.snap.webpack5 index af76846050..d1cd9ca1fb 100644 --- a/test/e2e/__snapshots__/web-socket-communication.test.js.snap.webpack5 +++ b/test/e2e/__snapshots__/web-socket-communication.test.js.snap.webpack5 @@ -24,6 +24,52 @@ Array [ exports[`web socket communication should work and close web socket client connection when web socket server closed ("ws"): page errors 1`] = `Array []`; +exports[`web socket communication should work and reconnect when the connection is lost ("sockjs"): console messages 1`] = ` +Array [ + "[HMR] Waiting for update signal from WDS...", + "Hey.", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", + "[webpack-dev-server] Disconnected!", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", + "[webpack-dev-server] App hot update...", + "[HMR] Checking for updates on the server...", + "Failed to load resource: the server responded with a status of 404 (Not Found)", + "[HMR] Cannot find update. Need to do a full reload!", + "[HMR] (Probably because of restarting the webpack-dev-server)", + "[HMR] Waiting for update signal from WDS...", + "Hey.", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", +] +`; + +exports[`web socket communication should work and reconnect when the connection is lost ("sockjs"): page errors 1`] = `Array []`; + +exports[`web socket communication should work and reconnect when the connection is lost ("ws"): console messages 1`] = ` +Array [ + "[HMR] Waiting for update signal from WDS...", + "Hey.", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", + "[webpack-dev-server] Disconnected!", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", + "[webpack-dev-server] App hot update...", + "[HMR] Checking for updates on the server...", + "Failed to load resource: the server responded with a status of 404 (Not Found)", + "[HMR] Cannot find update. Need to do a full reload!", + "[HMR] (Probably because of restarting the webpack-dev-server)", + "[HMR] Waiting for update signal from WDS...", + "Hey.", + "[webpack-dev-server] Hot Module Replacement enabled.", + "[webpack-dev-server] Live Reloading enabled.", +] +`; + +exports[`web socket communication should work and reconnect when the connection is lost ("ws"): page errors 1`] = `Array []`; + exports[`web socket communication should work and terminate client that is not alive ("sockjs"): console messages 1`] = ` Array [ "[HMR] Waiting for update signal from WDS...", diff --git a/test/e2e/web-socket-communication.test.js b/test/e2e/web-socket-communication.test.js index 15621bdc48..b5877900f3 100644 --- a/test/e2e/web-socket-communication.test.js +++ b/test/e2e/web-socket-communication.test.js @@ -109,8 +109,7 @@ describe("web socket communication", () => { await server.stop(); }); - // TODO uncomment after fix regression in webpack - it.skip(`should work and reconnect when the connection is lost ("${websocketServer}")`, async () => { + it(`should work and reconnect when the connection is lost ("${websocketServer}")`, async () => { WebsocketServer.heartbeatInterval = 100; const compiler = webpack(config);