gray-kilobyte-89541
12/22/2022, 4:23 PM"scripts"
in your package.json
file?abundant-tailor-4878
12/22/2022, 4:30 PMacoustic-diamond-87641
12/22/2022, 5:16 PMdev-config.config.js
and staging-config.config.js
both contain different values for My_acc.email
and My_acc.password
).
My code worked when I only used 1 user profile and accessed it through a fixture like so.
cy.fixture("user").then((user_credentials) => {
cy.get(emailInputField).type(user_credentials.My_acc.email);
However, when I got rid of the fixture file and transferred the json information from my user fixture over to individual config files for user profile specification it didn't work. Here is my new code which fails.
Cypress.env().then((user_credentials) => {
cy.get(emailInputField).type(user_credentials.env.email);
The type error I received was this Cypress.env(...).then is not a function
This is my first question in this community and I thoroughly searched the docs first, but I could not find a answer in the Cypress.env
docs.fast-napkin-36711
12/22/2022, 7:42 PMgray-kilobyte-89541
12/22/2022, 8:04 PMbuild
parameter in your YMLfast-napkin-36711
12/22/2022, 8:38 PMgray-kilobyte-89541
12/22/2022, 10:15 PMfast-napkin-36711
12/22/2022, 10:39 PMstraight-rose-89671
12/23/2022, 8:19 AMstraight-rose-89671
12/23/2022, 9:43 AMstraight-rose-89671
12/23/2022, 11:28 AMBoot Laravel app:
- INFO Server running on [http://127.0.0.1:8080].
Next command:
waiting on "http://127.0.0.1:8080" with timeout of 60 seconds
ripe-traffic-15039
12/23/2022, 12:00 PMquaint-raincoat-85755
12/23/2022, 1:00 PMbest-hamburger-60297
12/23/2022, 2:29 PMbitter-fountain-36713
12/23/2022, 3:20 PMvictorious-engineer-43946
12/23/2022, 3:21 PMresults
folder to git? (or whichever folder you send your reporter output)gray-kilobyte-89541
12/23/2022, 6:28 PMprehistoric-oxygen-77880
12/23/2022, 6:34 PMclean-gpu-44016
12/24/2022, 2:30 AMsudo apt upgrade && sudo apt update
npm install --save-dev cypress
sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
then I followed the guide: https://nickymeuleman.netlify.app/blog/gui-on-wsl2-cypress
which led me to the output below (screenshot)
How should do I fix this?thousands-house-85089
12/24/2022, 11:19 AMthousands-house-85089
12/24/2022, 11:22 AMgreen-airplane-10074
12/24/2022, 3:37 PMgray-kilobyte-89541
12/24/2022, 3:45 PMgreen-airplane-10074
12/24/2022, 5:48 PMYou purposefully cannot do anything useful with the return value from a command.
I'll try to put the code under the "then()" block and see how it goes, so this has been very helpful to me.bitter-fountain-36713
12/24/2022, 7:03 PMkind-angle-5131
12/26/2022, 8:16 AMflaky-intern-13440
12/26/2022, 11:55 AMcypress.json
and the cypress/plugins/index.js
files into a single cypress.config.js
file and a separate "plugins file" (which used to default to cypress/plugins/index.js
) is no longer needed.
We use a lot of our custom made plugins like LaunchDarkly, GeneratorTask, DataSession, etc and so on..., so our cypress/plugins/index.js
is pretty massive for each service (we on a monorepo).
Can someone explain it to me please, with this Plugins File Removed update in Cypress v10, what exactly should I do with our index.js
file? Should I copy the everything (200+ lines of code) from that file and paste it into the cypress.config.js
under the e2e --> setupNodeEvents
? and then delete the index.js
file? I tried that, and it doesn't work.
Or, with this update, all what I need to do is:
setupNodeEvents(on, config) {
return require('../plugins/index')(on, config)
},
Is that right way to do it?
If the copy-paste the entire code from the index.js
and paste it into the cypress.config.js
is more preferable way, what I'm doing wrong? since that doesn't work for me.
Thank you in advance for any help.clever-judge-99709
12/26/2022, 11:59 AMthousands-gpu-36872
12/26/2022, 2:42 PMlimited-barista-33480
12/26/2022, 3:44 PM