Upgrade Cypress to latest version
Closed this issue · 0 comments
ahmedwaleedmalik commented
I'm unable to run mocked e2e tests locally, there is something wrong with the cypress configuration when we try to run it locally. Most likely since the cypress version is not pinned on local machines similar to our CI build images. We use Cypress 11.0.1
while 13.14.2
is already out, we should update this after KKP 2.26 release.
Opening Cypress...
2024-09-11 10:15:58.077 Cypress[5297:25481] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
(node:5329) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("file%3A///Users/waleedmalik/Library/Caches/Cypress/11.0.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/esm/transpile-only.mjs", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5329) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Your configFile is invalid: /Users/waleedmalik/src/ahmedwaleedmalik/dashboard/modules/web/cypress.config.ts
It threw an error when required, check the stack trace below:
SyntaxError: Unexpected token ':'
at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:310:18)
at loadESMFromCJS (node:internal/modules/cjs/loader:1381:24)
at Module._compile (node:internal/modules/cjs/loader:1503:5)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1339:12)
at require (node:internal/modules/helpers:135:16)
at loadFile (/Users/waleedmalik/Library/Caches/Cypress/11.0.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_require_async_child.js:89:14)
at EventEmitter.<anonymous> (/Users/waleedmalik/Library/Caches/Cypress/11.0.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_require_async_child.js:116:38)
at EventEmitter.emit (node:events:520:28)
at process.<anonymous> (/Users/waleedmalik/Library/Caches/Cypress/11.0.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:33:22)
at process.emit (node:events:520:28)
Error: Command failed with exit code 1: npm run cy
at makeError (/Users/waleedmalik/src/ahmedwaleedmalik/dashboard/modules/web/node_modules/start-server-and-test/node_modules/execa/lib/error.js:60:11)
at handlePromise (/Users/waleedmalik/src/ahmedwaleedmalik/dashboard/modules/web/node_modules/start-server-and-test/node_modules/execa/index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
shortMessage: 'Command failed with exit code 1: npm run cy',
command: 'npm run cy',
escapedCommand: '"npm run cy"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
[0] npm run start:mock-server exited with code SIGINT
[1] npm run vi && ng s -c=e2e-mock-ee --proxy-config=proxy-local.conf.cjs exited with code SIGTERM