Seeding data on before with lifecycle between steps #14519
Unanswered
BudaPavel
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good day.
I'm seeding data in database and want to do it on
before
and notbeforeEach
.On seeding data I simplify to commands and I can't store seeded object into alias, as Cypress core logic reset aliases on each step.
My solution is to have a global variable that would store my seeds and would be accessible between steps (sample bellow).
Questions:
cy.id
is id of each specification instance (when running in parallel)?Sample commands (
support/commands.js
):Sample usage (
demo_spec.js
):Beta Was this translation helpful? Give feedback.
All reactions