housekeeping: address inconsistently truncated JS asset responses within Cypress tests (via #5445)
* add Cypress error trace * Update package.json * Update webpack-hot-dev-server.config.js * Update index.js * Update index.js
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
"test-e2e-selenium": "sleep 3 && nightwatch test/e2e-selenium/scenarios/ --config test/e2e-selenium/nightwatch.json",
|
"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",
|
"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",
|
"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",
|
"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-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",
|
"e2e-selenium": "run-p -r hot-e2e-selenium-server mock-api test-e2e-selenium",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import fs from "fs"
|
||||||
|
|
||||||
// ***********************************************************
|
// ***********************************************************
|
||||||
// This example support/index.js is processed and
|
// This example support/index.js is processed and
|
||||||
// loaded automatically before your test files.
|
// loaded automatically before your test files.
|
||||||
@@ -25,3 +27,11 @@ import "./commands"
|
|||||||
Cypress.on("window:before:load", win => {
|
Cypress.on("window:before:load", win => {
|
||||||
win.fetch = null
|
win.fetch = null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Cypress.on("uncaught:exception", (err, runnable) => {
|
||||||
|
console.log(err)
|
||||||
|
console.log(JSON.stringify(err, null, 2))
|
||||||
|
fs.writeFileSync(require("path").normalize(__dirname, "./error.log"), JSON.stringify(err, null, 2))
|
||||||
|
|
||||||
|
throw err
|
||||||
|
})
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ module.exports = require("./make-webpack-config")(rules, {
|
|||||||
port: 3200,
|
port: 3200,
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
noInfo: true,
|
noInfo: true,
|
||||||
hot: true,
|
|
||||||
disableHostCheck: true, // for development within VMs
|
disableHostCheck: true, // for development within VMs
|
||||||
stats: {
|
stats: {
|
||||||
colors: true
|
colors: true
|
||||||
|
|||||||
Reference in New Issue
Block a user