Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delaySnapshot env config #161

Open
tsirlucas opened this issue Jun 20, 2024 · 2 comments
Open

Add delaySnapshot env config #161

tsirlucas opened this issue Jun 20, 2024 · 2 comments

Comments

@tsirlucas
Copy link

Is your feature request related to a problem? Please describe.
I have similar problem you propose to solve using delay env config. But instead of waiting for an animation in the generated storybook, i want to wait a few ms before taking the snapshots. More specifically before cy.document() call.

Describe the solution you'd like
Basically following check before cy.document() call would do:

if (Cypress.env("delaySnapshot") {
cy.wait(Cypress.env("delaySnapshot"))
}

Describe alternatives you've considered
Currently I've patched the package and added it myself. I can open the PR if you guys want.

Additional context
N/A

@tevanoff
Copy link
Contributor

tevanoff commented Jul 5, 2024

@tsirlucas thanks for the suggestion! If possible, we'd like to leverage the testing framework to help with this. Could this be accomplished by using cy.wait or another Cypress method to wait for an element in the relevant tests?

@tsirlucas
Copy link
Author

yes its possible. in fact, its what i've done basically. it would be easier to have it as a config but im good with my workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants