Do some check after each step before to run the next step #4242
Replies: 2 comments 1 reply
-
You should wrap your code in recorder event.dispatcher.on(event.step.finished, async (step) => {
await recorder.add('wait to hide after each step...', async () => {
await step.helper.waitToHide('.loading');
}, true);
}); |
Beta Was this translation helpful? Give feedback.
1 reply
-
I believe this is not possible via the events Hook, but I was able to make this happen by using the _afterStep event in a custom Helper: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
To limit the failure of my tests, I want to wait for something after each step. Only when this check is done, script can continue with next step, etc.
For example, after each step I would like to wait for any class ".loading" to not be present in the DOM before to continue to next step.
I tried to use the event hook but it seems to not wait for the events to finish and it does not block the next step:
Not sure if I am doing this properly, but waiting for this class to not be present will grandly increase the success of the tests. I tried with all steps events already but no luck so far. So my guess is that possible but somewhere else.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions