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

    kind-artist-92362

    11/14/2022, 7:10 PM
    is there only spying or stubbing also too ?)
  • g

    gray-kilobyte-89541

    11/14/2022, 8:09 PM
    yup, there is stubbing, see the documentation for cy.intercept
  • k

    kind-artist-92362

    11/14/2022, 8:35 PM
    yes i got it while testing
  • k

    kind-artist-92362

    11/14/2022, 8:36 PM
    but in doc i also saw spy
  • k

    kind-artist-92362

    11/14/2022, 8:36 PM
    spy and stub was there
  • k

    kind-artist-92362

    11/14/2022, 8:37 PM
    that is why i have asked
  • k

    kind-artist-92362

    11/14/2022, 8:37 PM
    @gray-kilobyte-89541
  • b

    billowy-librarian-83114

    11/14/2022, 9:05 PM
    anyone know why this would hang and this doesn't?
    Copy code
    cy.intercept("POST", "**/PostAskServiceForGridData")
  • g

    gray-kilobyte-89541

    11/14/2022, 9:33 PM
    yup, it can do both, depending on the arguments. I even wrote about things like this post https://glebbahmutov.com/blog/cypress-intercept-problems/ and how to do anything you need with it in https://cypress.tips/courses/network-testing
  • a

    astonishing-air-69539

    11/14/2022, 9:37 PM
    can anyone help with webpack compilation error for experimentalStudio?
  • m

    mysterious-belgium-25713

    11/15/2022, 5:30 AM
    Hi Camilo I wrote the blog so what is the issue for you?
  • m

    mysterious-belgium-25713

    11/15/2022, 8:06 AM
    Do you have extra code in the arrow function. And what do you mean cypress is hanging. Do you mean it crashes or the test does not continue?
  • m

    mysterious-motherboard-13344

    11/15/2022, 12:29 PM
    use mailhog plugin
  • c

    cool-businessperson-53870

    11/15/2022, 12:40 PM
    Hi I am trying to find out some examples of Kafkajs with cypress. Can anyone help ?
  • f

    fresh-doctor-14925

    11/15/2022, 12:40 PM
    !duplicate
  • n

    nutritious-analyst-96582

    11/15/2022, 12:40 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! 😀
  • f

    flaky-article-23611

    11/15/2022, 12:44 PM
    Hi, can someone advise me on how to simulate panning on an openlayers map? I've tried using trigger('pointerdown') and subsequently pointermove and pointerup on the canvas. But it doesn't move the map. Also tried mousedown/move/up without any luck. There is also a pointerdrag event I tried to use, also no luck. I did find an example for Leaflet: https://stackoverflow.com/questions/60987787/test-dragging-a-leaflet-map-in-cypress Adopted that for OpenLayers and the test doesnt fail, but the map hasnt moved either...
  • l

    loud-magician-68396

    11/15/2022, 2:16 PM
    Good morning. I'm attempting to add cypress to a SPA, and I'm having issues with login redirection. Where would yall recommend I start? I want to actually go through the login flow if possible
  • m

    mysterious-belgium-25713

    11/15/2022, 2:18 PM
    Is the login redirection taking you to a different host? From your app to something like Google or Oauth? If so then i would look at cypress origin. Or look at the Cypress recipes where they have examples on how to login to 3rd party providers
  • l

    loud-magician-68396

    11/15/2022, 2:19 PM
    Yes. Microsoft.
  • l

    loud-magician-68396

    11/15/2022, 2:20 PM
    OK I'll take a look
  • b

    billowy-librarian-83114

    11/15/2022, 3:06 PM
    it crashes chrome. it happens if I have code in the arrow function or if I dont. if I remove the arrow function and just have the route and method it doesnt crash chrome.
  • m

    mysterious-belgium-25713

    11/15/2022, 3:14 PM
    Does it also happen in other browsers? If so then i would suggest you to create a issue on GitHub or look if other people have the same issue on GitHub.
  • b

    billowy-librarian-83114

    11/15/2022, 3:21 PM
    i havent tried other browsers yet
  • b

    busy-wall-71096

    11/15/2022, 3:22 PM
    Hi. I'm experiencing some weird randomness in results of e2e tests. It sometimes passes but most of the time fails. Maybe doing something incorrectly but looks like my
    cy.wait('...')
    is blocking pretty much every call that is happening and in consequence times out 😮 I think it only passes if MP3 stream is fast enough to fulfill before waiting begins. Otherwise, it always fails. See screenshots. Could this be related to problems Cypress has with intercepting binary/stream data (https://github.com/cypress-io/cypress/issues/24278 )? Does anyone have any idea what I'm doing incorrectly? Using: * Cypress 11.0.1 * NodeJS: 16 * Chrome E2E Code for reproduction:
    Copy code
    describe('E2E: Intercept', () => {
      it('Can intercept player related requests without getting blocked', () => {
        cy.intercept({
          url: 'https://api.energy.ch/sts/energych-player',
        }).as('audioStreamRelatedRequest');
    
        cy.visit('https://energy.ch/on-air');
        cy.wait(5000);
        cy.visit('https://energy.ch/on-air');
        cy.wait(5000);
    
        cy.get('button.flex-shrink-0.w-12.h-12.p-2.cursor-pointer')
          .filter(':visible')
          .click();
    
        // This randomly causes https://energyzuerich.mp3.energy.ch/energyzuerich-high.mp3?ua=energy+website+desktop
        //  request to hang and consecutive awaited @audioStreamRelatedRequest request never fires, then timeout happens
        cy.wait('@audioStreamRelatedRequest')
          .its('response.statusCode')
          .should('eq', 200);
    
        cy.wait(3000);
      });
    });
  • k

    kind-van-46599

    11/15/2022, 4:30 PM
    Hi! I have the following entry within package.json "test:cypress": "cypress open --env target=dev" and I wanted to use this flag to control my dotenv path load within cypress.config.ts. How do I access this flag within the configuration file?
  • k

    kind-van-46599

    11/15/2022, 4:31 PM
    my current cypress.config.ts looks like below and I have hardcoded the dotenv path for now
  • b

    bitter-fountain-36713

    11/15/2022, 5:44 PM
    Hi I m experiencing some weird
  • n

    nutritious-army-46708

    11/15/2022, 6:16 PM
    Does anyone know how to test whether the video is playing smoothly? Thank you so much!
  • k

    kind-van-46599

    11/15/2022, 6:48 PM
    Cypress configuration to access target environments
    • 1
    • 2
1...142143144...192Latest