Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DH): Add basiclightbox for thumbnail preview #761

Merged
merged 7 commits into from
Jan 24, 2024
Prev Previous commit
Next Next commit
feat(DH): Add e2e test for thumbnail in dataset page
Angi-Kinas committed Jan 23, 2024
commit 1c5f6266fc4a11aafe97c02f05953612e1b984fd
14 changes: 14 additions & 0 deletions apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts
Original file line number Diff line number Diff line change
@@ -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"]')