Wait for step to complete execution before jumping into next step #1071
Unanswered
avinashk14
asked this question in
Q&A
Replies: 1 comment 8 replies
-
|
Use Cypress commands for resource creation. IE. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've been trying for one step definition to complete its execution (along with all its back-end calls) before jumping into the next step definition and executing its line, any help is greatly appreciated.
Example Scenario:
Step definitions:
What I am looking for is for the step 'I create a resource' to wait for all its lines executed and then the next step 'I should have the resource' executes.
From the console log, I expect to see: "I create a resource", " I should have the resource"; what I actually see: "I should have the resource", "I create a resource".
Is there a way for the step definition to wait? - Reason for asking is because we have a lot of scenarios where resource creation/fetch is the first step and the subsequent steps check on the resource, but they fail because the create/fetch step doesn't wait for the back-end call to finish.
(I'm at cypress v12.17.4 and cypress-cucumber-preprocessor v18.0.4)
Beta Was this translation helpful? Give feedback.
All reactions