I have my cypress.config.ts like this
import { defineConfig } from "cypress";
export default defineConfig({
pageLoadTimeout: 360000,
defaultCommandTimeout: 60000,
env: {
EMAIL: "random@mail.com",
PASSWORD: "password"
}
});
And when I try to use this
cy.get("#emailField").type(Cypress.env('EMAIL'));
in my test is always returns undefined. I tried moving the env into JSON file cypress.env.json
but that didn't help. I also tried switching to javascript but the result was the same.
What am I doing wrong?