https://cypress.io logo
Join Discord
Powered by
# help
  • a

    adventurous-dream-20049

    03/08/2022, 2:34 PM
    Hi, I just sent a direct message asking for Dashboard Subscription PII.
  • a

    adventurous-dream-20049

    03/08/2022, 3:30 PM
    Can you confirm this is still an issue in 9.5.1? https://docs.cypress.io/guides/references/changelog#9-5-1
  • a

    adventurous-dream-20049

    03/08/2022, 3:31 PM
    Can you elaborate on what you mean by "avoid" the cypress proxy? I'm looking to understand your use case.
  • e

    enough-plastic-87422

    03/08/2022, 4:19 PM
    Hi I am wondering if it is better to set up class functions instead or just regular functions in cypress? **Context**: trying to refactor alot of test tags into readability
  • l

    loud-honey-66910

    03/09/2022, 1:35 AM
    Hi @User thank you for your interest on this, I'm more specifically talking about this issue https://github.com/cypress-io/cypress/issues/2374
  • a

    adventurous-dream-20049

    03/09/2022, 4:12 AM
    Understood. Unfortunately, since I am not well-versed in Google Cloud Firestore, I will bow out gracefully to allow a subject matter expert hop in to assist.
  • c

    cold-doctor-52849

    03/09/2022, 5:44 PM
    i've concluded that the variables are assigned new values after using cy.visit()
  • u

    user

    03/10/2022, 1:04 PM
    Hi! I have a weird problem. When running
    cy.visit("/nyköping")
    with
    baseUrl
    set to
    https://climatevisualizer.com
    I get a 500. But the url https://climatevisualizer.com/nyköping works fine. It seems to be related to encoding, since routes without
    åäö
    works fine such as
    cy.visit("/skara")
    . And it also works if I use
    cy.visit("/" + encodeURIComponent("nyköping"))
    This problem only occurs when using Cypress. Any clues?
  • u

    user

    03/10/2022, 1:24 PM
    OK finally i found this issue https://github.com/cypress-io/cypress/issues/19355
  • t

    thankful-controller-3208

    03/11/2022, 9:11 AM
    how can I save an input string from cucumber feature that I want to use in other scenarios? All the variables are reseted after one scenario ends
  • p

    powerful-orange-86819

    03/14/2022, 2:28 PM
    Hi, I have problem surrounding the difference between pipeline execution and my local environment. I'm intercepting a request using the following command:
    Copy code
    js
    cy.intercept(
          {
            method: "GET",
            pathname: env.path,
            query: {
              dateFrom: "2020-12-31T22:00:00.000Z",
              dateTo: "2022-01-01T21:59:59.000Z",
            },
          },
          (req) => {
            expect(req.url).to.include(
              "&dateFrom=2020-12-31T22%3A00%3A00.000Z",
              "Date From included"
            );
            expect(req.url).to.include(
              "&dateTo=2022-01-01T21%3A59%3A59.000Z",
              "Date to included"
            );
          }
        ).as("filterByDates");
    Executing it on my local environment is fine, but when I run it in the pipeline there is a problem, because server time is UTC by default, the test always fails, because sent time is not as expected. Now I'm thinking how to approach this, because the time input is not by me, but by the plugin "datePicker", which always inputs the machine time (server/environment), so the question is what is a good approach towards this issue? (i'm using day.js) Do I convert each time input to UTC ? Do I intercept the request and make it UTC -2 for the request ? Or should I just ignore everything after "T" including hours/minutes/seconds, which I'm highly against. I'll really be glad if i get responses, thanks in advance.
  • d

    damp-country-52800

    03/14/2022, 6:31 PM
    Hi everyone, I am using if else condition but 'if statement' doesn't work properly, Cypress just skip the condition.
    Copy code
    var genArr = Array.from({ length: 5 }, (v, k) => k)
        cy.wrap(genArr).each((index) => {
            cy.get('#reportsNavExportButtonV2').should('be.visible').click().as('exportButton')
            cy.get('div.export-button-container')
                .find('button')
                .eq(index)
                .as('modalButton')
                .then(($index) => {
                    if ($index === 1) {
                        cy.get('#pdfCustomTrack').click()
                    } else {
                        cy.get('@modalButton').click()
                    }
                })
        })
    
      })
    how can I change this test to make it work ? Thank you very much
  • d

    dazzling-angle-28206

    03/15/2022, 10:56 AM
    In that example I do not see an asserion after the if branches.... That could be the reason that cypress just moves on. Assertions seem to guide the execution in cypress as it is a test framework, not automation software ;-)
  • c

    cool-microphone-40049

    03/15/2022, 3:16 PM
    Hi, I'm rendering a component using the
    @cypress/react
    library and I expect my component to throw error. How can I test that the proper error has been thrown, and prevent the test from failing?
  • p

    powerful-orange-86819

    03/15/2022, 3:51 PM
    use intercept and change the response of the request, make the body as the desired error you want to see and then check its properties
  • c

    cool-microphone-40049

    03/15/2022, 3:58 PM
    thanks for the reply. I'm not dealing with an API, It's the component itself that needs to throw an error when the props are inappropriate. In fact the
    mount(<Component/>
    should throw an error.
  • g

    glamorous-monkey-67605

    03/16/2022, 6:10 PM
    Can I setup multiple reporters in a cypress project? For e.g. "reporter": ["mochawesome-report-generator", "cypress-testrail-accumulative-reporter"] ?
  • g

    glamorous-monkey-67605

    03/16/2022, 6:11 PM
    I'm finding that I cannot customize the html or email reports of Testrail and therefore I need marge for generating my HTML reports of results
  • a

    adorable-smartphone-87280

    03/17/2022, 5:00 PM
    Would this be helpful? Using this plugin, you can generate multiple mocha reports from a single run. https://www.npmjs.com/package/cypress-multi-reporters
  • d

    damp-country-52800

    03/17/2022, 7:09 PM
    Hi, I try to connect with OAuth 2.0 authentication Google But I have a blocker with url. I'll need to extract a dynamic value from the URL to be used in the callback URL. I'll also need to extract value body of an api call on an array. How I can do this ? Thank you very much
  • h

    high-market-48478

    03/18/2022, 11:24 AM
    Hello all. I have a question regarding WSL2 setup ( my setup is capable of opening the XWindow ): - can I add additional browser somehow to that setup? ( meaning I would love to select chrome or FF not just electron ) - or would it be better to get the binaries directly and installing them? then run the app and select the tests I want to run from there? (EDIT: this doesn't work - app closes when trying to access the project on the WSL2 folder system ) Thanks for any info.
  • r

    red-ghost-44720

    03/20/2022, 11:17 AM
    Hi all, just want to ask again. Is there any way to add comment/s for a flaky test? and is there any way to check on what is the cause of the test being flaky? (like checking if the reason is DOM related, network related, or data related)
  • b

    brief-kite-35331

    03/21/2022, 10:13 AM
    Hey, I need help regarding automating the following scenario: log in to account change your password login again with the new password How would u do this? in regards to remembering the password for the next test run? So I can repeatedly change the pass and login with it. I am a little bit confused here. How do I transfer this password info between the test runs?
    f
    • 2
    • 1
  • b

    brief-kite-35331

    03/21/2022, 10:13 AM
    Feels a bit like an inception 😄
  • f

    fancy-match-96032

    03/22/2022, 2:17 PM
    Test Password Reset
  • d

    damp-country-52800

    03/22/2022, 6:18 PM
    Hi everyone. Have you any idea to test 2LO OAuth Google with cypress? For now, I haven’t find how to generate code authentication dynamically, so maybe via 2LO OAuth support it will be easiest. Any help is welcome 🙏🏻
  • p

    powerful-orange-86819

    03/23/2022, 9:08 AM
    Create env variable in cypress.env.json, reassign it after changing and adding it there, there are multiple of ways and then just reuse the variable when typing the password
  • w

    wooden-exabyte-51274

    03/24/2022, 10:55 AM
    why am i getting this error in my CI
    AssertionError: Timed out retrying after 4000ms: Expected to find content: 'Log In' but never did.
  • e

    eager-magician-32906

    03/24/2022, 4:54 PM
    Has anyone had luck with Cypress running on an M1 mac? My last laptop bit the dust and I just got my replacement and followed the blog post about Rosetta and still not having luck. Its actually opening a web browser now but the test never starts any my laptop is just frozen
  • u

    user

    03/25/2022, 1:05 AM
    Hi, I'm trying to use cy.request option retryOnStatusCodeFailure but it doesn't seem to do any retry.
    Copy code
    describe('cy.request options', () => {
        it('test', () => {
            cy.request({
                method: 'GET',
                url: 'https://swapi.dev/api/people/9999999999',
                retryOnStatusCodeFailure: true,
                retryOnNetworkFailure: true,
                failOnStatusCode: true
            })
        })
    })
1...525354...252Latest