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

test: fix flaky cy-in-cy selector validity test #21360

Merged
merged 7 commits into from
May 12, 2022
6 changes: 4 additions & 2 deletions packages/app/cypress/e2e/cypress-in-cypress.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ describe('Cypress in Cypress', { viewportWidth: 1500, defaultCommandTimeout: 100
it(`resets selector playground validity when selecting element with playground selector in ${testingType}`, () => {
startAtSpecsPage(testingType)

cy.get('[data-cy="spec-item"]').first().click()
cy.get('#unified-reporter').should('be.visible')
const spec = testingType === 'e2e' ? 'dom-content.spec.js' : 'TestComponent.spec.jsx'

cy.get('[data-cy="spec-item"]').contains(spec).click()
cy.get('.passed > .num').should('contain', 1)

cy.get('[data-cy="playground-activator"]').click()
cy.get('[data-cy="playground-selector"]').clear()
Expand Down