test pdf viewer

This commit is contained in:
Yisroel Baum 2026-06-25 22:15:06 +03:00
parent c445234092
commit f1c4e896b6
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 34 additions and 16 deletions

View file

@ -281,14 +281,12 @@ describe('admin element editing', () => {
.should('be.visible')
.and('have.attr', 'src')
.and('include', '/storage/element-icons/')
cy.get('[data-cy="element-short-pdf-link"]')
cy.get('[data-cy="element-short-pdf-viewer-button"]')
.should('be.visible')
.and('have.attr', 'href')
.and('include', '/storage/element-pdfs/short/')
cy.get('[data-cy="element-long-pdf-link"]')
.and('contain.text', 'View Short PDF')
cy.get('[data-cy="element-long-pdf-viewer-button"]')
.should('be.visible')
.and('have.attr', 'href')
.and('include', '/storage/element-pdfs/long/')
.and('contain.text', 'View Long PDF')
cy.resetDb()
})
@ -341,8 +339,8 @@ describe('admin element editing', () => {
cy.contains('header.site-header a', 'View Element').click()
cy.get('[data-cy="element-icon"]').should('not.exist')
cy.get('[data-cy="element-short-pdf-link"]').should('not.exist')
cy.get('[data-cy="element-long-pdf-link"]').should('not.exist')
cy.get('[data-cy="element-short-pdf-viewer-button"]').should('not.exist')
cy.get('[data-cy="element-long-pdf-viewer-button"]').should('not.exist')
cy.resetDb()
})