Cypress: CypressError: Timed out retrying: coordsHistory must be at least 2 sets of coords

Created on 14 Nov 2017  路  7Comments  路  Source: cypress-io/cypress

  • Operating System: Windows 10
  • Cypress Version: 1.0.3
  • Browser Version: 62

Is this a Feature or Bug?

Bug

Current behavior:

When running my tests I try to trigger a dragDrop event. Even when passing { force: true }, this exception is still encountered. This only happens on headless test runs. It worked fine in the browser.

Desired behavior:

Ideally this exception wouldn't be thrown. Not sure why it's happening.

How to reproduce:

This happened using anglar-file-upload code in a private respository. Not sure the best means to reproduce.

Test code:

    it('Allows for ---- Upload', function () {
      cy.get('.my-drop-zone').first()
        .trigger('dragover', this.dropEvent)
        .should('have.class', 'nv-file-over')
        .trigger('drop', this.dropEvent, { force: true }) // this is where it fails even with force true
    })
  })

Additional Info (images, stack traces, etc)

image

pkdriver bug

Most helpful comment

It's possible it's trigger('dragover') that causes the error. Does the error still occur if you put { force: true } on that too?

All 7 comments

It's possible it's trigger('dragover') that causes the error. Does the error still occur if you put { force: true } on that too?

@chrisbreiding yes the error is getting occurred when i have force: true, as can be seen with the code snippet I provided. I don't think my test code is as fault here since it works as expected in the browser, even without { force: true }

EDIT: Misread your comment. Drag over worked fine, the Error was thrown on Drop, as can be seen in the screenshot I attached which i captured from the video

FYI passing { force: true } as the 3rd argument is not a valid signature. It sounds weird but we expect you to pass that along with the event.

So this.dropEvent.force = true.

Didn't actually test this, and it may not have anything to do with the issue you're having.

I will try with the updated code and let you know. Hope it will fix my issue.

@brian-mann

passing force along with the dropEvent in the second parameter fixed my issue!! thanks so much for the assistance now all my tests can pass!!

I am experiencing similar issues in my own test. The frustrating part is that its not consistent.

gitMultiClickCoordsIssue

Here is the piece of code:

andValidateMvrReport(last, valid){

    cy.get('a#Tab_DataReports').should('be.visible').then(dr => {

      cy.wrap(dr).click();

      cy.get("img[src='img/expand.gif']").click({ multiple: true, timeout: 16000 })

      cy.get("tr[id^='rowInProcess']")
      .find('td').contains('Get MVR for '+last).as('currrow').then(() => {

        cy.get('@currrow').parent().prev('tr').as('therow')

        cy.get('@therow').within(() => {
          cy.get("td[id$='ResultCd']").should('have.text', valid);
        })
      })
    })
    return this;
  }
  • Operating System: Windows 10 Pro
  • Cypress Version: 3.3.2
Was this page helpful?
0 / 5 - 0 ratings

Related issues

szabyg picture szabyg  路  3Comments

brian-mann picture brian-mann  路  3Comments

rbung picture rbung  路  3Comments

carloscheddar picture carloscheddar  路  3Comments

stormherz picture stormherz  路  3Comments