From c310ee3ab4d510ea512dbad1093cb48828b36c4c Mon Sep 17 00:00:00 2001 From: kyle Date: Sun, 7 Jul 2019 22:50:17 -0500 Subject: [PATCH 1/5] add Cypress error trace --- test/e2e-cypress/support/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/e2e-cypress/support/index.js b/test/e2e-cypress/support/index.js index 83d39ac2610..ea08ad06478 100644 --- a/test/e2e-cypress/support/index.js +++ b/test/e2e-cypress/support/index.js @@ -24,4 +24,12 @@ import "./commands" // see https://github.com/cypress-io/cypress/issues/95 Cypress.on("window:before:load", win => { win.fetch = null -}) \ No newline at end of file +}) + +Cypress.on('uncaught:exception', (err, runnable) => { + console.log(err) + util.inspect(err) + console.log(JSON.stringify(err, null, 2)) + + throw err +}) From a1fffe98507e94390d114e7d9b710a6e99b7e6ed Mon Sep 17 00:00:00 2001 From: kyle Date: Sun, 7 Jul 2019 23:34:56 -0500 Subject: [PATCH 2/5] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9bec3f03ade..081adfab7cd 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "test-e2e-selenium": "sleep 3 && nightwatch test/e2e-selenium/scenarios/ --config test/e2e-selenium/nightwatch.json", "e2e-initial-render": "nightwatch test/e2e-selenium/scenarios/ --config test/e2e-selenium/nightwatch.json --group initial-render", "mock-api": "json-server --watch test/e2e-selenium/db.json --port 3204", - "hot-e2e-cypress-server": "webpack-dev-server --port 3230 --content-base test/e2e-cypress/static --host 0.0.0.0 --config webpack-hot-dev-server.config.js --inline --hot --progress", + "hot-e2e-cypress-server": "webpack-dev-server --port 3230 --content-base test/e2e-cypress/static --host 0.0.0.0 --config webpack-hot-dev-server.config.js", "hot-e2e-selenium-server": "webpack-dev-server --port 3230 --content-base test/e2e-selenium/helpers --host 0.0.0.0 --config webpack-hot-dev-server.config.js --inline --hot --progress", "e2e-cypress": "run-p -r hot-e2e-cypress-server mock-api test-e2e-cypress", "e2e-selenium": "run-p -r hot-e2e-selenium-server mock-api test-e2e-selenium", From c45d218b4628999b85ca57ce15b99cfa8fbeacd1 Mon Sep 17 00:00:00 2001 From: kyle Date: Sun, 7 Jul 2019 23:35:32 -0500 Subject: [PATCH 3/5] Update webpack-hot-dev-server.config.js --- webpack-hot-dev-server.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/webpack-hot-dev-server.config.js b/webpack-hot-dev-server.config.js index 49fb6adcb97..46fcc407db5 100644 --- a/webpack-hot-dev-server.config.js +++ b/webpack-hot-dev-server.config.js @@ -65,7 +65,6 @@ module.exports = require("./make-webpack-config")(rules, { port: 3200, publicPath: "/", noInfo: true, - hot: true, disableHostCheck: true, // for development within VMs stats: { colors: true From dc1b51924ab490ccab1a4722a8975b053d701001 Mon Sep 17 00:00:00 2001 From: kyle Date: Sun, 7 Jul 2019 23:36:41 -0500 Subject: [PATCH 4/5] Update index.js --- test/e2e-cypress/support/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e-cypress/support/index.js b/test/e2e-cypress/support/index.js index ea08ad06478..77fa2c5ccbe 100644 --- a/test/e2e-cypress/support/index.js +++ b/test/e2e-cypress/support/index.js @@ -26,7 +26,7 @@ Cypress.on("window:before:load", win => { win.fetch = null }) -Cypress.on('uncaught:exception', (err, runnable) => { +Cypress.on("uncaught:exception", (err, runnable) => { console.log(err) util.inspect(err) console.log(JSON.stringify(err, null, 2)) From 84dff05730ae71bf0dc5a58220f3eb9d29d58ee7 Mon Sep 17 00:00:00 2001 From: kyle Date: Sun, 7 Jul 2019 23:46:33 -0500 Subject: [PATCH 5/5] Update index.js --- test/e2e-cypress/support/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/e2e-cypress/support/index.js b/test/e2e-cypress/support/index.js index 77fa2c5ccbe..2b949c964fe 100644 --- a/test/e2e-cypress/support/index.js +++ b/test/e2e-cypress/support/index.js @@ -1,3 +1,5 @@ +import fs from "fs" + // *********************************************************** // This example support/index.js is processed and // loaded automatically before your test files. @@ -28,8 +30,8 @@ Cypress.on("window:before:load", win => { Cypress.on("uncaught:exception", (err, runnable) => { console.log(err) - util.inspect(err) console.log(JSON.stringify(err, null, 2)) - + fs.writeFileSync(require("path").normalize(__dirname, "./error.log"), JSON.stringify(err, null, 2)) + throw err })