Hey, I'm facing an unusual issue. I have a dialog window with a data-cy attribute added to it. In my cucumber scenarios, I have one like this:
Scenario: Users open dialog window
When the user clicks on the open dialog button
I've written Cypress code for this scenario as follows:
it('user click open dialog button', () => {
cy.get(element).click();
})
Everything works fine up to this point. However, in subsequent scenarios (separate Cypress tests described as it), I perform various actions on the dialog window such as adding text and making assertions. But when running each scenario separately, the dialog window closes immediately. If I combine these actions in the same scenario, everything works as expected. It seems like the window is being automatically closed when a new scenario starts. I've double-checked my code, and there is no action that should close the dialog. Could this be a feature of Cypress? I couldn't find any information about this behavior.
Thanks!