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

    aloof-beach-98822

    06/28/2022, 1:37 PM
    It is not in the local storage
  • w

    wooden-teacher-96595

    06/28/2022, 1:40 PM
    so before you run a cy.visit generate the access token, then set this as the cookie needed. when you run the visit the cookie should be present with the accesstoken information and this is used when the site loads up.
  • w

    wooden-teacher-96595

    06/28/2022, 1:41 PM
    you need to make sure the cookie with the access token is present before calling the cy.visit
  • a

    aloof-beach-98822

    06/28/2022, 1:52 PM
    Sorry to ask you . Do you have a code for that?
  • b

    busy-honey-89505

    06/28/2022, 2:25 PM
    Hi all. Trying to use the Github Action to do Cypress testing on my Gatsby JS site. Here is what I have so far
    Copy code
    steps:
        - uses: actions/checkout@v3
        - name: Use Node.js ${{ matrix.node-version }}
          uses: actions/setup-node@v3
          with:
            node-version: ${{ matrix.node-version }}
            cache: 'npm'
        - name: Install dependencies
          run: npm ci
        - name: Cypress run
          uses: cypress-io/github-action@v4
          with:
            start: npm run develop
            record: true
            wait-on: 'http://localhost:8000'
            wait-on-timeout: 120
          env:
            CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    the
    npm develop
    job is
    "develop": "gatsby develop",
    which starts a server on port 8000 The logs state that the Gatsby
    develop
    job has ran successfully:
    Copy code
    You can now view your project in the browser.
    ā €
      http://localhost:8000/
    But Cypress fails to run. This is the error
    Copy code
    http://localhost:8000 timed out on retry 271 of 9, elapsed 270697ms, limit 270000ms
    Error: connect ECONNREFUSED 127.0.0.1:8000
  • b

    busy-honey-89505

    06/28/2022, 2:25 PM
    Hoping it's a syntax error somewhere?
  • l

    late-planet-4481

    06/28/2022, 2:53 PM
    We use Azure for CI and run our Cypress tests against every pull request. I highly recommend it. Since e2e tests tend to take longer you'll want to take measures to shorten execution time. The easiest way to do this is by parallelizing the tests using the Cypress Dashboard.
  • d

    delightful-microphone-80931

    06/28/2022, 2:54 PM
    Hi all! The company - I have recently started working for - has a separate repo for each API. I need test each API repo and I need to do E2E tests for the combination of some APIs, as well. What will be the best practice for test automation repo? Should I keep my tests in the same repo with DEVs or in a separate repo? Your ideas and experience will help a lot! Thanks in advance!
  • m

    millions-architect-22884

    06/28/2022, 2:54 PM
    @late-planet-4481 šŸ‘
  • l

    late-planet-4481

    06/28/2022, 3:03 PM
    This really depends on a lot of things. If you'll be using a lot of similar steps between all the API tests they might benefit from being in a single repo. It also matters who will be maintaining the tests. If the developers will be maintaining the tests and/or utilizing them during development then it makes sense to keep them in the same repository as the code they are testing. Otherwise it's up to you. It really would be ideal for developers to contribute to the tests since their changes will be breaking tests left and right.
  • d

    delightful-microphone-80931

    06/28/2022, 3:18 PM
    thank you!
  • m

    millions-architect-22884

    06/28/2022, 4:29 PM
    Why does Azure CI build fails when any test fails in Cypress E2E? Following error is produced ##[warning]Couldn't find a debug log in the cache or working directory ##[error]Error: Npm failed with return code: 1
  • a

    aloof-beach-98822

    06/28/2022, 4:59 PM
    Can anybody help me with this error? cy.task('lighthouse') failed with the following error, you probably have multiple tabs open to the same origin
  • a

    aloof-beach-98822

    06/28/2022, 5:00 PM
    one prod website has this issue
  • m

    millions-architect-22884

    06/28/2022, 5:42 PM
    Running Cypress E2E test task on Angular App in Azure Pipeline should be NPM task or Powershell script? Can anybody please help me with the YAML specifications.
  • a

    aloof-beach-98822

    06/28/2022, 11:24 PM
    Hi all, I got this code from glebs blog Object.getOwnPropertyDescriptor(win.navigator, 'ServiceWorker') // undefined Object.getOwnPropertyDescriptor(win.navigator.__proto__, 'ServiceWorker') // {set: undefined, enumerable: true, configurable: true, get: ʒ} , Where do I put this code in cypress to disable serviceworker? Please Advise
  • g

    gray-kilobyte-89541

    06/28/2022, 11:36 PM
    ohh that gleb and his blog posts
  • a

    aloof-beach-98822

    06/28/2022, 11:40 PM
    Hi Gleb, Thank you for this blog. Where do I put this code to disable service worker?
  • g

    gray-kilobyte-89541

    06/29/2022, 1:33 AM
    what is the blog url? I thought the blog should show it and explain where, but pretty much when you visit or on before window event
  • a

    aloof-beach-98822

    06/29/2022, 1:42 AM
    https://glebbahmutov.com/blog/cypress-tips-and-tricks/#cyget-vs-cyintercept-commands
  • a

    aloof-beach-98822

    06/29/2022, 1:46 AM
    I am keep getting this error. cy.task('lighthouse') failed with the following error, you probably have multiple tabs open to the same origin one prod website has this issue.Since last week I am trying to resolve it in different ways. So I thought of trying this option too to disable the service worker. Please advise
  • n

    nice-continent-94474

    06/29/2022, 3:28 AM
    hi all
  • n

    nice-continent-94474

    06/29/2022, 3:28 AM
    I got an error like this:
  • n

    nice-continent-94474

    06/29/2022, 3:29 AM
    How to solve the error above?
  • b

    bright-park-76512

    06/29/2022, 6:35 AM
    Hi everyone. I'm here for a help. I'm facing an issue related to cookies being set in browser with Cypress. https://github.com/cypress-io/cypress/discussions/21509#discussioncomment-3009357 I'm relatively new with Cypress .. I've spent so much time with this issue.It would be really helpful if someone takes a look
    l
    • 2
    • 7
  • a

    ambitious-school-63406

    06/29/2022, 9:14 AM
    Hello. Does anyone know how to connect Jenkins JUint results, with manual existed tests in Xray? Is it possible to add tags in tests. I made a connection, but it generates for me a new Generic test. I try to achieve this kind of report. I managed to add property name="test_id", but can not retrieve value from tests
  • a

    adorable-stone-42197

    06/29/2022, 10:07 AM
    module.exports = (on, config) => { require('cypress-data-session/src/plugin')(on, config); }; when i put this. My lint showing the error. How i can resolve this?
  • g

    gray-kilobyte-89541

    06/29/2022, 11:07 AM
    what lint? what error? you have provided no information for me to answer or help
  • f

    full-journalist-87924

    06/29/2022, 1:27 PM
    when running tests in the GUI all tests run wether one it fails or not, when using npx cypress run in the command line if an it fails all other its are skipped within a describe, is there a way to stop this?
  • l

    late-planet-4481

    06/29/2022, 1:36 PM
    Cannot set cookie with secure attribute ...
1...606162...192Latest