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

    thousands-house-85089

    12/12/2022, 4:04 PM
    This way you don't waste time doing a hard coded wait
  • m

    mysterious-psychiatrist-29678

    12/12/2022, 4:11 PM
    if I modify the code like this
    Copy code
    cy.get('.fxc-dropdown-input', {timeout: 37000})
      .eq(1)
      .should('be.visible')
    still not working as even the dropdown loaded the background JS scripts not at least I guess
  • m

    mysterious-psychiatrist-29678

    12/12/2022, 4:16 PM
    I've come across a possible solution that I can't implement as some JS magic happens here:
    Copy code
    const click = $el => $el.click()
    
     cy.contains(".fxc-dropdown-filter", "Resource group")
      .find(".fxc-dropdown-input")
      .should('be.visible')
      .click()
      .then(() => {
        cy.find('#form-label-id-2aria')
        .pipe(click)
        .should($el => {
          expect($el).to.be.visible
        }).
        cy.contains('ab-selenium-test-do-not-delete', {timeout: 15000})
        .cy.click()
  • t

    thousands-house-85089

    12/12/2022, 4:19 PM
    Yeah looks similar to what I was saying, first doing a 'be.visible' so the element is loaded, and use a .then() to get the further elements within the first.
  • t

    thousands-house-85089

    12/12/2022, 4:20 PM
    I think you'll need the 'be.visible' on its own, before doing any other assertion like eq(1)
    m
    • 2
    • 1
  • t

    thousands-house-85089

    12/12/2022, 4:20 PM
    Since that get element then be visible is just the holding for it to load part of the test, nothing is testable until that passes (which means it's loaded on the page)
  • b

    bitter-judge-96754

    12/12/2022, 7:42 PM
    Hello All, Is there a way to handle captchas on Cypress. I’m trying to click that box but no luck
  • n

    narrow-policeman-70631

    12/12/2022, 8:20 PM
    Hi all, does anybody knows if cypress has a way to disable web security for firefox?
  • m

    mysterious-belgium-25713

    12/12/2022, 10:10 PM
    First of all I would not try to automate captscha clicks because they are made to stop bots. If this is your application then i would suggest disabling it for automation purposes. Also the inner workings of a captscha is that it's an iframe pointing to another site. That's why you cannot select it with Cypress because you are crossing domains. Of course you could solve it with maybe using something like cy.origin but i would not try the effort.
  • b

    bitter-judge-96754

    12/12/2022, 10:34 PM
    Is there a way to disable it for autoy? It’s a important feature for my company so it would be nice to click it. I saw in another website that i need to use ChromeWebSecurity=false in order to handle it and then write some Cypress commands
  • a

    astonishing-window-24437

    12/13/2022, 7:24 AM
    Hi all, my test automation project always stuck on the same step, i can't find the issue. Help me please
  • f

    fresh-doctor-14925

    12/13/2022, 8:28 AM
    !moreinfo
  • n

    nutritious-analyst-96582

    12/13/2022, 8:28 AM
    Hey! You're unlikely to get an answer to this question because it is too broad and/or vague. Take a look at #how-to-get-help for some tips on how to improve your question
  • m

    mysterious-psychiatrist-29678

    12/13/2022, 8:29 AM
    other problem with my Cypress test is being exceptionally slow. logging in on the UI and get to the form to be tested lasts around 35 sec locally, while doing the same manually is not more than 7-8 sec. even my Selenium test runs around 10-12 sec, so something wrong is with Cypress here. I'm trying to login and test Azure integration. what could cause the issue (same browser, local env)?
    f
    • 2
    • 4
  • b

    better-mouse-45393

    12/13/2022, 10:58 AM
    If I remove it the config file : requestTimeout and responseTimeout - The Cypress will be still waiting 4000 ms by default?
  • t

    thousands-house-85089

    12/13/2022, 11:16 AM
    There are lots of timeout options with defaults: https://docs.cypress.io/guides/references/configuration#Timeouts
  • t

    thousands-house-85089

    12/13/2022, 11:17 AM
    Maybe check these and tweak as you need
  • s

    stocky-kilobyte-57323

    12/13/2022, 11:57 AM
    Copy code
    it.only("shows correct number of rows after deletion", () => {
          cy.create("App\\Models\\Place");
          cy.create("App\\Models\\Place");
          cy.create("App\\Models\\Place");
    
          cy.intercept({ method: "DELETE", url: "customers/places**" }).as(
            "deletePlaces"
          );
    
          cy.login({ email: "demo@example.com" });
    
          cy.visit({ route: "customers.places.index" });
    
          cy.get('[data-test="selectAll"]').click();
          cy.get('[data-test="deleteSelected"]').click();
          // cy.get('[data-test="modal"] [data-test="confirm"]').click();
    
          cy.wait("@deletePlaces").its("response.statusCode").should("eq", 303);
    
          cy.get("table")
            .find("tbody tr")
            .then((row) => {
              expect(row.length).to.equal(2);
            });
        });`
    After the the delete request, there's a get request. for some reason the table still contain 3 elements when it gets to the cy.get("table")
  • s

    stocky-kilobyte-57323

    12/13/2022, 11:57 AM
    What am i doing wrong?
  • p

    proud-tomato-54212

    12/13/2022, 12:04 PM
    Hello, I need help with the cypress gmail-tester plugin. it would be grateful if anyone can? I am getting "The task 'gmail:get-messages' returned undefined. You must return a value, null, or a promise that resolves to a value or null to indicate that the task was handled." this error when i am testing email using the plugin. I have asked questions in the cypress git repository but unfortunately no reply on this.
  • g

    gray-kilobyte-89541

    12/13/2022, 12:09 PM
    https://on.cypress.io/task is a good source of info about
    cy.task
    command
  • p

    proud-tomato-54212

    12/13/2022, 12:10 PM
    @gray-kilobyte-89541 I have followed the documentation but not any luck
  • g

    gray-kilobyte-89541

    12/13/2022, 12:24 PM
    well, since you have no posted any source code details, I think not completely
  • p

    proud-tomato-54212

    12/13/2022, 12:44 PM
    Can you please look into emailVerification.js file from this repo? I have set reproduction repo here https://github.com/VaghasiyaKrupal/cucumber-issue
  • a

    acceptable-tailor-43291

    12/13/2022, 1:21 PM
    Does
    cy.session
    with cacheAcrossSpec enabled not works in cypress run mode?
  • a

    acceptable-tailor-43291

    12/13/2022, 1:35 PM
    It seems not working in my tests
  • r

    rough-agent-43374

    12/13/2022, 2:06 PM
    Hello guys, im currently designing some tests and i was wondering what would be the best approach to reuse a whole test flow for different test files. The flow consist of multiple commands likes visit, type, click, etc. What does cypress offer for this case? Appreciate any hints, thanks!
  • f

    fresh-doctor-14925

    12/13/2022, 2:47 PM
    Does
    cy session
    with cacheAcrossSpec
  • f

    fresh-doctor-14925

    12/13/2022, 2:47 PM
    Hello guys im currently designing some
  • w

    wide-daybreak-98113

    12/13/2022, 4:49 PM
    Hey, I'm trying something but don't know if this is possible in Cypress. Got an API test with one long running request (SSE stream) which should end automatically when running another request (a logout). So.. I start the request to the event stream: cy.request("/sse") but BEFORE that I start the logout with a timeout: setTimeout(() => { cy.request("/logout" }, 500) .. which then throws a Cypress exception, saying something that internally commands are queued.. Any thoughts how to resolve this? Or do I have to resort to for example using a fetch command instead of using cy.request ?
1...167168169...192Latest