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

    dazzling-salesclerk-15570

    11/23/2021, 1:47 PM
    that's really great. any chance we get an audio presentation or you can tell us about a video that would cover these topics?
  • l

    lemon-tent-31390

    11/23/2021, 4:41 PM
    Will anyone have any idea why i run BrowserStack with cypress BrowserStack-cypress run --browser Chrome@latest:Windows 10, Firefox@latest-1:OS X Catalina --env configFile=stag_youlend --spec cypress\integration\regression\URLPrameterSignUpTest\URLParameterSignUp.spec.js will cause this error error: Build creation failed. Error: Chrome latest on Windows is not supported in BrowserStack. See the list of supported browser versions and OS here: https://www.browserstack.com/docs/automate/cypress/browsers-and-os??
  • c

    calm-doctor-58650

    11/23/2021, 6:13 PM
    Hi Himson! 👋 The Browserstack integration for Cypress is not developed by Cypress, and has some limitations. I'd refer to their documentation and support for help.
  • l

    lemon-tent-31390

    11/23/2021, 8:22 PM
    Will anyone know why i got this error?
  • c

    calm-doctor-58650

    11/23/2021, 8:32 PM
    Hey Himson, can you share your test code? Chances are you have something like cy.task().then(() => cy.fixture()) but you don't need to wrap Cypress commands in promises.
  • c

    calm-doctor-58650

    11/23/2021, 8:34 PM
    you can have cy.task() and then on the next line cy.fixture() and cy.fixture() automatically won't execute until the cy.task() completes. Check out the docs here for more info: https://docs.cypress.io/guides/core-concepts/introduction-to-cypress#Commands-Are-Asynchronous
  • g

    gray-kilobyte-89541

    11/24/2021, 3:14 AM
    That presentation was not recorded, bu in Dec I will do a shorter version at https://www.react-next.com/ in Israel
  • l

    lemon-tent-31390

    11/24/2021, 2:57 PM
    I am absolutely dont have cy.task().then in my code. I only have cy.fixture and then next inside with cy.task only. Also, it is only happen in browserstack testing. It doesnt have this problem when testing in cypress runner locally.
    c
    • 2
    • 2
  • u

    user

    11/24/2021, 3:50 PM
    Anyone else been seeing weird behavior after the
    9.0.0
    update? Particularly around
    script
    tags? I started getting errors and finally figured out that I was running a
    cy.contains
    command to make an assertion and one of my rendered views that is a
    script
    tag was getting nuked and causing Handlebars to not see the element for compiling Update: this also only seems to happen when using
    .contains
    as a parent command and not a child command
  • c

    calm-doctor-58650

    11/24/2021, 3:50 PM
    cy.task() error in Browserstack
  • f

    fancy-airplane-60156

    11/25/2021, 3:15 AM
    Hi, I'm using axe plugin in cypress to test accessibility. Does anyone know if we can exclude more than one element in command cy.checkA11y ? It seems to work only with first element
  • f

    fancy-airplane-60156

    11/25/2021, 3:17 AM
    for e.g cy.checkA11y({exclude:['.tabs','.mega-nav']})
  • f

    fancy-airplane-60156

    11/25/2021, 3:17 AM
    it excludes only the first element with class tabs
  • w

    wonderful-match-15836

    11/28/2021, 12:17 AM
    Unfortunately I think the API for the
    exclude
    option is very unintuitive... after experimenting a bit I found it takes an array of arrays, so I think that this would work for you:
    exclude: [['.tabs'], ['.mega-nav']]
    Some more details from axe are here: https://www.deque.com/axe/core-documentation/api-documentation/#:~:text=A%20node%2C%20or,inside%20the%20document There are examples further down the page. It looks like, within a given array inside the
    excludes
    array, you would only have more than one selector if you are trying to check things that are nested inside iframes. VERY not obvious.
  • m

    microscopic-caravan-33322

    11/29/2021, 3:36 AM
    I'm struggling a little bit with login via the AWS Cognito API. Mostly around how long it takes for Cypress to get the imports done. Tests that don't use login, the preparation phase of any test is about 5 seconds. Tests that call the login function take 30+ seconds. I've narrowed it down to the various imports. Is there any way to have cypress execute the imports once, rather than once for every spec file? When I had login in the commands file, every single spec file took 30+ seconds. Moving to a function I was able to speed up the tests that don't need to login. Any suggestions would be much appreciated.
  • f

    fancy-airplane-60156

    11/29/2021, 7:45 AM
    Thank you so much @User I'll read through the doco
  • f

    fancy-airplane-60156

    11/29/2021, 11:47 AM
    Thank for the doco. I updated my tests and got them working, thank you heaps !
  • l

    lemon-tent-31390

    11/29/2021, 9:05 PM
    @User Sorry to ask you a question. If generateEmail() is a custom command function, is it impossible to assign a variable like this const email = generateEmail(); in my code?
  • b

    bright-dawn-65670

    11/29/2021, 9:07 PM
    Hi all - I'm a little confused as why running our tests took 45 min! any clue as what may have caused the slowness? Based on the report, it should have taken 4 minutes! this is run on as part of a GitHub action. Any feed back is appreciated!
  • c

    calm-doctor-58650

    11/29/2021, 9:17 PM
    Hey nomaan, I'll DM you.
  • c

    calm-doctor-58650

    11/29/2021, 9:19 PM
    Hey Himson, check out this section in our documentation about Return Values: https://docs.cypress.io/guides/core-concepts/variables-and-aliases#Return-Values I think that will cover what you're asking.
  • l

    lemon-tent-31390

    11/29/2021, 9:20 PM
    @User Thank you for your info. yea i read that. Seems i cannot do so. Hope can find someway to do it. It is impossible right?
  • c

    calm-doctor-58650

    11/29/2021, 9:26 PM
    @User Depending on your use case, you my be able to leverage .as() or .then(). https://docs.cypress.io/api/commands/as https://docs.cypress.io/api/commands/then
  • l

    lemon-tent-31390

    11/29/2021, 9:29 PM
    thank you very much
  • q

    quiet-tent-29166

    12/01/2021, 8:07 PM
    I have a lot of success with api testing and Cypress. I have run across a "status 204" on a call that work in postman, and I get a json response correctly, but in cypress I get a 200 - followed by a status 204. Its a private api, so cant post too much on this. Has anyone come across similar error?
  • q

    quiet-tent-29166

    12/02/2021, 12:55 PM
    Im guessing this discord channel is dead, not seeing much but advertising on it.
  • g

    gray-kilobyte-89541

    12/02/2021, 1:37 PM
    also maybe the issue you have posted does not provide enough details for someone to comment?
  • c

    calm-doctor-58650

    12/02/2021, 3:27 PM
    Hey nthsand, if you're able to provide some more details or a reproducible example, that would be helpful. I haven't seen that issue before specifically. Also not sure what you mean by you get a 200 followed by a 204, if you mean multiple responses on the same call or multiple calls to the same endpoint. Even if you can post redacted code along with the different responses you're getting between Cypress and Postman, that would give people something to go on.
  • f

    fancy-lawyer-44060

    12/02/2021, 8:11 PM
    I'm trying to understand the test runner architecture better.... Does Cypress restart the browser on each test case? spec? or keeps the same browser instance? I'm wondering about how run time is affected by this. I found this old issue (https://github.com/cypress-io/cypress/issues/681) and this one too where it supposed to address part of that (https://github.com/cypress-io/cypress/issues/8301), but I'd like to know what's the current way tests are run.
  • d

    dazzling-angle-28206

    12/02/2021, 9:14 PM
    Cypress uses the same browser instance. I'd imagine it would be a huge slowdown otherwise. But cypress scraps cookies and other storage by default, so the tests run independent of each other.
1...272829...192Latest