From 6b60e07f1a4a90ed676c7855323e24cd303d9a44 Mon Sep 17 00:00:00 2001 From: imagoiq <12294151+imagoiq@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:31:09 +0200 Subject: [PATCH 1/3] test(snapshots): Wait for icons --- packages/documentation/cypress.snapshot.config.js | 2 +- .../cypress/snapshots/components/button.snapshot.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/documentation/cypress.snapshot.config.js b/packages/documentation/cypress.snapshot.config.js index f060334cf2..6d6de3f250 100644 --- a/packages/documentation/cypress.snapshot.config.js +++ b/packages/documentation/cypress.snapshot.config.js @@ -4,7 +4,7 @@ module.exports = defineConfig({ projectId: 'f9aegu', e2e: { baseUrl: 'http://localhost:9300', - specPattern: ['cypress/**/*.snapshot.{ts,tsx}'], + specPattern: ['cypress/**/button.snapshot.{ts,tsx}'], includeShadowDom: true, viewportWidth: 1024, viewportHeight: 576, diff --git a/packages/documentation/cypress/snapshots/components/button.snapshot.ts b/packages/documentation/cypress/snapshots/components/button.snapshot.ts index 38e226a7eb..6d8360114e 100644 --- a/packages/documentation/cypress/snapshots/components/button.snapshot.ts +++ b/packages/documentation/cypress/snapshots/components/button.snapshot.ts @@ -1,7 +1,7 @@ describe('Button', () => { it('default', () => { cy.visit('/iframe.html?id=snapshots--button'); - cy.get('button', { timeout: 30000 }).should('be.visible'); + cy.get('button post-icon', { timeout: 30000 }).should('be.visible').pause(); cy.percySnapshot('Buttons', { widths: [1440] }); }); }); From 0abb63f54f27c25d0f002a9a887c64a22a04e185 Mon Sep 17 00:00:00 2001 From: imagoiq <12294151+imagoiq@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:31:51 +0200 Subject: [PATCH 2/3] Remove pause --- .../cypress/snapshots/components/button.snapshot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/cypress/snapshots/components/button.snapshot.ts b/packages/documentation/cypress/snapshots/components/button.snapshot.ts index 6d8360114e..b9087b8749 100644 --- a/packages/documentation/cypress/snapshots/components/button.snapshot.ts +++ b/packages/documentation/cypress/snapshots/components/button.snapshot.ts @@ -1,7 +1,7 @@ describe('Button', () => { it('default', () => { cy.visit('/iframe.html?id=snapshots--button'); - cy.get('button post-icon', { timeout: 30000 }).should('be.visible').pause(); + cy.get('button post-icon', { timeout: 30000 }).should('be.visible'); cy.percySnapshot('Buttons', { widths: [1440] }); }); }); From 97bb647fef2c3b8fecebe03c8f94456795062641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aliz=C3=A9=20Debray?= <33580481+alizedebray@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:25:50 +0200 Subject: [PATCH 3/3] Update packages/documentation/cypress.snapshot.config.js --- packages/documentation/cypress.snapshot.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/cypress.snapshot.config.js b/packages/documentation/cypress.snapshot.config.js index 6d6de3f250..f060334cf2 100644 --- a/packages/documentation/cypress.snapshot.config.js +++ b/packages/documentation/cypress.snapshot.config.js @@ -4,7 +4,7 @@ module.exports = defineConfig({ projectId: 'f9aegu', e2e: { baseUrl: 'http://localhost:9300', - specPattern: ['cypress/**/button.snapshot.{ts,tsx}'], + specPattern: ['cypress/**/*.snapshot.{ts,tsx}'], includeShadowDom: true, viewportWidth: 1024, viewportHeight: 576,