Closed Tree55Topz closed 5 years ago
@Tree55Topz I looked at your spec file and you have functions returning void which implies you are executing synchronous code. Antiope.landingPage().goTo();
returns a promise though. Instead of void you should return the promise and it should then wait.
return expect(Antiope.landingPage().title()).to.eventually.equal(expectedTitle)
is not synchronous either since you're not waiting for it to finish before returning. Try using the callback style and do expect(Antiope.landingPage().title()).to.eventually.equal(expectedTitle).and.notify(callback);
. Then it should wait.
After much time, I was finally able to implement cucumber-tsflow using this example https://github.com/orieken/cucumber-tsflow-example
However, one thing I am experiencing is the steps all pass before the test even completes running. Normally, I would need to include a return in both the step definitions and page object function for the steps to complete one by one.
How can we get the steps to run independently to find where the failure was? Currently, they will all show up as pass and then you would get the error message afterwards not attached to the step definition that it failed on