My test suite contains several 'it' sections within the 'describe'.
If one of the 'it' sections fails (e.g. if it can't find an element) - it jumps straight to the next 'it' section and carries on the test.
If an 'it' section fails I just want the test to stop running and be marked as a fail.
How do you do this?
The solution to this was to use the
bail
flag within the mochaOpts section ofwdio.conf
as shown here:Thanks to @leun4m for this answer