Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when moving test to test #1269

Closed
odranoelBR opened this issue Feb 7, 2018 · 3 comments
Closed

Crash when moving test to test #1269

odranoelBR opened this issue Feb 7, 2018 · 3 comments

Comments

@odranoelBR
Copy link

odranoelBR commented Feb 7, 2018

  • Operating System: Linux
  • Cypress Version: 1.4.1
  • Browser Version: Chrome 64.0.3282.140

Is this a Feature or Bug?

Bug

Current behavior:

After the last step of first step, browser crash and present error in console.

Desired behavior:

Finish the first test and go next.

Error in console:

WebSocket connection to 'ws://localhost:7001/__socket.io/?EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 404

Info

In the last step, click on the button. This button make a XHR call that return a new tab.

Test code:

describe(' 1ª via', function () {
  it('Titular  SUCESSO', function () {
    cy.visit('http://localhost:8080/')

    cy.get('.q-collapsible-closed:nth-child(3)').click()
    cy.get('.q-collapsible-opened .q-list .q-item-link:nth-child(1)').click()
    cy.get('#nr-ordem-cpf').click()
    cy.get('#nr-ordem-cpf input').type('32134213')
    cy.get('.bg-secondary.text-white').should('be.visible')
    cy.get('.bg-secondary.text-white').click()
    cy.get('label:nth-child(2)').click()
    cy.get('.q-card-actions > .bg-orange').click()
    cy.get('#card-identificacao-titular .q-select:nth-child(1)').click()
    cy.get('.q-popover .q-list .q-item:nth-child(1)').click()
    cy.get('#card-identificacao-titular .q-datetime-input').click()
    cy.get('.q-datetime-days > .cursor-pointer:first').click({ force: true })
    cy.get('.text-primary+ .text-primary').click({ multiple: true, force: true })
    cy.get('#card-publicacao input').type('101020')
    cy.get('#card-publicacao .q-select').click()
    cy.get('.q-popover .q-list .q-item:nth-child(1)').click()
    cy.get('#card-publicacao .q-datetime-input').click()
    cy.get('.q-datetime-days > .cursor-pointer:first').click({ force: true })
    cy.get('.text-primary+ .text-primary').click({ multiple: true, force: true })
    cy.get('#card-recibo .text-left').type('12345678998765432112345611111111111111111111')
    cy.get('#finalizar').should('be.visible')
    cy.get('#finalizar').click()
    cy.get('.modal-buttons button:nth-child(2)').should('be.visible')
    cy.get('.modal-buttons button:nth-child(2)').click()
    cy.get('.modal-buttons button:nth-child(2)').click()
    cy.get('.modal-header').should('eq', 'Primeira via criada com sucesso!')
  })

  it('Titular  JÁ POSSUI PROCESSO aberto', function () {
    cy.visit('http://localhost:8080/')

    cy.get('.q-collapsible-closed:nth-child(3)').click()
    cy.get('.q-collapsible-opened .q-list .q-item-link:nth-child(1)').click()
    cy.get('#nr-ordem-cpf').click()
    cy.get('#nr-ordem-cpf input').type('6153690')
    cy.get('.bg-secondary.text-white').click()
    cy.get('label:nth-child(2)').click()
    cy.get('td~ td+ td span').should('have.text', 'PENDENTE_IMAGEM')
  })
})

Additional Info (images, stack traces, etc)

error

@brian-mann
Copy link
Member

It looks like your app is doing some kind of redirect or has some security mechanism in place that breaks Cypress. Without more information debugging this is impossible. We'd need a reproducible repo or access to an external server with this behavior.

It almost appears that your site is doing framebusting whereby it's redirecting Cypress.

There are lots of other issues open that describe this and we've provided several workarounds for it. Most recent issue is this: #1245

@jennifer-shehane
Copy link
Member

Some updates to frame-busting changes we're making can be read here: #886

@odranoelBR
Copy link
Author

Tks, i'm closing and watching other tickets and feedbacking when works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants