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 using nested steps the variables are not stored when using a cy.fixture. This doesn't happen if I don't use nested steps. I put 2 examples, the first fails the second passes successfully. behavior is different
Desired behavior
I expected the variables to be stored just like when nested steps are not used
Test code to reproduce
Feature: nesten steps
Scenario: invoking step from another step
Given a file named "cypress/e2e/a.feature" with:
"""
Feature: a feature name
Scenario: nested steps with cy.fixture
Given a nested step
Scenario: no nested steps
Given first nasted step
And second nasted step
"""
And a file named "cypress/fixtures/anyFixture.json" with:
"""
{}
"""
And a file named "cypress/e2e/a.js" with:
"""
const { Given, Step } = require("@badeball/cypress-cucumber-preprocessor");
Given("a nested step", function() {
Step(this, "first nasted step");
Step(this,"second nasted step")
});
Given("first nasted step", function() {
cy.fixture("anyFixture").then((fixtureJson)=>{
this.randomText = "Hello world"
})
});
Given("second nasted step", function() {
expect(this.randomText).to.equal("Hello world");
});
"""
When I run cypress
Then it passes
Current behavior
When using nested steps the variables are not stored when using a cy.fixture. This doesn't happen if I don't use nested steps. I put 2 examples, the first fails the second passes successfully. behavior is different
Desired behavior
I expected the variables to be stored just like when nested steps are not used
Test code to reproduce
Versions
Checklist
[email protected]
(package name has changed and it is no longer the most recent version, see #689).The text was updated successfully, but these errors were encountered: