You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The nightwatch example for Cucumber js includes return statements before all browser commands, e.g. return browser.assert.titleEquals(title);See the example here.
In practice, omitting the return statement before browser.assert (and maybe others) leads to unexpected behavior, like tests passing when assertions fail. However, this does not seem to be specified in the nightwatch documentation for using Cucumber with nighwatch, or for Assertions.
The text was updated successfully, but these errors were encountered:
ctbaird
changed the title
Potential gap in documentation for using cucumber with nighwatch
Potential gap in documentation for using cucumber with nightwatch
Sep 5, 2024
The nightwatch example for Cucumber js includes
return
statements before all browser commands, e.g.return browser.assert.titleEquals(title);
See the example here.In practice, omitting the
return
statement beforebrowser.assert
(and maybe others) leads to unexpected behavior, like tests passing when assertions fail. However, this does not seem to be specified in the nightwatch documentation for using Cucumber with nighwatch, or for Assertions.This is confusing because the syntax differs from that in the Cucumber documentation.
Why is the
return
necessary?The text was updated successfully, but these errors were encountered: