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

    fancy-airplane-60156

    10/02/2021, 5:54 AM
    Hello Cypress experts, I've lot of expect statements in a separate JS file. I see that they're executed. However they aren't displayed in the mocha html report. Should i have to add a config somewhere for this to happen ?
  • t

    thankful-lunch-80439

    10/02/2021, 5:39 PM
    Intercept
  • e

    eager-insurance-88633

    10/04/2021, 12:30 AM
    Hi everyone ๐Ÿ™‚ does anyone know how I can type subject in this command
    Copy code
    export const hoverAndClickHiddenButtonByText =
        (buttonText: string) => (subject) => {
            cy.wrap(subject).trigger("mouseover").contains(buttonText).click();
        };
    seems to be something like (this: any, currentSubject: JQuery) => void
  • g

    gentle-oxygen-2271

    10/04/2021, 6:33 AM
    Hey, I'm using a before hook in the support file to create an event before the tests run. This event is then used in the tests. When I run locally, everything is great, 1 event is created in the very beginning, but when the tests run through github, it seems it creates a new event before each test file. Has anyone else had this problem? How to solve it ๐Ÿค”
  • g

    gentle-oxygen-2271

    10/04/2021, 6:39 AM
    Never mind, seems to be a known issue... https://github.com/cypress-io/cypress/issues/1586
  • c

    cold-nail-44506

    10/04/2021, 3:42 PM
    Hello, I am testing a react APP that can render PDF fine for preview but as soon as I open it in Cypress, I get this error "Failed to load PDF File". This is an inconvenience because I am trying to test some part of the app that deals with the PDF. Any suggestions?
  • p

    prehistoric-action-94870

    10/05/2021, 5:12 PM
    Hi all, I am stuck on assertions via fixtures and I hope you can help me. I have a DOM element which looks like this:
    <address>
    "Address Line 1
    <br>
    "Address Line 2"
    <br>
    "Country"
    <br>
    "Postcode"
    <br>
    </address>
    I have the address information in a .json file stored like this:
    {
    "officeName": "Office 1",
    "officeAddress":"Address Line 1 Address Line 2 Country Postcode",
    }
    In my test spec.js file:
    //Check the office address
    cy.get('.office-finder-search-results .address:nth-of-type(1)').children('address')
    .invoke('text')
    .then((addressText) => addressText.trim())
    .should('contain', officeDetails.english.offices[22].officeAddress)
    The assertion is happening but its failing as there is no spacing at the end of each line after the
    .trim()
    operation. I can't post the assertion failure due to confidentiality, but the message is similar to the below:
    assert (fail)
    expected **Address Line 1Address Line 2CountryPostcode** to include **Address Line 1 Address Line 2 Country Postcode**
    Is there a way I can manipulate the string to have a space character at the end of each line so it matches up to the values in my .json file? Thanks in advance
  • a

    alert-photographer-39416

    10/08/2021, 2:15 AM
    hi guys.. im having an issue with .intecept and cy.wait flaking out on me once its running w. github actions
    b
    • 2
    • 1
  • a

    alert-photographer-39416

    10/08/2021, 2:16 AM
    there is no issue locally, ever.. it consistently passes. but when it is running through ci/cd, different tests randomly flake at different times.
  • a

    alert-photographer-39416

    10/08/2021, 2:16 AM
    the error will say something like (wating for @someRequest, but no request was ever made)
  • a

    alert-photographer-39416

    10/08/2021, 2:16 AM
    has anyone else had this issue, or does anyone know what may be the cause
  • b

    bitter-fountain-36713

    10/08/2021, 4:46 AM
    CI intercept wait flakiness
  • s

    stale-scientist-4874

    10/08/2021, 10:28 AM
    Hi โ˜บ๏ธ i have a question- i am trying to add a selector to one ant design component (message.error). But cypress refuses to recognise its className (object props). Any other options how to check that the message pops up on the screen? .should(โ€˜containโ€™, โ€˜stringโ€™) does work but we wanted something text unrelated โ˜บ๏ธ thank you
  • n

    narrow-optician-44716

    10/08/2021, 5:02 PM
    Hi there, I posted a question about flaky tests i'm experiences at stack overflow: https://stackoverflow.com/questions/69499370/how-to-make-cypress-wait-for-a-async-search-with-multiple-result-complete-withou It would be awesome if anyone could take a look. I'm also in doubt if I was able to frame the question correctly, any feedback is welcome. Thank you in advance, JM
  • g

    gray-kilobyte-89541

    10/12/2021, 11:36 AM
    New blog post "Dynamic API Tests Using Cypress-Each Plugin" https://glebbahmutov.com/blog/dynamic-api-tests-using-cypress-each/
  • b

    best-yacht-92435

    10/14/2021, 1:48 PM
    Hi, So I added a loader for my application and now a lot of my test are breaking. because I can't get cypress to wait until the SPA finishes loading. I created this as a stack overflow question in case anyone has any ideas https://stackoverflow.com/questions/69571864/how-do-you-wait-on-multiple-xhr-in-cypress-that-match-the-same-intercept
  • m

    magnificent-rose-67179

    10/15/2021, 8:01 AM
    Hello
  • m

    magnificent-rose-67179

    10/15/2021, 8:02 AM
    We upgraded from 8.4.1 to 8.6.0 and we have issues in the cypress github action
  • m

    magnificent-rose-67179

    10/15/2021, 8:02 AM
    locally our e2e tests are working
  • m

    magnificent-rose-67179

    10/15/2021, 8:04 AM
    Copy code
    [3190:1014/180252.550565:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [3190:1014/180252.550639:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
    [3361:1014/180252.571643:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swiftshader
  • m

    magnificent-rose-67179

    10/15/2021, 8:04 AM
    Seems like an issue with the github action environment ? ๐Ÿค”
  • m

    magnificent-rose-67179

    10/15/2021, 8:09 AM
    At the end I have a gc dump
  • m

    magnificent-rose-67179

    10/15/2021, 8:09 AM
    Copy code
    <--- Last few GCs --->
    
    [3635:0x25f2003c0000]   294197 ms: Mark-sweep 1991.6 (2069.4) -> 1986.0 (2071.7) MB, 4597.5 / 0.1 ms  (average mu = 0.070, current mu = 0.007) allocation failure scavenge might not succeed
    [3635:0x25f2003c0000]   301438 ms: Mark-sweep 1994.0 (2071.9) -> 1988.5 (2074.4) MB, 7206.3 / 0.0 ms  (average mu = 0.031, current mu = 0.005) allocation failure scavenge might not succeed
    
    
    <--- JS stacktrace --->
  • m

    magnificent-rose-67179

    10/15/2021, 8:10 AM
    We only have a few e2e tests so it seems unlikely that we run out of memory? ๐Ÿค”
  • c

    crooked-answer-55549

    10/15/2021, 1:31 PM
    Hi ๐Ÿ‘‹ Does anyone have any knowledge of using Cypress to test Vue + vue-apollo App? I'm falling at the first hurdle as the app can't load the data that outside Cypress it can. Im using
    $apollo.addSmartQuery
    from inside a component to perform queries but it looks like the
    $apollo
    object doesn't exist inside the Cypress instance. I have a feeling Im missing something fundamental.
  • c

    crooked-answer-55549

    10/15/2021, 3:32 PM
    UPDATE: After trying to put together a minimal repo I can't replicate. The repo logs
    this.$apollo
    as a
    DollarApollo
    object but it is there. ๐Ÿค”
  • u

    user

    10/17/2021, 11:06 PM
    Hey folks. I try to write to test for email subscription. However, the test not pass every time that I run. It throw status 429 which is too many request. Does Cypress has any command to compensate this? I try to change the new email address every time that I submit but that seem not to be a problem. Thanks in advance guys!
  • s

    stocky-tomato-26046

    10/18/2021, 10:49 AM
    Hi folks, I tried to run e2e testing having around 5K test cases with 20 machines via aws codebuild. But for some reason the dashboard is not able to pick up the test run and because of that am not able to see either the test cases is passed or failed. But if I do the same with 300 test cases then am able to see the runs in the dashboard. Has anyone faced this kind of situation ?
  • m

    magnificent-beard-2043

    10/19/2021, 2:11 PM
    Hi crew! ๐Ÿ˜€ Anyone using the
    cypress-grep
    tool in CI pipeline together with
    cypress-io/github-action@v2
    ? In order to reduce the runtime, I run a grep on the spec-files first and store the result as a comma separated string to a varaible, and then pass that variable into the
    spec
    flag in the
    with
    -block. Are there any way to pass the
    grepTags
    command in the with-block in
    cypress-io/github-action@v2
    to limit only the tagged tests? ๐Ÿค” Now I have this block where I'd like to add the grep-command
    Copy code
    - name: Running Cypress ๐Ÿšฌ tests
            uses: cypress-io/github-action@v2
            with:
              record: true
              browser: chrome
              headless: true
              spec: ${{ env.SPECFILES_FOR_SMOKE_TEST }}
    Any clues out there?
  • m

    magnificent-rose-67179

    10/20/2021, 7:20 AM
    Are we the only one experiencing memory crash since v8 in github actions ? :/
1...242526...192Latest