From 9488cf4566f50b2b8fcfe35087f57e79e8314eb7 Mon Sep 17 00:00:00 2001 From: astone123 Date: Thu, 19 Jan 2023 15:39:58 -0500 Subject: [PATCH 1/3] wait to take snapshot until previous tooltips are gone --- packages/app/src/settings/project/ConfigCode.cy.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/app/src/settings/project/ConfigCode.cy.tsx b/packages/app/src/settings/project/ConfigCode.cy.tsx index 1cc675912150..0e24e41ae2c0 100644 --- a/packages/app/src/settings/project/ConfigCode.cy.tsx +++ b/packages/app/src/settings/project/ConfigCode.cy.tsx @@ -75,8 +75,10 @@ describe('', () => { .should('contain.text', 'plugin') }) - // Take a snapshot of the last case - cy.percySnapshot() + cy.get('.v-popper__popper--shown').should('have.length', 1).then(() => { + // Take a snapshot after the other tooltips have closed + cy.percySnapshot() + }) }) it('shows the objectTest nicely', () => { From 7b208f3fb3538e99fdf5b5f035f9f8bef868f7d5 Mon Sep 17 00:00:00 2001 From: astone123 Date: Thu, 19 Jan 2023 15:39:58 -0500 Subject: [PATCH 2/3] fix: wait to take snapshot until previous tooltips are gone --- packages/app/src/settings/project/ConfigCode.cy.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/app/src/settings/project/ConfigCode.cy.tsx b/packages/app/src/settings/project/ConfigCode.cy.tsx index 1cc675912150..0e24e41ae2c0 100644 --- a/packages/app/src/settings/project/ConfigCode.cy.tsx +++ b/packages/app/src/settings/project/ConfigCode.cy.tsx @@ -75,8 +75,10 @@ describe('', () => { .should('contain.text', 'plugin') }) - // Take a snapshot of the last case - cy.percySnapshot() + cy.get('.v-popper__popper--shown').should('have.length', 1).then(() => { + // Take a snapshot after the other tooltips have closed + cy.percySnapshot() + }) }) it('shows the objectTest nicely', () => { From f9766a9db02d659d8efb44c722dfb1feb7f2565c Mon Sep 17 00:00:00 2001 From: astone123 Date: Thu, 19 Jan 2023 16:49:20 -0500 Subject: [PATCH 3/3] fix: refactor --- packages/app/src/settings/project/ConfigCode.cy.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/app/src/settings/project/ConfigCode.cy.tsx b/packages/app/src/settings/project/ConfigCode.cy.tsx index 0e24e41ae2c0..85a6316fa8df 100644 --- a/packages/app/src/settings/project/ConfigCode.cy.tsx +++ b/packages/app/src/settings/project/ConfigCode.cy.tsx @@ -75,10 +75,8 @@ describe('', () => { .should('contain.text', 'plugin') }) - cy.get('.v-popper__popper--shown').should('have.length', 1).then(() => { - // Take a snapshot after the other tooltips have closed - cy.percySnapshot() - }) + // Take a snapshot of the last case + cy.percySnapshot() }) it('shows the objectTest nicely', () => { @@ -120,6 +118,7 @@ describe('', () => { valElement.realHover() cy.get('.v-popper__popper--shown') + .should('have.length', 1) .should('be.visible') .should('contain.text', 'env') })