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

    aloof-gigabyte-3148

    12/01/2022, 3:09 PM
    Hi guys does some of you how to bypass the 3td party login and log in to the application? I'm using Auth 2.0
  • p

    polite-garage-57372

    12/01/2022, 4:22 PM
    @thankful-lock-39376 Here is how I'm collecting a payload going to one our third party tools, and giving it a meaningful name in the process:
  • t

    thankful-lock-39376

    12/01/2022, 4:31 PM
    hi barnes can you explain what is "@illRequest" in this case .?
  • e

    enough-truck-68085

    12/01/2022, 4:53 PM
    I'd recommend looking into some of the already documented strategies. There are quite a few providers covered. https://docs.cypress.io/guides/end-to-end-testing/auth0-authentication
  • a

    adorable-sundown-22347

    12/01/2022, 5:04 PM
    Hey All. Does anyone know why I'm getting the same amount for timestamps? And how to get the real one?
  • a

    adorable-sundown-22347

    12/01/2022, 5:04 PM
    Please see screens below:
  • a

    adorable-sundown-22347

    12/01/2022, 5:06 PM
    the test itself:
  • b

    bitter-fountain-36713

    12/01/2022, 5:12 PM
    Your timestamp steps will run immediately as opposed to the cypress commands that are queued. You can check this out for timestamps https://glebbahmutov.com/blog/cypress-tips-and-tricks/#time-part-of-the-test
  • a

    adorable-sundown-22347

    12/01/2022, 5:18 PM
    Thanks, Josh. It won't help coz there is no API in my case. I've already tried cy.intercept (((
  • b

    bitter-fountain-36713

    12/01/2022, 5:23 PM
    The application may be different but the timestamp creation should still be the same.
  • g

    gray-kilobyte-89541

    12/01/2022, 5:24 PM
    Ohhh, it is a beautiful question, and I have answered it in my (unfortunately) paid lesson "Bonus 51: Confirm the downloaded image file" of https://cypress.tips/courses/network-testing
  • g

    gray-kilobyte-89541

    12/01/2022, 5:27 PM
    sure it will. just need to use
    .then
    to properly take the timestamps between the commands. Or use https://github.com/bahmutov/cypress-timestamps
  • b

    brave-mouse-59640

    12/01/2022, 5:28 PM
    Hi All, I'm getting websocket connection error "WebSocket is closed before the connection is established." After login to the application, it navigate to production url. So hence navigate to stage URL. At that time i am getting above socket connect error
  • a

    adorable-sundown-22347

    12/01/2022, 5:31 PM
    thanks for response, will try it right now
  • p

    polite-garage-57372

    12/01/2022, 6:06 PM
    That is the alias of the cy.intercept request that I call in the beforeEach.
  • m

    microscopic-terabyte-93535

    12/01/2022, 6:58 PM
    I'm having this same issue. Have you found a solution?
  • m

    microscopic-terabyte-93535

    12/01/2022, 7:02 PM
    I am running into this problem as well. Have you found any solutions?
  • f

    fresh-doctor-14925

    12/01/2022, 7:24 PM
    You've posted this several times already without a response. I suggest that you take a look at #763097415896268840 for some tips on how to make your question easier to answer
  • a

    adorable-sundown-22347

    12/01/2022, 7:31 PM
    already did it using .then way. The solution is kinda complex but it works. If someone needs it please mention and I'll share the code...
  • m

    millions-scientist-9990

    12/01/2022, 8:01 PM
    I now use the cypress docker
  • g

    gray-kilobyte-89541

    12/01/2022, 8:37 PM
    you can add a couple of custom commands and then there will be no
    cy.then
    (pun intended)
  • a

    adorable-sundown-22347

    12/01/2022, 8:48 PM
    Interesting. Will try later ))) now I'm busy with celebrating my code works )))
  • g

    gray-kilobyte-89541

    12/01/2022, 9:59 PM
    I made a little plugin for you https://github.com/bahmutov/cypress-time-marks
  • a

    adorable-sundown-22347

    12/01/2022, 10:30 PM
    Thanks a lot !
  • p

    powerful-agency-55160

    12/02/2022, 1:45 AM
    Hi all, i'm trying intercept API Upload file. My script like this. but, this
    wait
    never wait for this intercept, so return always
    undefined
    . when i'm trying give cy.wait(2000), this wait can assertion this response because Upload file is finish. Why this happen, and what solution to wait for this intercept. Thank you.
  • g

    gray-kilobyte-89541

    12/02/2022, 1:56 AM
    interesting question, how does it upload the file?
  • p

    powerful-agency-55160

    12/02/2022, 2:07 AM
    im upload file just find element and using keyword attachment. thats UI like this.
  • p

    powerful-student-85548

    12/02/2022, 4:18 AM
    Hi everyone. Does anyone know how to get rid of the 503: Service Unavailable? I am getting that too often during running my suite.
  • b

    bitter-fountain-36713

    12/02/2022, 4:30 AM
    503 is a server related error code. Is your app up and running? https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503
  • a

    able-guitar-55705

    12/02/2022, 4:33 AM
    Hi! I am getting the following error in my github action while running cypress: env variables are required my action is as follows:
    Copy code
    yaml
    name: Cypress Tests
    on: [push]
    jobs:
      cypress-run:
        runs-on: ubuntu-latest
        steps:
          - name: Checkout
            uses: actions/checkout@v2
          - name: Cypress run
            uses: cypress-io/github-action@v4.1.0
            with:
              build: npm run build
              start: npm start
            env:
              NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
              NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
    I have tried the following and all have failed: 1. putting the environment variables in cypress.config.ts 2. putting the environment variables in github secrets My test:
    Copy code
    ts
    describe('Plan', () => {
      it('Displays login required and redirects user to login page when clicked on', () => {
        cy.visit('http://localhost:3000/plan')
        cy.findByRole('link', { name: /login required/i }).click()
        cy.url().should('include', '/login')
      })
    })
    I'm new to cypress testing and testing in general so any help is much appreciated. Thank you!
1...157158159...192Latest