Expected to find global registry error on test case init
See original GitHub issueHi,
I recently updated our framework to use cypress 10.x, and typescript. Also changed to the latest cypress-cucumber-preprocessor from you, and I thank you for that for updating this package.
Yesterday it was working perfectly. Today I did an npm update
and it broke all of it. I was wondering why, and it pointed me to this package, where the error message said that I should report this as a bug, so I am doing that rn. 😃
I cannot give you an example repo unfortunately due to capacity, however maybe you can point out what is its problem with my package json after npm update
, or maybe there is a bug you can see from that either way.
Thank you, you are awesome!
at fail ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/assertions.js:7:1](https://kontrol-dev.kasa.com/__/#))
at assert ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/assertions.js:14:1](https://kontrol-dev.kasa.com/__/#))
at assertAndReturn ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/assertions.js:18:1](https://kontrol-dev.kasa.com/__/#))
at getRegistry ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/registry.js:137:1](https://kontrol-dev.kasa.com/__/#))
at defineBefore ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/methods.js:32:1](https://kontrol-dev.kasa.com/__/#))
at 1.../../support/helpers/auth0-api ([e2e/stepDefinitions/e2e.ts:38:8](https://kontrol-dev.kasa.com/__/#))
at o ([node_modules/browser-pack/_prelude.js:1:1](https://kontrol-dev.kasa.com/__/#))
at eval ([node_modules/browser-pack/_prelude.js:1:1](https://kontrol-dev.kasa.com/__/#))
at 225.../../e2e/stepDefinitions/e2e ([support/helpers/kontrol-api.ts:1:1](https://kontrol-dev.kasa.com/__/#))
at o ([node_modules/browser-pack/_prelude.js:1:1](https://kontrol-dev.kasa.com/__/#))
From previous event:
at runScriptsFromUrls (https://kontrol-dev.kasa.com/__cypress/runner/cypress_runner.js:175359:137)
at Object.runScripts (https://kontrol-dev.kasa.com/__cypress/runner/cypress_runner.js:175374:13)
at $Cypress.onSpecWindow (https://kontrol-dev.kasa.com/__cypress/runner/cypress_runner.js:163545:76)
Dependencies we use:
"devDependencies": {
"@bahmutov/cypress-extends": "^1.1.0",
"@cypress/browserify-preprocessor": "^3.0.2",
"@percy/cli": "^1.0.0-beta.52",
"@percy/cypress": "^3.1.0",
"@typescript-eslint/parser": "^5.33.0",
"cypress-iframe": "^1.0.1",
"cypress-plugin-stripe-elements": "^1.0.1",
"cypress-slack-reporter": "^1.2.1",
"cypress-social-logins": "^1.11.2",
"cypress-terminal-report": "^4.1.2",
"docolatte": "^2.10.2",
"eslint": "^8.10.0",
"mochawesome": "^7.1.3",
"mochawesome-merge": "^4.2.1",
"mochawesome-report-generator": "^6.2.0",
"path": "^0.12.7",
"resolve": "^1.22.1",
"stream": "^0.0.2"
},
"dependencies": {
"@badeball/cypress-cucumber-preprocessor": "^12.0.1",
"@cucumber/cucumber": "^7.0.0",
"@cypress/webpack-preprocessor": "^5.12.1",
"@privateRepo1": "^9.18.0",
"@privateRepo2": "0.1.1",
"@privateRepo3": "^2.43.0",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"aws-sdk": "^2.932.0",
"axios": "^0.27.2",
"clean-jsdoc-theme": "^3.3.1",
"commander": "^7.2.0",
"cypress": "^10.6.0",
"cypress-commands": "^1.1.0",
"cypress-real-events": "^1.7.1",
"cypress-waitfor": "^1.1.0",
"dayjs": "^1.10.4",
"express": "^4.18.1",
"jira-client-xray": "^1.0.1",
"jsdoc-cypress-cucumber-plugin": "^1.1.0",
"lodash": "^4.17.21",
"luxon": "^1.26.0",
"mocha": "^10.0.0",
"mongodb": "^4.7.0",
"namecase": "^1.1.2",
"prettier": "^2.5.1",
"prettier-eslint": "^13.0.0",
"ts-loader": "^9.3.1"
},
Current behavior
After using npm update and updating my packages, this error message comes up after loading a test case.
Desired behavior
Works as expected
Versions
- Cypress version: 10.6.0
- Preprocessor version: 4.2.0
- Node version: 17.6.0
Checklist
- I’ve read the FAQ.
- I’ve read Instructions for logging issues.
- I’m not using
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).
Issue Analytics
- State:
- Created a year ago
- Comments:12 (4 by maintainers)
See my comment above.
A better error message would suffice here then. That makes sense, thanks.