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

    gray-kilobyte-89541

    10/27/2022, 7:43 PM
    what's the markup for this field?
  • a

    acceptable-fall-11897

    10/27/2022, 8:28 PM
    I want parallel but problem is that one page depends on another page like if one page has form and first it need to complete than how I can do next process
  • a

    acceptable-fall-11897

    10/27/2022, 8:29 PM
    How can I decouple test in this case
  • c

    cuddly-kitchen-97815

    10/27/2022, 8:47 PM
    You could decouple it by doing the form again in a
    before()
    clause preceding the next set of tests. That way, it can perform separately from the tests that actually assess the form completion process
  • a

    acceptable-fall-11897

    10/27/2022, 8:50 PM
    Can you explain little bit
  • c

    cuddly-kitchen-97815

    10/27/2022, 8:51 PM
    Where would you like me to start? Have you used a
    before()
    clause before?
  • a

    acceptable-fall-11897

    10/27/2022, 8:52 PM
    Never I am completely new.
    c
    • 2
    • 19
  • a

    acceptable-fall-11897

    10/27/2022, 8:52 PM
    Ok
  • a

    aloof-rocket-79742

    10/27/2022, 10:08 PM
    Hello everyone , Good Morning , Is the oob behaviour for every feature file should have separate .js implementation file? Is that possible to have common .js implementation file which can be utilized in multiple feature files ? Due to this i have to repeat common step defs in every .js implementation file , Could any one please any one suggest if it is achievable to have common.js (single) file to use for multiple feature files
  • r

    rapid-memory-85767

    10/27/2022, 11:17 PM
    @mysterious-belgium-25713 @gray-kilobyte-89541 one of our developers solved our script problem. Here is his finding and updated version. And it is working. Thanks a lot for all your help and information regarding our issue. It helps! I posted the solution here in case anyone else has similar problem. The test is failing because it finds the stn_trk.gif request that is being made for the ldt=BIDS request. So, the test is looking for the first stn_trk.gif request that comes to it, that happens to be the ldt=BIDS for some reason even though it isn't the first request made (maybe cypress handles the network requests as a stack, so the last request made is the first thing it checks?), and then we are checking if it has cmd in it. Which it doesn't, because that isn't a cmd log. What I am able to do is change the test to this: //DP-4833 -- Automation: QA - Network Calls going to

    https://s2l.sendtonews.com/stn_trk.gifโ–พ

    /// //cmd=PRE_INIT describe('Window', () => { beforeEach(() => { }) it.only('Validate the field "cmd=PRE_INIT" in the service

    https://s2l.sendtonews.com/stn_trk.gifโ–พ

    ', () => { cy.visit('https://peterdev.sendtonews.com/demo/QA_test_player.html') cy.intercept ({ method: "POST", query: { cmd: "PRE_INIT" }, hostname: "s2l.sendtonews.com" }).as('cmd') cy.wait('@cmd').its('request.url').then((req)=>{ expect(req).to.include('cmd') }) }) }) So that we look and wait for the PRE_INIT request specifically, and then check if it has cmd in the URL (which of course it does) and this test succeeds.
  • c

    chilly-country-27478

    10/28/2022, 1:46 AM
    I was able to get my tests to all pass without stalling by ensuring positive assertions happen before my negative assertion which avoids a race condition. Re: https://discord.com/channels/755913899261296641/755913900024791046/1034579791581548604
  • g

    gray-kilobyte-89541

    10/28/2022, 2:23 AM
    If you search https://cypress.tips/search you find my blog post on this topic - definitely something that can cause flakiness
  • c

    chilly-country-27478

    10/28/2022, 2:40 AM
    Oh, thanks! Thatโ€™s actually the article I found that solved my issues. Really appreciate it
  • c

    chilly-queen-22182

    10/28/2022, 3:01 AM
    Hi Team , Can anyone help me with Authentication Scenario for our E2E test, so basically in our app we have integration with 3rd party, when I click on authenticate button, Microsoft login page will appear in different window. Is there any way I can authenticate with Microsoft login and password in sep browser using cypress, or is there any alternate to this?
  • a

    acceptable-fall-11897

    10/28/2022, 3:20 AM
    How can I run test parallel in local machine as well as in gitlab
  • f

    future-baker-50174

    10/28/2022, 6:38 AM
    Thanks for trying to help ๐Ÿ™‚ But this still does not work. Looks like things are running faster than Cypress is able to detect. I have a feature that inserts a delay server side (on my dev server), and when I turn it on, things work fine. These messages are there because my page is used on very slow networks and old devices, so I want those messages to be displayed while waiting for network etc. Also, I have many other messages displayed for other reasons, and I want to test that the right messages are displayed, and no other messages. There is a lot of logic in my code, and it is really hard to get it all right, so it is kind of important to get this tested properly. And I would like to avoid having delays in my tests.
  • s

    stale-optician-85950

    10/28/2022, 7:36 AM
    This is main reason
    cy.origin()
    was introduced: https://docs.cypress.io/api/commands/origin to allow cross-domain testing.
  • m

    mysterious-belgium-25713

    10/28/2022, 7:38 AM
    Hi Tracy, nice that you solved it and glad that I helped in pointing into the right direction ๐Ÿ™‚
  • b

    boundless-king-15191

    10/28/2022, 9:32 AM
    Hello everyone! Ran into a problem, when running tests in the console, the following error appears
  • b

    boundless-king-15191

    10/28/2022, 9:36 AM
    simple test, to search for elements
  • s

    stale-optician-85950

    10/28/2022, 9:41 AM
    The error is telling you that you can 'turn off all uncaught exception handling' that originated from your application, like so: https://docs.cypress.io/api/events/catalog-of-events#Uncaught-Exceptions
  • b

    boundless-king-15191

    10/28/2022, 9:41 AM
    when hovering the mouse over the found element, the following errors appear in the console:
  • b

    boundless-king-15191

    10/28/2022, 9:50 AM
    I added Cypress.on('uncaught:exception', (err, runnable) => { return false }) to file support->e2e.js but errors still appear
  • s

    stale-optician-85950

    10/28/2022, 9:57 AM
    Is this in your code?
  • b

    boundless-king-15191

    10/28/2022, 10:01 AM
    no, this error appears in the console. In code I don't use .getSnapshotPropsForLog
  • s

    stale-optician-85950

    10/28/2022, 10:02 AM
    And when using normal Chrome (not Cypress) and you manually do the same steps, do you see exception errors in that console?
  • b

    boundless-king-15191

    10/28/2022, 10:02 AM
    in the Chrome (not Cypress) there are no such errors.
  • s

    stale-optician-85950

    10/28/2022, 10:05 AM
    Have you completely restarted Cypress (kill and relaunch) since adding
    Cypress.on('uncaught:exception', (err, runnable) => {
    ?
  • b

    boundless-king-15191

    10/28/2022, 10:07 AM
    yes, but errors keep appearing
  • s

    stale-optician-85950

    10/28/2022, 10:11 AM
    What Cypress version are you running? I think you might need to clear out all your old Cypress cache like so: https://docs.cypress.io/guides/guides/command-line#cypress-cache-clear
    npx cypress cache clear
    or use prune
    cypress cache prune
    and reinstall again, as that's a very unusual error you are getting.
1...132133134...192Latest