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

Fix .perform() command node promise getting resolve early. #4348

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

garg3133
Copy link
Member

@garg3133 garg3133 commented Jan 6, 2025

When the .perform() command is used with async/await inside a test case (await browser.perform()) and the callback passed to the .perform() command contains more than 1 Nightwatch command, the node promise returned by the .perform() command get resolved early (after the execution of the first Nightwatch command inside the callback).

This leads to a situation where the rest of the command inside the callback starts to overlap with the commands following the .perform() command inside the test case, which could give unexpected results.

@garg3133 garg3133 marked this pull request as ready for review January 6, 2025 06:49
Copy link

github-actions bot commented Jan 6, 2025

Status

  • ❌ No modified files found in the types directory.
    Please make sure to include types for any changes you have made. Thank you!.

@garg3133 garg3133 merged commit df4d7fb into nightwatchjs:main Jan 6, 2025
17 checks passed
@garg3133 garg3133 deleted the perform-early-resolution branch January 6, 2025 06:55
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

Successfully merging this pull request may close these issues.

1 participant