Based on the Cypress documentation, we can run multiple test files using this syntax
cypress run --spec "cypress/e2e/examples/actions.cy.js,cypress/e2e/examples/files.cy.js"
My question is when I have to run 4 of 10 test files in the same folder i have to define like this,
cypress run --spec "cypress/e2e/**/test1.cy.js,cypress/e2e/**/test2.cy.js,cypress/e2e/**/test3.cy.js,cypress/e2e/**/test4.cy.js"
Can we make simplify it, idk is cypress has a feature for defining the spec folder?
So if we can define the folder test spec path like specFolder = cypress/e2e/**/
and I just write script
cypress run --spec "test1.cy.js,test2.cy.js,test3.cy.js,test4.cy.js"
You can run all tests in a specified directory as documented here https://docs.cypress.io/guides/guides/command-line#cypress-run-spec-lt-spec-gt
So try to run all the tests in a directory like so