https://cypress.io logo
Join Discord
Powered by
# help
  • m

    microscopic-advantage-2187

    08/19/2022, 10:01 AM
    I resolved the issue passing config as key value like this
    Copy code
    shell
    "npx cypress run --config \"excludeSpecPattern\"=[\"**\/Sys\/*\"]\"
    instead of json object did the trick but on Linux both conventions work
  • b

    brief-toddler-73066

    08/19/2022, 1:21 PM
    Good Morning I need help migrating from 9.7.0 to 10.3.1, specifically with setting up certificates. I'm getting an SSLV3_ALERT_HANDSHAKE_FAILURE from Node.js Internals. The tests run in 9.7.0. I just need a push in the right direction... do I need to define ClientCertificates or is this part of setting up node events? Help please! 😄
  • b

    brief-toddler-73066

    08/19/2022, 2:50 PM
    I suspect this is either a very difficult problem or I'm not asking correctly. (I'm new to cypress so that second one is likely)
  • i

    important-nest-99734

    08/19/2022, 4:10 PM
    What happens if you just make a new fresh folder with cypress 10. Do you get the same issue?
  • s

    shy-minister-18411

    08/19/2022, 5:32 PM
    does anyone have a good strategy for testing a loading indicator state? I'm trying to do something before the request is successful but it's a race condition and half the time it fails
  • s

    shy-minister-18411

    08/19/2022, 5:33 PM
    i don't want to add a hard delay, though i guess that is a potential solution
  • s

    shy-minister-18411

    08/19/2022, 5:33 PM
    Copy code
    cy.intercept("POST", "/something").as("request");
    cy.get("button").contains("Save").click();
    cy.contains("Saving").should("be.visible");
    cy.wait("@request")
  • s

    shy-minister-18411

    08/19/2022, 5:34 PM
    basically like this
  • s

    shy-minister-18411

    08/19/2022, 5:35 PM
    i tried this
  • s

    shy-minister-18411

    08/19/2022, 5:35 PM
    Copy code
    cy.intercept("POST", "/request", (req) => {
          cy.contains("in progress").should("be.visible");
        }).as("relations");
  • s

    shy-minister-18411

    08/19/2022, 5:35 PM
    and Cypress got mad
  • g

    gray-kilobyte-89541

    08/19/2022, 5:36 PM
    https://glebbahmutov.com/blog/cypress-out-of-band/ and https://glebbahmutov.com/blog/negative-assertions/#loading-element
  • g

    glamorous-country-57678

    08/19/2022, 5:41 PM
    was wondering if could get some help on an issue i was having -- made a stackoverflow about it: https://stackoverflow.com/questions/73419842/100-requests-sent-in-500ms-unnecessarily-using-cypress-why
  • s

    shy-minister-18411

    08/19/2022, 5:41 PM
    hmmm okay, so where would i put the
    .then
    then? If i did it after the click, the request seems to already be fulfilled and i can't test correctly
  • s

    shy-minister-18411

    08/19/2022, 5:43 PM
    yes i could test that the loading indicator isn't there, but the problem is that the loading indicator actually has some text i need to test ( I.e., X/Y in progress)
  • g

    gray-kilobyte-89541

    08/19/2022, 5:44 PM
    You just need to slow down the request, right...
  • s

    shy-minister-18411

    08/19/2022, 5:45 PM
    that would work but I really don't like adding arbitrary delays in my tests
  • s

    shy-minister-18411

    08/19/2022, 5:46 PM
    if i added delays everywhere i needed to test loading indicators, it would add minutes to my test runs
  • g

    gray-kilobyte-89541

    08/19/2022, 5:47 PM
    I am sorry I don't understand. You want to delay this particular network request to see the loading element. Yet you don't want to add delays everywhere. Why would you add delays everywhere?
  • s

    shy-minister-18411

    08/19/2022, 5:48 PM
    i want to test the indicator before the request fulfills
  • s

    shy-minister-18411

    08/19/2022, 5:49 PM
    not add an arbitrary delay
  • s

    shy-minister-18411

    08/19/2022, 5:49 PM
    does that make sense?
  • s

    shy-minister-18411

    08/19/2022, 5:50 PM
    when i say i'd add delays everywhere, i mean in other tests for other areas of the app
  • s

    shy-minister-18411

    08/19/2022, 5:53 PM
    it looks like the lowest delay i can introduce while still testing the indicator is 25ms, but i'm on a fast mbp, so what happens when it's on a CI server that's got less resources
  • g

    gray-kilobyte-89541

    08/19/2022, 5:57 PM
    I am sorry, then I don't understand what you are looking to do. Anyway, unfortunately testing the loading element is not a free lesson spec04 in my https://cypress.tips/courses/network-testing but this is the starting point for anyone who wants to practice this particular problem https://github.com/bahmutov/fastify-example-tests/blob/main/cypress/integration/spec04.js
  • s

    shy-minister-18411

    08/19/2022, 6:39 PM
    okay thanks
  • b

    brief-toddler-73066

    08/19/2022, 6:52 PM
    Yes, I tried just to visit the index page and it threw the same exception.
  • f

    flaky-intern-13440

    08/20/2022, 1:16 AM
    Hello all. I am looking for help in setting up cypress to override my IP address with a fake one. Problem: We're running cypress tests on a GitHub Actions CI machines from the US. We need to have tests in which the IP address will be replaced with Canadian. The application under test determines the location by IP address. How is it possible to make some cypress-specific tests run with an imitation of their geolocation using an IP address from Canada? Geolocation substitution by coordinates is not suitable for us, since our application does not look at gps coordinates (latitude and longitude), we determine the location solely by the IP address. Our entire architecture is built on server less architecture AWS Lambda's (US East 1). Idea: The idea is that some tests should be run from the US and some should be simulated from a specific province in Canada. We are interested in Quebec and any non-Quebec province. And depending on the location by IP address, we will provide the client with different relationship scenarios and different language. Thanks in advance to anyone who can help.
  • m

    most-businessperson-30778

    08/20/2022, 11:40 AM
    I want to verify download image
  • m

    most-businessperson-30778

    08/20/2022, 11:40 AM
    but Don't know how to
1...131132133...252Latest