You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a suite is provided a config argument with an env property, and a contained test is also provided a config argument with an env property, the test's enventirely replaces the suite's env.
Desired behavior
Properties of the test's configenv should override/merge into the suite's configenv, similarly to how the rest of the config/env overrides work.
Test code to reproduce
describe('Suite with a config env',{env: {var0: 'I was set on the suite!',var1: 'I was set on the suite!'}},()=>{it('Test with a config env',{env: {var1: 'I was set on the test!'}},()=>{expect(Cypress.env('var0')).to.exist.and.to.equal('I was set on the suite!')// AssertionError: expected undefined to existexpect(Cypress.env('var1')).to.exist.and.to.equal('I was set on the test!')})})
Versions
Cypress 7.1.0
The text was updated successfully, but these errors were encountered:
@tricus Thank you for logging this issue. I was able to reproduce your issue with Cypress 9.2.1. This does appear to be a duplicate of #8005, so I'm closing in favor of the older issue.
Current behavior
When a suite is provided a
config
argument with anenv
property, and a contained test is also provided aconfig
argument with anenv
property, the test'senv
entirely replaces the suite'senv
.Desired behavior
Properties of the test's
config
env
should override/merge into the suite'sconfig
env
, similarly to how the rest of the config/env overrides work.Test code to reproduce
Versions
Cypress 7.1.0
The text was updated successfully, but these errors were encountered: