From 4714ab6229fc5245ebb53a1816caebcc024aa774 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 17 Jan 2025 15:28:14 -0300 Subject: [PATCH] stabilze e2e --- ... pdf sidepanel and show the correct page #0.png} | Bin cypress/e2e/pdf-display.cy.ts | 6 ++---- 2 files changed, 2 insertions(+), 4 deletions(-) rename cypress/e2e/__image_snapshots__/{PDF display responsiveness IX sidepanel should open the pdf sidepanel and show in the correct page #0.png => PDF display responsiveness IX sidepanel should open the pdf sidepanel and show the correct page #0.png} (100%) diff --git a/cypress/e2e/__image_snapshots__/PDF display responsiveness IX sidepanel should open the pdf sidepanel and show in the correct page #0.png b/cypress/e2e/__image_snapshots__/PDF display responsiveness IX sidepanel should open the pdf sidepanel and show the correct page #0.png similarity index 100% rename from cypress/e2e/__image_snapshots__/PDF display responsiveness IX sidepanel should open the pdf sidepanel and show in the correct page #0.png rename to cypress/e2e/__image_snapshots__/PDF display responsiveness IX sidepanel should open the pdf sidepanel and show the correct page #0.png diff --git a/cypress/e2e/pdf-display.cy.ts b/cypress/e2e/pdf-display.cy.ts index 999821840b..f7b9f99e49 100644 --- a/cypress/e2e/pdf-display.cy.ts +++ b/cypress/e2e/pdf-display.cy.ts @@ -250,7 +250,8 @@ describe('PDF display', () => { cy.contains('td', 'Entity with pdf (es)'); }); - it('should open the pdf sidepanel and show in the correct page', () => { + it('should open the pdf sidepanel and show the correct page', () => { + cy.contains('button', 'Open PDF').scrollIntoView(); cy.contains('button', 'Open PDF').realTouch(); cy.contains('Loading').should('not.exist'); cy.get('#pdf-container').within(() => { @@ -260,9 +261,6 @@ describe('PDF display', () => { cy.get('.highlight-rectangle').should('be.visible'); }); cy.get('#root').toMatchImageSnapshot(); - }); - - it('should only show visible pages', () => { cy.get('#pdf-container').within(() => { cy.get('#page-1-container .page').should('be.empty'); cy.get('#page-2-container .page').should('not.be.empty');