Hm.. So `t.exit()` has to throw the exception - no other way to interrupt the test. I'll revert that.
Re: Exit test on fail in subtest
Posted: Thu May 14, 2020 11:15 am
by nickolay
Thank you for the patience. Reverted to always throw the exception and improved `waitFor` handling. Please verify the new behavior in the tomorrow nightly.
Re: Exit test on fail in subtest
Posted: Fri May 15, 2020 11:11 am
by paulb
Nice work nickolay! It works as expected and will be a major improvement in our workflow. Thanks a lot, really appreciated!
Do you already know when the next stable release with this feature will be available?
Re: Exit test on fail in subtest
Posted: Fri May 15, 2020 11:14 am
by nickolay
You are welcome! We are planning 5.5.0 release in a week or two (it is stable already and nightly is pretty much the same).
Re: Exit test on fail in subtest
Posted: Fri May 15, 2020 1:38 pm
by paulb
Sorry to bother you again but I found way to break your breakTestOnFail config.
When the test fails due to an exception within the tested code the next subtest is launched. Change 'Subtest 2' to:
st.it('Subtest 2', function(sst) {
sst.chain(function(next) {
sst.is(2, 2);
sst.foo(); // sst.foo is not a function
sst.waitForElementVisible('foo', next);
}, function(next) {
sst.waitForElementVisible('foo', next);
sst.is(3, 3);
});
});
When you run the given example, 'Subtest 3' is executed.
Re: Exit test on fail in subtest
Posted: Fri May 15, 2020 1:40 pm
by nickolay
He-he, thank you for the report, I'll check soon.
Re: Exit test on fail in subtest
Posted: Fri May 15, 2020 5:23 pm
by nickolay
Covered with the test and fixed.
Re: Exit test on fail in subtest
Posted: Mon May 18, 2020 7:13 am
by paulb
Thanks again nickolay! Tested the nightly and works like a charm!