forked from Klaveness-Digital/cypress-cucumber-preprocessor
-
-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Labels
Description
Current behavior
The Before and After hooks will only run when tests pass.
Desired behavior
We want to be able to use the cucumber style After hook to run some test cleanup, even when tests fail. But currently the After hook will only run when the test passes.
Using the cypress afterEach hook is an option but it would be nice to use the cucumber After hook as it supports @tags
Test code to reproduce
Here is a link to an older test feature file from the cypress repo which illustrates the issue. The scenarios that illustrate this problem are commented out as they cause steps to fail, (Scenario: With Untagged After having test errors in steps part 1 & 2). The steps file only needed a minor tweak to pull { Given, Then, After, Before } from the right place.
Versions
- Cypress version: [email protected]
- Preprocessor version: @badeball/[email protected]
- ** esbuild version**: @bahmutov/[email protected]
- Node version: v16.14.0
Checklist
- I've read the FAQ.
- I've read Instructions for logging issues.
- I'm not using
[email protected](package name has changed and it is no longer the most recent version, see #689).
wou6, gbiryukov and DiogoBett