"spec" strategy does not work in headed mode
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
When test file A fails (with failFast enabled), failFast plugin is skipping future test spec that also has failFast enabled.
To Reproduce Steps to reproduce the behavior
cypress.json
"env": { "FAIL_FAST_PLUGIN": true, "FAIL_FAST_ENABLED": false },
failFast1.js
describe('in failFast1', { "failFast": {"enabled": true} }, function() { it('failFast1', function() { cy.log('testing in failFast1 file'); expect(1).equal(0); }) })
failFast2.js
describe('in failFast2', { "failFast": {"enabled": true} }, function() { it('failFast2', function() { cy.log('testing in failFast2 file'); expect(2).equal(1); }) })
failFast3.js
describe('in failFast3', { "failFast": {"enabled": true} }, function() { it('failFast3', function() { cy.log('testing in failFast3 file'); expect(3).equal(2); }) })
Expected behavior A clear and concise description of what you expected to happen.
I assume it would only failFast the describe in existing test spec, and not future ones.
Logs If applicable, add logs to help explain your problem.

** Operating system, Node.js an npm versions, or browser version (please complete the following information)😗*
- OS: [e.g. Ubuntu 18.04] - Mac
- Node.js: [e.g. 8.11.1] - v12.18.4
- npm: [e.g. 5.6.0] - 6.14.10
- Browser: [e.g. Chrome 73.0.3683] - Electron 87
- failFast: 2.3.2
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (6 by maintainers)
Thanks, @javierbrea - it’s working. I thought we cannot configure it in multiple places and hence felt it was not working…
@hansiemithun , That configuration only has sense if you have the plugin completely disabled using environment variables and you want to enable it only for that test: https://github.com/javierbrea/cypress-fail-fast#configuration-by-test.
If you want to skip all other tests in the same spec file whenever one fails, then you should have this environment variables in your
cypress.json
file: