-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Repetitive actions execution question #1976
Comments
Guys, is this expected behavior? Should I elaborate on details? Once I commenting out |
@uoziod is there a reason for |
Indeed. I've been using them for other purposes, but refactored code and now it works fine. Thanks for pointing out! |
@uoziod yes, @bkucera is right, you were mixing up async / Promise code with Cypress, which is never necessary. You also weren't returning like this This is one of the reasons I don't like the idea of conforming to You can read more here: #1417 |
I have some repetitive actions in my tests, so I moved them to a separate functions out of actual tests and calling them from tests assuming that they'd be executed just as bunch of commands:
Although in this particular case I see that functions
one
andtwo
will be called only inTest 2
, whereasTest 1
will run onlycy.get("...
, thenTest 2
will start straight away.Might be that I'm just approaching the problem from an incorrect way.
In any case, suggestions are much appreciated)
The text was updated successfully, but these errors were encountered: