hello. what are the best practices for files struc...
# help
b
hello. what are the best practices for files structure in CY? I've made this structure but all files are displayed in cypress UI, even are not spec files.
a
Cypress will detect more than just
*.spec.js
files. As an example, we have some files named
foo.smoke.ts
which are picked up in smoke test runs by including
--spec './cypress/integration/**/*.smoke.ts'
in our test run script. If you're trying to define some custom commands or store some custom request data here, you might want to take a look at https://docs.cypress.io/api/cypress-api/custom-commands and https://docs.cypress.io/api/commands/fixture
b
thanks for help. I am not creating custom commands yet, but I decided to split requests from specs file to be easy maintened. I wouldn't like to see these files in Cypress UI.. If you know how to select specific files to be displayed I thank a lot...
a
You should stash this in
/support/commands.js
. Keep your
/integration/
directory clear for test files.
3 Views