Support onAfter
Open
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 621
- PR merge metrics
- No merged PRs in 30d
Description
In some cases, a callback is needed after each scenario is tested. Similar to all the other testing frameworks that provide `afterEach`, it would be very useful to support `onAfter`.
In my case, because the back-end has limited number of active sessions, I need a callback to log out the testing account after each scenario.
I'd love to have something similar like `onAfterScript`, and then I can simply do this
```
// onAfter.js
module.exports = async (page, scenario, vp) => {
await page.evaluate(() => logout());
};
```
Contributor guide
Assessment
This issue has not been assessed yet.