magento2-cypress-testing-suite
magento2-cypress-testing-suite copied to clipboard
Consistent env var naming
Cypress will automatically take any env vars starting with CYPRESS_ and make them camelcased. The resulting var name will then be overlaid on the e2e settings in the config file as it is present in this repo.
So the value in CYPRESS_BASE_URL will always be overlaid on whatever you set here;
module.exports = defineConfig({
e2e: {
baseUrl: `whatever-you-set-here-will-be-overridden-with-CYPRESS_BASE_URL-if-set`,
}
}
See https://github.com/cypress-io/cypress/blob/a27affe4477da85f07a5075dc2fca3ae61d50489/packages/config/src/project/utils.ts#L83