Incorrect Configuration error with testIsolation setting when experimentalSessionAndOrigin is true
See original GitHub issueCurrent behavior
If you have a config like this:
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
experimentalSessionAndOrigin: true,
testIsolation: "off",
}
});
Then running Cypress works just fine.
*However, if you make ANY change to the config, then you’ll get an error:
Your configFile at <path>cypress.config.js set an invalid value:
Expected e2e.testIsolation to be not set unless the experimentalSessionAndOrigin flag is turned on.
Instead the value was: “off”
Error
at C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\data-context\src\data\ProjectConfigManager.js:272:41
at C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\config\src\browser.js:121:24
at C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\node_modules\lodash\lodash.js:4967:15
at baseForOwn (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\node_modules\lodash\lodash.js:3032:24)
at C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\node_modules\lodash\lodash.js:4936:18
at Function.forEach (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\node_modules\lodash\lodash.js:9410:14)
at validate (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\config\src\browser.js:111:29)
at ProjectConfigManager.validateConfigFile (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\data-context\src\data\ProjectConfigManager.js:268:31)
at ProjectConfigManager.initializeConfig (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\data-context\src\data\ProjectConfigManager.js:82:22)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at ProjectLifecycleManager.refreshLifecycle (C:\Users\myuser\AppData\Local\Cypress\Cache\10.11.0\Cypress\resources\app\packages\data-context\src\data\ProjectLifecycleManager.js:271:9)
You have to restart Cypress for it to work again.
Desired behavior
The error is incorrect as experimentalSessionAndOrigin
is true
. So it just shouldn’t error.
Test code to reproduce
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
experimentalSessionAndOrigin: true,
testIsolation: "off",
}
});
Cypress Version
10.11.0
Node version
16.15.0
Operating System
WIndows 11 22H2 22621.674
Debug Logs
No response
Other
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Experiments | Cypress Documentation
Configuration ; experimentalSourceRewriting, false, Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML ...
Read more >All specs disappear in Cypress after ... - Stack Overflow
session(), I first have to implement this script: e2e: { experimentalSessionAndOrigin: true, },. But, as soon, as I add that to ...
Read more >8 common mistakes in Cypress (and how to avoid them)
But what about the cases when our tests fail because the page is too slow? ... true attribute in your cypress.config.js .
Read more >package.json - rouch/Cypress - NotABug.org
Cypress - Fast, easy and reliable testing for anything that runs in a browser.
Read more >Cypress 9.6.0: Now easily test multi-domain workflows with cy ...
Users can check out the new capability after upgrading to Cypress 9.6.0 by setting the new experimentalSessionAndOrigin configuration option to true.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released in 11.0.1.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v11.0.1, please open a new issue.
Damn, I knew it wasn’t me 😸