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",
|
||||
"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",
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import fs from "fs"
|
||||
|
||||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
@@ -24,4 +26,12 @@ import "./commands"
|
||||
// see https://github.com/cypress-io/cypress/issues/95
|
||||
Cypress.on("window:before:load", win => {
|
||||
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,
|
||||
publicPath: "/",
|
||||
noInfo: true,
|
||||
hot: true,
|
||||
disableHostCheck: true, // for development within VMs
|
||||
stats: {
|
||||
colors: true
|
||||
|
||||
Reference in New Issue
Block a user