fresh-doctor-14925
06/14/2022, 9:09 AMgentle-accountant-4760
06/14/2022, 9:17 AMgentle-accountant-4760
06/14/2022, 9:18 AMgentle-accountant-4760
06/14/2022, 9:19 AMfresh-doctor-14925
06/14/2022, 9:20 AM.env
a lot. I map the commands like so in cypress/plugins/index.js
config.env.BASIC_AUTH = process.env.BASIC_AUTH;
That still works in v10gentle-accountant-4760
06/14/2022, 9:20 AMgentle-accountant-4760
06/14/2022, 9:20 AMfresh-doctor-14925
06/14/2022, 9:22 AM.env
, but it's not the case
.env
will provide variables to node, but not cypress. The snippet I shared above will solve your problem
It's the same reason why you need to prepend CYPRESS_
to any Cypress env vars in your run command. Otherwise they go to Nodegentle-accountant-4760
06/14/2022, 9:23 AMfresh-doctor-14925
06/14/2022, 9:24 AM.env
and that snippet to map it to cypress.env(), you should be goodfresh-doctor-14925
06/14/2022, 9:25 AMconfig.env
is just a way to access Cypress.config("env")
gentle-accountant-4760
06/14/2022, 9:25 AMgentle-accountant-4760
06/14/2022, 9:25 AMgentle-accountant-4760
06/14/2022, 9:26 AMgentle-accountant-4760
06/14/2022, 9:26 AMfresh-doctor-14925
06/14/2022, 9:27 AMripe-beard-71956
06/14/2022, 9:27 AMgentle-accountant-4760
06/14/2022, 9:28 AM.env
which has value: BASIC_AUTH=Hello:world
That was in my top level folder meaning in heregentle-accountant-4760
06/14/2022, 9:29 AMgentle-accountant-4760
06/14/2022, 9:29 AMbrave-processor-66066
06/14/2022, 9:57 AMbumpy-library-92619
06/14/2022, 1:12 PMancient-park-71356
06/14/2022, 2:05 PMbrash-tiger-52405
06/14/2022, 2:58 PMpolite-france-34211
06/14/2022, 7:44 PMfindByPlaceholderText("Password")
is not finding anything. Password fields don't have placeholders. You'd probably want to do something like findByLabelText()
?dazzling-salesclerk-15570
06/14/2022, 9:34 PMechoing-painting-40909
06/14/2022, 11:30 PMechoing-painting-40909
06/14/2022, 11:32 PMdazzling-salesclerk-15570
06/15/2022, 12:30 AM"target": "es6"
dazzling-salesclerk-15570
06/15/2022, 12:30 AMcy.origin