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

demo the failure issue #9

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

demo the failure issue #9

wants to merge 3 commits into from

Conversation

tim-yao
Copy link
Member

@tim-yao tim-yao commented Nov 25, 2022

In my setup(Nightwatch programmatic API with cucumber-js), the Nightwatch API command won't fail the step, even if they do get the error.
Assert and Expect work as expected. If I use try catch, I can catch the error.

See the CI result: https://github.com/nightwatchjs-community/cucumber-nightwatch/actions/runs/3547793604/jobs/5958303663

To reproduce the issue, run

NIGHTWATCH_OUTPUT=true npm run test -- --tags "@fail"

The issue can't be reproduced in https://github.com/nightwatchjs/cucumberjs-boilerplate. So I guess something with my setup but really need some help to debug.

@gravityvi
Copy link
Member

Thanks @tim-yao for pointing this out. It's happening because we only reject promises for the waitFor command when the user uses cucumber-js as a test runner: https://github.com/nightwatchjs/nightwatch/blob/main/lib/core/asynctree.js#L95-97. The cucumber-boilerplate project uses cucumber runner in the config and hence the issue will not be reproduced over there. However, I think PR: nightwatchjs/nightwatch#3499 might fix the issue.

@tim-yao tim-yao mentioned this pull request Feb 18, 2023
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.

2 participants