magento2-cypress-testing-suite icon indicating copy to clipboard operation
magento2-cypress-testing-suite copied to clipboard

Consistent env var naming

Open peterjaap opened this issue 3 years ago • 0 comments

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

peterjaap avatar Sep 14 '22 15:09 peterjaap