On updating to 2.0.0-beta.1, commands no longer running in expected order #2948
Unanswered
MicahLC
asked this question in
Help Needed
Replies: 1 comment 6 replies
-
Ok, I see what's wrong. Can you share the custom commands? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I had been on an older version of Nightwatch with some very small modifications, basically Nightwatch v1.6.4. I'm trying to update to Nightwatch 2.0.0, and I'm on beta-1, and seeing weird behavior.
Every test starts with a custom command,
setupTest
, that sets the size of the window appropriately, goes to a quick-loading test URL, and sets necessary cookies. Here's what the beginning of that command looks like:Here's what the beginning of my test looks like:
On v1.6.4, here's what the beginning of the verbose output looks like, starting once the session ID is received:
On 2.0.0-beta-1, here's the verbose output, starting at the same point:
You can see that the order of output in the second one is different, with some commands starting before the prior command has finished (or at least logged that it has finished). This behavior continues as the test runs. There is also a point where a custom command named
goToMatchingProduct
that only executes aperform((client, done) => {...}
command is considered to be finished right away, even though you can see theperform
call finishes later:And for reference, here's what that sequence looks like on v1.6.4:
I have made no changes to my Nightwatch settings, just browser settings (to be able to use W3C with newer versions of Chrome). Is this an expected breaking change with the new version of Nightwatch? If so, how should I be rewriting these tests and commands to work?
@beatfactor this is the issue I had mentioned seeing in #2584.
Beta Was this translation helpful? Give feedback.
All reactions