Skip to content

Commit 3a3aa10

Browse files
authored
test: fix flaky cy-in-cy selector validity test (#21360)
1 parent df3ca15 commit 3a3aa10

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/app/cypress/e2e/cypress-in-cypress.cy.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,10 @@ describe('Cypress in Cypress', { viewportWidth: 1500, defaultCommandTimeout: 100
208208
it(`resets selector playground validity when selecting element with playground selector in ${testingType}`, () => {
209209
startAtSpecsPage(testingType)
210210

211-
cy.get('[data-cy="spec-item"]').first().click()
212-
cy.get('#unified-reporter').should('be.visible')
211+
const spec = testingType === 'e2e' ? 'dom-content.spec.js' : 'TestComponent.spec.jsx'
212+
213+
cy.get('[data-cy="spec-item"]').contains(spec).click()
214+
cy.get('.passed > .num').should('contain', 1)
213215

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

0 commit comments

Comments
 (0)