This framework tries to give solution for pageobjects and common utils
Open Cypress tool to run tests:
npx cypress open
Run all tests:
npx cypress run
Run single spec file:
npx cypress run --spec "cypress/e2e/SPEC_FILE_NAME.cy.js"
Run spec folder:
npx cypress run --spec "cypress/e2e/FOLDER_NAME/*.cy.js"
How to pass baseUrl via CLI: (Logic Defined in cypress.config.js)
npx cypress run --env base_url=ADD_BASEURL_SWITCH_HERE
npx cypress run --spec "cypress/e2e/ok.cy.js" --env base_url=qa
Run Tests via custom command / script in CLI: (Logic Defined in package.json)
npm run cy:qa