cypress-example-recipes
cypress-example-recipes copied to clipboard
Fixtures loaded through require, wont load when running all specs
When using the following example: examples/fundamentals__fixtures/cypress/integration/require-fixtures-spec.js
fixtures are located in subfolders, and therefore traversed up the folder tree, e.g.: require('../some-folder/some-file-here)
Which works fine when running the single test spec - but when running all specs through the "Run all specs" button, errors occur as it can't find the fixture files. Probably because the folder path is relative to the individual test specs and not the overall folder structure.
How to recreate:
- Follow your own example at examples/fundamentals__fixtures/cypress/integration/require-fixtures-spec.js
- Run via "Run all specs".
@Sandstorm84 we need more information with screenshots to even recreate this problem. Right now I have tried running these tests in as many combinations as possible, even checking if __dirname
and __filename
is set by the bundler correctly in https://github.com/cypress-io/cypress-example-recipes/pull/326