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

    ancient-notebook-96284

    11/03/2022, 8:07 PM
    Hello, just wanted to ask for help on my team's cypress tests. They have been inconsistently passing and failing. Most of the fails are due to timeouts. We've added retries and timeouts to our config but that has not help solve our issue. But what makes it difficult, is that it randomly will pass but also randomly fail. Any help would be greatly appreciated. This has been a major blocker for us.
  • g

    gentle-processor-97604

    11/03/2022, 8:10 PM
    I had almost similiar problem, when I use wait(7000) and start test from npx cypress open, this solved my problem
  • a

    ancient-notebook-96284

    11/03/2022, 8:13 PM
    It also seems like Cypress is telling us the request is never being made. However, we can see the request being made and not being stubbed even with a cy.intercept().
  • g

    gifted-van-38756

    11/03/2022, 8:13 PM
    How can i interact with an extention popup that requires the user to press an Accept button?
  • a

    ancient-notebook-96284

    11/03/2022, 8:14 PM
    we tried wait(10000) but that still did not work for us :/
  • g

    gentle-processor-97604

    11/03/2022, 8:16 PM
    I forgot to add that i used in same it() block, ( i was using different it() block, closed vscode and sterted by npx cypress open, it worked for me
  • a

    ancient-notebook-96284

    11/03/2022, 8:18 PM
    we are also using it in the same it() block 😭
  • g

    gentle-processor-97604

    11/03/2022, 8:22 PM
    you may use invoke('text')
  • c

    chilly-queen-22182

    11/03/2022, 8:44 PM
    Hi all, does anyone have can help me withe getting code coverage with cypress and aurelia please? I have no idea where to start?
  • c

    colossal-forest-745

    11/03/2022, 9:00 PM
    Hello! I am trying to automate an e2e test on Salesforce Lightning. When we run the login test (UI) it forces close the test browser. Is there a workaround for this? I've heard about firefox but it gives the same error.
  • c

    colossal-forest-745

    11/03/2022, 9:01 PM
    I've used a POST method prior going to the home page, but it does not work
  • l

    late-planet-4481

    11/03/2022, 9:19 PM
    Be sure to investigate whether your test is going too fast in some cases. Pages that execute JavaScript often misbehave if the test user operates at superhuman speeds. There are a number of ways to mitigate this: - For each click or page load that triggers JavaScript, assert the state of a portion of the UI that you expect to change. This way the clicks will not continue until the UI is ready. - If your page has a trustworthy loading animation you can add an assertion for the disappearance of the loading animation. - If the page executes XHR, you can alternatively introduce a
    cy.intercept()
    before the click, then wait for the request after the click. This is a less preferable approach, since a) it's a bit messy in the code, and b) an XHR response is not always sufficient evidence that the UI is ready for more clicks. Also be sure to look at the steps before the issue occurs. Sometimes the variance happens before you notice it, when the page is accumulating state. > It also seems like Cypress is telling us the request is never being made. However, we can see the request being made and not being stubbed even with a cy.intercept(). This tells me you did not get the pattern correct for the
    cy.intercept()
    . Make sure your intercept results in an alias, then look for the alias to appear in the Test Runner log. This way you can tweak the pattern until you see the alias bubble show up.
  • c

    careful-toothbrush-49639

    11/03/2022, 10:14 PM
    Yes
  • c

    careful-toothbrush-49639

    11/03/2022, 10:15 PM
    Still need help concerning this
  • l

    late-planet-4481

    11/03/2022, 10:46 PM
    Maybe share the DevTools errors?
  • g

    gray-kilobyte-89541

    11/03/2022, 10:53 PM
    a typical element has text which you can check using
    cy.contains
    or
    cy.get().should('have.text'...)
    . Input elements have values, so something like
    cy.get('input#name').should('have.value', 'hello')
  • d

    delightful-engineer-44693

    11/04/2022, 6:46 AM
    Hello
  • d

    delightful-engineer-44693

    11/04/2022, 6:47 AM
    Can anyone here help me with below concern Our requirement is to automate our eCommerce websites We are stuck because we have 100+ web-stores and we want 1 single script with minimal changes which can be executed for all the 100+webstores. Is there any possible way from which we can create script? Our platform is basically Magento2. Frontend theme remains same for all but User design changes as per the client requirement. It would be grateful to us if we get any possible solution for the same
  • s

    stale-optician-85950

    11/04/2022, 8:46 AM
    Hi @delightful-engineer-44693 so you want 1 test automation framework to test all 100+ web-stores? This is possible of course depending on the site's tech stack. My current framework is designed to test 70+ websites and does so successfully. And that is possible because they are all powered by the same tech stack and CMS, resulting in all using the same HTML and selectors etc . I have a huge JSON file in
    /fixtures/
    which contains all test data for these 70+ websites (i.e. 70+ objects within 1 JSON file). This JSON data file is imported before Cypress launches making our tests dynamic, meaning that I can add more objects (websites) to the JSON and the Cypress test will automatically run these as additional sites as news tests without me needing to change the test code.
  • l

    limited-fish-66138

    11/04/2022, 10:30 AM
    Hi I run cypress E2E tests in ci pipeline with parallelisation 3 tags. Is it possible to have only 1 report emailed for all 3 tags Thanks
  • r

    rough-agent-43374

    11/04/2022, 12:19 PM
    Hello, so im basically trying to test an app with my cypress with docker but i get keep getting this error:
  • r

    rough-agent-43374

    11/04/2022, 12:21 PM
    According to the patch realese 10.0.0: Using a cypress.json configuration file is no longer supported. Replace this configuration file with a cypress.config.js, cypress.config.ts, cypress.config.cjs or cypress.config.mjs file. This change provides better flexibility and extensibility of configuration. An error will be thrown if both a cypress.json file and cypress.config.{cjs,js,mjs,ts} file are found. Addressed in #18221, #18300, #20554, and #20643.
  • r

    rough-agent-43374

    11/04/2022, 12:23 PM
    Here is also the path to my cypress
  • r

    rough-agent-43374

    11/04/2022, 12:23 PM
    Hope someone can provide some help, thanks
  • s

    stale-optician-85950

    11/04/2022, 1:12 PM
    You are running your tests from the wrong location,
    /e2e
    is not correct. So you got that error because of running Cypress from inside
    /e2e
    folder. You run Cypress command from the root, i.e. same level as the Cypress folder (not inside of it). Also remove that
    cypress.config.js
    from inside
    e2e
    and put it also on the root.
  • k

    kind-soccer-81562

    11/05/2022, 9:44 PM
    Hello , i need help , in my application i using element ui and have el-upload, is basically a wrap input file, but i connot use selectFile , i try to use cy.get('#cnh > div > input').selectFile('fixtures/motorista.jpg', { force: true }) but dont work
  • k

    kind-soccer-81562

    11/05/2022, 10:09 PM
    i resolve , i forget update my application code tnks
  • g

    gray-helmet-2693

    11/07/2022, 9:01 AM
    Hello, im new to cypress. i can intercept a specific request using "intercept" and check the response. is there a way to intercept all the requests an check if the status code is 200? in other words is there a way to get a failed test if any of the responses is !=200 ?
  • f

    fresh-doctor-14925

    11/07/2022, 9:23 AM
    Yes, that's fairly straightforward. You should be able to figure it out by taking a look at the cy.intercept docs: https://docs.cypress.io/api/commands/intercept Though is it for API calls made with
    cy.request()
    , or calls being made by your application?
  • s

    stale-policeman-71052

    11/07/2022, 12:50 PM
    Hello , I am trying to implement e2e testing using cypress in my current company . I am using MOCHAWESOME reporter to generate reports but I am clueless about how to share these reports with my team . can anyone please guide me here? Thanks in advance
1...137138139...192Latest