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

    mysterious-belgium-25713

    12/06/2022, 8:06 PM
    Can you show your GH action yaml file
  • m

    melodic-account-9605

    12/06/2022, 8:57 PM
    Hi all -- I'm using
    cy.intercept()
    in a
    beforeEach()
    to intercept graphql requests, and finding that it's still intercepting requests that I'm making from my
    after()
    . That's not expected behavior right?
  • d

    dry-ice-92667

    12/06/2022, 9:10 PM
    Can anyone help me how to access cross origin iframe in cypress
  • m

    mysterious-belgium-25713

    12/06/2022, 9:48 PM
    Why not your after step is still part of your testing run so it would also intercept that. If you don't want that then i would also put an intercept to the same url in the after hook but without the modifications you are doing in the beforeEach
  • m

    melodic-account-9605

    12/06/2022, 9:57 PM
    Oooh, I didn't know I can override the intercept that way? I'll try that out, thank you @mysterious-belgium-25713 !
  • f

    few-laptop-73260

    12/06/2022, 11:16 PM
    Hello everyone! I am new here 👋 I need help with code coverage generated by cypress. If this is not the best channel to ask about it, please redirect me to the right place. 🙏 I have a small react app and I am trying to build a pipeline for it, using GitHub actions. I am also trying to integrate it with SonarCloud to generate code analysis. I am already able to generate code coverage locally, and when sending the report to a local SonarQube it works perfectly. I am aware that my code needs to be instrumented, and here is the tricky part. I am using
    Copy code
    "react-scripts -r @cypress/instrument-cra start"
    to generate the
    .nyc_ouput
    file needed to generate coverage. When running cypress on the pipeline, I give him an external URL where my react app is deployed (GitHub pages). However, I am not able to generate the instrumentation for it on the pipeline. Do you know any ways I could generate this
    .nyc_output
    without having to add it to a script and run my application? Is there any way to generate this
    .nyc_output
    just with a command analyzing the code? > I am guessing a command like this exists because of a peculiar behavior I noticed. When running my application with
    npx cypress run --headless
    it does not generate the
    nyc_output
    . However, when I run opening the interface with
    npx cypress open
    and clicking to run the tests, it can generate. But I have no idea what is the difference between the headless option and the interface one. Thank you in advance.
  • f

    fierce-activity-35946

    12/07/2022, 12:41 AM
    Hi all, with the latest Cypress
    12.0.0
    , when the
    cy.session()
    is being
    restored
    in the middle of the test, the next immediate
    cy.visit()
    action in the same test (it() block) is not working, it is not navigating to the page due to which the test fails. It is not navigating to the page due to 401 issue which is not expected here as we are using an already restored and authorized session. Is this behavior expected or this is a bug?
  • h

    helpful-hairdresser-46183

    12/07/2022, 6:13 AM
    hello everyone, I have prepared a very nice infrastructure that we can run the tests in our company. I can run these tests in jenkins or local or docker environment as I want. However, when I want to integrate it into CI processes, a local server is raised and tests are run. What exactly does this mean, why instead of going directly to a url, a server like localhost:3000 was raised and wanted to go to the url from there? Since I'm not a programmer, the server creation parts here confuse me and I can't progress 😦 Please help me 😦
  • e

    enough-fireman-4779

    12/07/2022, 10:38 AM
    all good Xavier, we had an issue with the container..
  • h

    helpful-hairdresser-46183

    12/07/2022, 11:53 AM
    Hi again, How can I solve my following problem without installing a local server?Cypress could not verify that this server is running: > http://anyUrl.com We are verifying this server because it has been configured as your baseUrl. Cypress automatically waits until your server is accessible before running tests. We will try connecting to it 3 more times... We will try connecting to it 2 more times... We will try connecting to it 1 more time... Cypress failed to verify that your server is running. Please start this server and then run Cypress again. Test run failed, code 1 More information might be available above Cypress module has returned the following error message: Could not find Cypress test run results Error: Could not find Cypress test run results
  • v

    victorious-summer-2999

    12/07/2022, 1:11 PM
    Is anyone able to use @billions-barista-30103/grep with Cypress 11.2.0+? I'm struggling with it several days. @gray-kilobyte-89541
  • t

    thankful-lock-39376

    12/07/2022, 1:13 PM
    Hi anyone know how to not skip the remaining test cases if it fails in afterEach block . I have seen this issue but the solution was to give all the test funtions inside of the test case itself . is there any better solutions .https://github.com/cypress-io/cypress/issues/2744
  • v

    victorious-honey-34966

    12/07/2022, 1:36 PM
    try with sudo
  • g

    gray-kilobyte-89541

    12/07/2022, 2:09 PM
    can you be more specific?
  • l

    lemon-wall-91819

    12/07/2022, 2:25 PM
    I am just starting to write my e2e tests and when I make another "it" test, the page I am on is not continued from the prior "it" test? what am I doing wrong ?
  • l

    lemon-wall-91819

    12/07/2022, 2:26 PM
    i.e I make one "it" tests that checks all the stuff on my log in page, I then log in and then start a new "it" tests for the stuff on the following page, but cypress just gives me a blank page ?
  • g

    gray-kilobyte-89541

    12/07/2022, 2:31 PM
    because cypress resets the state of the browser before each test to isolate the tests https://docs.cypress.io/guides/core-concepts/test-isolation
  • f

    flaky-horse-36126

    12/07/2022, 2:44 PM
    Hi All, I currently have domain A configured as my baseURL, and I want to open a link that is on domain A, like https://track.domainA.com, but when I click it, it reroutes me to a different domain, like site B https://puzzle.com. After clicking the URL, I want to extract a string from the URL and use it in domain A. I attempted to use cy.origin but received a message saying that the target site is different and the provided url is for a previous domain. Any ideas on how to solve this problem.
  • l

    lemon-wall-91819

    12/07/2022, 2:45 PM
    worked a treat, thanks 🙂
  • d

    dry-scooter-25612

    12/07/2022, 4:07 PM
    As you are colleagues I am making an automated process of password recovery, I have 2 Script the first runs and sends the recovery link to this public inbox: https://www.mailinator.com/ the second Script, is to perform the entire process of changing password, I have the 2 functional detail is that the URL sent to the mail, that process I do manually that is to copy that url and place it in my script and; that the process continues normally. I have tried to do it in many ways but I don't know how, could you give me an orientation?
  • v

    victorious-summer-2999

    12/07/2022, 4:34 PM
    yes, so I am passing the following:
    Copy code
    env: {
    ...
    grepTags: '-flaky+-bug+-notReady+-notReadyForStaging+-notReadyForDesktop',
    grepFilterSpecs: true,
    },
    then the spec file:
    Copy code
    it(
          'Verify that feature impression event is triggered when the MOV hint is in the viewport',
    
          {tags: [Feature.gtm, Feature.mov, Status.notReady]},
          function () {
            ...
          },
        );
    CLI command:
    yarn e2e --command open --env production --platform desktop --locale de_DE --browser chrome --grepTags="-flaky+-bug+-notReady+-notReadyForStaging+-notReadyForDesktop"
    the spec above contains tags
    notReady
    and it gets executed anyway @gray-kilobyte-89541 I tried also to replicate a simple test like this:
    Copy code
    it('works as an array', { tags: ['@slow', '@smoke'] }, () => {
      expect(true).to.be.true
    })
    
    it('works as a string', { tags: '@regression' }, () => {
      expect(true).to.be.true
    })
    with command
    npx cypress open --e2e --env grepTags='@slow @regression --@smoke'
    and it executes all tests...
  • b

    bitter-fountain-36713

    12/07/2022, 4:35 PM
    !duplicate
  • n

    nutritious-analyst-96582

    12/07/2022, 4:35 PM
    Uh oh, It looks like you have posted the same question in multiple channels. Help us prevent spam by removing any duplicates of your questions, Thanks! 😀
  • s

    strong-fountain-85853

    12/07/2022, 5:33 PM
    how to resolve this error?
  • m

    mysterious-belgium-25713

    12/07/2022, 5:53 PM
    Create the file the error is saying. In the folder cypress/support create a e2e.js file or e2e.ts file if you use typescript
  • e

    echoing-actor-29720

    12/07/2022, 8:25 PM
    Hello! Is there a way to pass multiple tags to run different test at once? For ex: cypress run —env grepTags=@featureA, @featureB ? The grepTags has many features but I couldn’t make sure if this feature exist.
  • e

    echoing-actor-29720

    12/07/2022, 8:29 PM
    By the way, I’ve looked at solution @gray-kilobyte-89541 provides on glebbahmutov.com/blog/tag-tests/ for Github action but I have many tags to differentiate the tests so having them in action.yml file doesn’t seem good option for me. Thanks!
  • l

    loud-park-10778

    12/07/2022, 8:52 PM
    Hey guys, so the problem im having is that im trying to make a delete request but it requires the token to authorize, how can i get the bearer token?
  • l

    loud-park-10778

    12/07/2022, 8:53 PM
    relatively new at this, any help would be mostly appreciated !
  • b

    bitter-fountain-36713

    12/07/2022, 9:56 PM
    !duplicate
1...161162163...192Latest