https://cypress.io logo
Join Discord
Powered by
# e2e-testing
  • w

    wonderful-wire-43244

    08/25/2022, 9:29 AM
    thx
  • p

    purple-shampoo-89307

    08/25/2022, 12:23 PM
    @gray-kilobyte-89541 @nutritious-restaurant-91514
  • m

    melodic-egg-83620

    08/25/2022, 1:01 PM
    How do you get Cypress, using Webpack internally, to compile import.meta.env into process.env when using Vite instead of webpack for your project bundler? I can't run any E2E tests because Cypress fails to read any import.meta.env ENV variables and believes it's a syntax error.
  • g

    gray-kilobyte-89541

    08/25/2022, 1:23 PM
    I am glad you tagged me, as I don't have an answer. But just follow https://glebbahmutov.com/blog/test-app/ and it should be the same
  • m

    melodic-ocean-83158

    08/25/2022, 1:55 PM
    if (Cypress.env('enviroment') === "prod") { Cypress.env('user', Cypress.env('userProd')) } else if (Cypress.env('enviroment') === "qa") { Cypress.env('user', Cypress.env('userDev')) } else if (Cypress.env('enviroment') === "dev") { Cypress.env('user', Cypress.env('userQa)) }
  • m

    melodic-ocean-83158

    08/25/2022, 1:55 PM
    this?
  • m

    melodic-ocean-83158

    08/25/2022, 1:57 PM
    in github actions help you? I use this method to do this:

    https://www.youtube.com/watch?v=-lI1LjhB_FE&ab_channel=Keith%2CtheCoder▾

  • h

    hallowed-lighter-4305

    08/25/2022, 2:29 PM
    Hi @melodic-ocean-83158 , how are you? Yes, that's okay. and so the environment variable in the cypress.env.json file is only for prod how can it be implemented in this part so that the environment is differentiating, that is "environment": "prod", "environment": "qa", "environment": "dev" Thanks a lot!!
  • m

    melodic-ocean-83158

    08/25/2022, 2:50 PM
    It must be an environment variable of the location where it will be executed. If it is in the developer's machine, he must fill it in along with his usernames and passwords. If it's the case of an automated deploy/delivery, like a github action, you should use a github "repository secret" to manage your .env files.
  • f

    famous-magazine-77222

    08/25/2022, 3:26 PM
    Hi Team, How can I interact with chrome extension using Cypress ? Use case : My Blockchain app interacts with chrome extension Metamask to perform Transaction e.g. 1. In my web application when I click on button it launches chrome extension 2. Then I switch focus from my application to chrome extension & inside chrome extension I want to click button & perform some action. 3. After this I want to return back to my application. How can I achieve above steps in Cypress ? Do you have any reference for this
  • a

    acceptable-hamburger-48790

    08/25/2022, 3:45 PM
    Have a read on https://github.com/cypress-io/cypress/issues/1965
  • h

    hallowed-lighter-4305

    08/25/2022, 5:05 PM
    ok. @melodic-ocean-83158 Thank you very much for your help, I'm going to carry out the implementation, I think I know how to do it and if I have any questions, I'll ask you, if you don't mind.
  • f

    famous-magazine-77222

    08/25/2022, 5:31 PM
    Thank You @acceptable-hamburger-48790 , I will check on this.
  • h

    hallowed-lighter-4305

    08/25/2022, 6:01 PM
    Hi @melodic-ocean-83158 I am implementing this in the cypress.env.json file and I have this problem with the environment variable, how can I fix it?
  • h

    hallowed-lighter-4305

    08/25/2022, 6:02 PM
    @melodic-ocean-83158
  • m

    melodic-ocean-83158

    08/25/2022, 6:09 PM
    Dude, looking to this code I see that you are very confused. Delete the lines 8 and 13.
  • m

    melodic-ocean-83158

    08/25/2022, 6:12 PM
    Line 3 is your parameter of which user you want to use in the .spec file. If you change the "prod" of line 3 to "dev" or "pre", you will change the user with your test will run
  • h

    hallowed-lighter-4305

    08/25/2022, 6:27 PM
    @melodic-ocean-83158 OK Dude! Now I understand you much better. sorry I'm very new to using this framework so I try to understand little by little. In this case, then, it is only changing the value of environment in line 3, if it is a development environment, I add dev and if it is a test environment, I add qa and the same happens with the production environment? and you are right lines 8 and 13 do not go
  • m

    melodic-ocean-83158

    08/25/2022, 6:33 PM
    yep. if you change the value of "environment" will change the users used to run your login tests.
  • h

    hallowed-lighter-4305

    08/25/2022, 7:42 PM
    @melodic-ocean-83158 OK perfect! thanks Dude. I'm going to test it and if I have any questions, I'll ask you. But I think that with this explanation it should work. 👍
  • c

    cold-van-45410

    08/26/2022, 5:43 AM
    i done successfully install percy plugins but still it show custVisualPercyConfig.json did not find
  • c

    cold-van-45410

    08/26/2022, 5:43 AM
    give me any solution for it
  • c

    cold-van-45410

    08/26/2022, 5:59 AM
    plzz give solution asap
  • c

    cold-van-45410

    08/26/2022, 6:56 AM
    ??
  • r

    rich-london-78329

    08/26/2022, 7:26 AM
    Hi there, I was wondering if it's possible to collect istanbul coverage from an e2e test in Cypress 10?
  • r

    rich-london-78329

    08/26/2022, 7:30 AM
    Looks like the official docs are for older versions of Cypress. I've imported it in my support e2e.ts and called it in my cypress.config.js in e2e setupNodeEvents, but no joy yet. It doesn't even create the coverage folder.
  • r

    rich-london-78329

    08/26/2022, 7:30 AM
    No errors, just silence
  • g

    gray-kilobyte-89541

    08/26/2022, 11:59 AM
    yes, it is possible, check your install again
  • a

    average-soccer-69770

    08/26/2022, 2:24 PM
    Hi all, is there any documentation/article/blog that describes how to mock eventSource SSE events in a cypress e2e test? I am struggling with this but can't seem to find any resources online...
  • g

    gray-kilobyte-89541

    08/26/2022, 3:41 PM
    lesson "Bonus 22: Stub server-side events (SSE)" in my https://cypress.tips/courses/network-testing
1...899091...192Latest