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

Cypress doesn't handle well position: fixed or/and transform: translate #2558

Open
kud opened this Issue Oct 3, 2018 · 0 comments

Comments

1 participant
@kud

kud commented Oct 3, 2018

Current behavior:

image

Cypress is telling me

CypressError: Timed out retrying: expected '<div#header-panel-login.panel.login-panel.show>' to be 'visible'

This element '<div#header-panel-login.panel.login-panel.show>' is not visible because it has CSS property: 'position: fixed' and its being covered by another element:

<div class="article-box heading-section-box">...</div>

However, when you check the display, the form in the header with "contexte" is visible.

Desired behavior:

No error, assertion should be "true".

Steps to reproduce:

Try a test on contexte.com and do:

  it.only(`shows login form when clicking on login button in the header after scrolling`, function() {
    // # GIVEN visiting the home and scrolling, the login form shouldn't be visible
    cy.visit('/')

    cy.contains('Voir tous les articles et brèves').scrollIntoView()

    cy.get('#header-panel-login')
      .should('not.be.visible')

    // # WHEN clicking on "login" button
    cy.get('.account-menu-toggle')
      .contains('Se connecter')
      .click()

    // # THEN the login form must be visible
    cy.get('#header-panel-login')
      .should('be.visible')
  })

Versions

cypress: 3.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment