You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cypress.spec.name is set to the relative path of the spec file when:
single spec file is ran in gui mode
single spec file is ran in cli mode
multiple spec files are ran in cli mode
However, when all spec files are ran in test runner via the "Run x integration specs button" Cypress.spec.name is set to "All Integration Specs".
In my application we need to set a few environment variables before every test suite and those variables correspond to the name of the subdirectories where the spec files are kept. Currently the variables are set like this: let segment = Cypress.spec.name.split('\\')[0] let country = Cypress.spec.name.split('\\')[1]
Because of this inconsistent behavior whenever we try to run all integration specs via gui runner Cypress throws an exception.
Desired behavior
Cypress.spec.name is set to the relative path of the spec file regardless of the manner in which tests were launched
Current behavior
Cypress.spec.name is set to the relative path of the spec file when:
However, when all spec files are ran in test runner via the "Run x integration specs button" Cypress.spec.name is set to "All Integration Specs".
In my application we need to set a few environment variables before every test suite and those variables correspond to the name of the subdirectories where the spec files are kept. Currently the variables are set like this:
let segment = Cypress.spec.name.split('\\')[0]
let country = Cypress.spec.name.split('\\')[1]
Because of this inconsistent behavior whenever we try to run all integration specs via gui runner Cypress throws an exception.
Desired behavior
Cypress.spec.name is set to the relative path of the spec file regardless of the manner in which tests were launched
Test code to reproduce
Link to fork:
https://github.com/Yethal/cypress-test-tiny
Versions
6.4.0
The text was updated successfully, but these errors were encountered: