Error occurs when referencing the upper hierarchy with specPattern
See original GitHub issueCurrent behavior
I execute test specs in the hierarchy above the folder specified by “–project”. By updating Cypress v10, integrationFolder option was removed and replaced with specPattern option. When I replace integrationFolder option with specPattern option and execute test specs, below error is happened.
Error: EINVAL: invalid argument, mkdir 'C:\Users\<user>\AppData\Roaming\Cypress\cy\production\projects\project-ebb3941567b10beb6f33096d39c6ad57\bundles\D:\ProgramData\workspace\sample\test'
My project strucutre is separated with settings folder and test spcec folder. So, I execute cypress with “–project” option.
- My project structure
<Project>
├─Path
│ └─to
│ └─project
│ ├─fixtures
│ ├─support
│ └─cypress.config.js
└─test
└─spec.cy.js
- Execute command
npx cypress open --project .\path\to\project
- cypress.config.js
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
specPattern: "../../../test/*.cy.js"
}
});
Cypress 9.x with integrationFolder don’t happen this problem.
Desired behavior
Cypress can execute test specs in the hierarchy above the folder specified by “–project”
Test code to reproduce
- cypress.config.js
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
specPattern: "../../../test/*.cy.js"
}
});
Cypress Version
10.0.2 (happens 10.0.0 and above)
Other
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Writing and Organizing Tests - Cypress Documentation
What you'll learn How to organize your test and support files. What languages are supported in your test files. How Cypress handles unit...
Read more >Organizing Test Suite - WebdriverIO
In general, try to test only a single feature per spec file. Try to not have too many or too few tests in...
Read more >Ginkgo test suite - GitHub Pages
This hierarchy is constructed using three kinds of nodes: We use container nodes like Describe and Context to organize the different aspects of...
Read more >gcc/ada/prj.ads - chromiumos/third_party/gcc - Git at Google
GNAT is free software; you can redistribute it and/or modify it under -- ... Reference to a project tree. ... The upper bound...
Read more >glom Documentation
glom is a new approach to working with data in Python, featuring: ... the top-level package is not documented, please file an issue...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Definitely a regression in v10. However, I’d like to point out that this isn’t “best practice” to set up your Cypress tests like this. You can use a central package to manage the
cypress
version and use--project
to point to acypress.config.js
per package.@flotwig Does this mean the Nx implementation of Cypress is not best practice? Were you referring to globs outside the cypress.config-directory or the use of a central package?