vendredi 30 octobre 2020

Cypress test fails in GitHub Actions, but not locally in normal mode? page to load timeout

I have a couple of test in cypress, my website needs an auth authentication (I cannot remove that) ..so what I do is to use one of the different ways cypress allows you to login

cy.visit({
       url: 'https://www.bbla.dev/',
       method: 'GET',
       headers: {
         'authorization': 'basic blabla=='
       }
     })
cy.visit('/',
       {
       auth: {
         username: json.username,
         password: json.password
       }
     })

cy.visit('https://admin:admin.bla@www.bla.dev')

locally my test pass.. all of them (I have 4 suites) the problem is when I run them on my github actions ci

this is the code I'm using

  cypress-run:
runs-on: ubuntu-16.04
# Cypress Docker image with Chrome v78
# and Firefox v70 pre-installed
container: cypress/browsers:node12.13.0-chrome78-ff70
steps:
  - uses: actions/checkout@v1
  - uses: cypress-io/github-action@v2
    with:
      browser: chrome
      working-directory: ./services/bla

sometimes the first suite pass and then it timeouts; and sometimes it just timeouts from the beggining. Timeout when waiting on the page to load

Github actions logs

Aucun commentaire:

Enregistrer un commentaire