From 1c5f6266fc4a11aafe97c02f05953612e1b984fd Mon Sep 17 00:00:00 2001 From: Angelika Kinas Date: Thu, 18 Jan 2024 09:50:20 +0100 Subject: [PATCH] feat(DH): Add e2e test for thumbnail in dataset page --- apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts index 2862cb59c9..e490683a5e 100644 --- a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts +++ b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts @@ -103,6 +103,20 @@ describe('dataset pages', () => { expect(text).not.to.equal('') }) }) + it.only('should display the thumbnail image and magnify', () => { + cy.get('datahub-record-metadata') + .find('[id="about"]') + .find('gn-ui-image-overlay-preview') + .as('overlay') + .should('have.length', 1) + cy.get('@overlay').find('gn-ui-button').click() + cy.get('[class="basicLightbox__placeholder"]') + .as('lightbox') + .find('img') + .should('have.length', 1) + cy.get('body').click() + cy.get('@lightbox').should('have.length', 0) + }) it('should display the contact details', () => { cy.get('datahub-record-metadata') .find('[id="about"]')