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

    white-mouse-85089

    01/05/2023, 10:35 PM
    Reason why I am asking is that I added axe to my cypress and I used the working test as base, however in this example (and all I did was to add injectaxe and checkally) but it does not open the new page after clicking on the menu. I do not have the function part in this test.
  • p

    purple-afternoon-2408

    01/06/2023, 3:39 AM
    After I open cypress and login, it just lets me continue browsing after login as normal, but it doens't close the borwser and logs me in from the cypress open command, there it just keeps on saying "waiting for login". Is that normal?
  • p

    plain-mechanic-5738

    01/06/2023, 5:43 AM
    does anyone knows how to get the locator of pop up message here? It only shows for a short time
  • p

    plain-mechanic-5738

    01/06/2023, 6:05 AM
    that shows up when there is an invalid email address and click the submit button. When I click that pop up message, it disappears. Please help
  • n

    nice-lifeguard-81070

    01/06/2023, 7:38 AM
    How to add Codecov in Github Actions of cypress code coverage (I get coverage report in a json format inside a folder in vscode afer running cypress test) ?
  • r

    rough-van-84956

    01/06/2023, 9:23 AM
    That's validation, for an element. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#validation and https://glebbahmutov.com/blog/form-validation-in-cypress/
  • f

    full-application-86498

    01/06/2023, 10:47 AM
    Hi everyone maybe you will give me any clue is it possible to integrate memlab with cypress. The problem is memory leak that we need to find. One of our developer propose this memlab integrated with Puppeteer, so I need to find the same solution in Cypress. Any clue where to find some info or so, please
  • r

    rich-pharmacist-74804

    01/06/2023, 11:11 AM
    Thank you will try this.
  • b

    bitter-fountain-36713

    01/06/2023, 2:25 PM
    I think the easiest trick is to add a cy.wait() with a short enough wait for the test runner to have a copy of the DOM when it is displayed. Then you can use the browser inspector to check out the popup.
  • b

    brave-doctor-62978

    01/06/2023, 3:07 PM
    is there a way im missing to do a
    .should('be.calledWith',
    but search for a value in an object passed?
  • b

    brave-doctor-62978

    01/06/2023, 3:07 PM
    previously i was doing this...
  • b

    brave-doctor-62978

    01/06/2023, 3:07 PM
    Copy code
    //       expect(trackSpy).toHaveBeenLastCalledWith(ATTENDANCE_ONBOARDING, expect.objectContaining({
          //         action: Actions.COMPLETED_STEP,
          //         currentStep: STEPS.PAYROLL,
          //         mobileApp: true,
          //         payPeriodEndDate: '2015-09-03',
          //         payPeriodLength: 'weekly',
          //         personalComputer: true,
          //         strictMode: true,
          //       }));
  • b

    brave-doctor-62978

    01/06/2023, 3:07 PM
    but i have no idea the cypress equiv to that
  • g

    gray-kilobyte-89541

    01/06/2023, 3:34 PM
    Ohh, it is a good one, let me make a video and add an example to https://glebbahmutov.com/cypress-examples/commands/spies-stubs-clocks.html
  • b

    brave-doctor-62978

    01/06/2023, 3:35 PM
    that'd be amazing!
  • b

    brave-doctor-62978

    01/06/2023, 3:35 PM
    Copy code
    cy.get('@setName').should(
      'have.been.calledOnceWith',
      Cypress.sinon.match.string,
      'Smith',
    )
    is pretty close
  • g

    gray-kilobyte-89541

    01/06/2023, 3:49 PM
    so this is the code https://github.com/bahmutov/cypress-examples/commit/87f023a81b484367b1f5350dee3820708cf4d83d
  • b

    brave-doctor-62978

    01/06/2023, 3:51 PM
    you are a beautiful man! that's exactly what i was looking for.
  • g

    gray-kilobyte-89541

    01/06/2023, 3:54 PM
    Ughh, hold on, sinon has pretty powerful built-in match, it could be even simpler
  • b

    brave-doctor-62978

    01/06/2023, 3:55 PM
    is there a good way to dump the entire spy object? so i know what fields i have to mess with? i tried
    cy.get('@mercuryTracker').debug()
    but that's not quite what i want
  • b

    brave-doctor-62978

    01/06/2023, 3:58 PM
    nm, i found how.... derp
  • b

    brave-doctor-62978

    01/06/2023, 4:04 PM
    Copy code
    cy.get('@mercuryTracker')
            .should('have.callCount', 6)
            .its('lastCall.args.1')
            .should('deep.include', {
              action: Actions.COMPLETED_STEP,
              currentStep: STEPS.PAYROLL,
              mobileApp: true,
              payPeriodEndDate: '2021-11-30',
              payPeriodLength: 'weekly',
              personalComputer: true,
              strictMode: true,
            })
  • b

    brave-doctor-62978

    01/06/2023, 4:04 PM
  • g

    gray-kilobyte-89541

    01/06/2023, 4:15 PM
    https://glebbahmutov.com/cypress-examples/9.7.0/recipes/called-with-object.html
  • b

    brave-doctor-62978

    01/06/2023, 4:57 PM
    but since it's body is a string i have to do a then and parse it then assert which sucks
  • b

    brave-doctor-62978

    01/06/2023, 4:58 PM
    now if only i could do that with an interceptor like...
    Copy code
    cy.wait('@submission').its('request.body').should('deep.include', { endTime: expectedEnd });
    my life would be perfect
  • b

    brave-doctor-62978

    01/06/2023, 4:58 PM
    unless you know some secret sauce i dont
  • c

    cool-truck-21040

    01/06/2023, 5:47 PM
    Your configFile threw an error from cypress.config.js
    • 1
    • 1
  • g

    gray-kilobyte-89541

    01/06/2023, 5:54 PM
    Sure, that should work. for lots of examples like this, see my (paid) course https://cypress.tips/courses/network-testing
  • b

    brave-doctor-62978

    01/06/2023, 5:58 PM
    is there anything you dont know.... i swear.... 🙇‍♂️
1...243244245...252Latest