test pdf viewer
This commit is contained in:
parent
c445234092
commit
f1c4e896b6
2 changed files with 34 additions and 16 deletions
|
|
@ -51,8 +51,8 @@ describe('media page sets', () => {
|
|||
cy.get('[data-cy="element-rich-text"]').should('not.exist')
|
||||
cy.get('[data-cy="element-youtube-embed"]')
|
||||
.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.get('[data-cy="child-element-list"]').should('be.visible')
|
||||
cy.get('[data-cy="child-element-list"]')
|
||||
.should(
|
||||
|
|
@ -117,14 +117,34 @@ describe('media page sets', () => {
|
|||
)
|
||||
.should('have.css', 'text-align', 'center')
|
||||
cy.get('[data-cy="element-youtube-embed"]').should('not.exist')
|
||||
cy.contains('[data-cy="element-short-pdf-link"]', 'View Short PDF')
|
||||
.as('shortPdfLink')
|
||||
cy.contains(
|
||||
'[data-cy="element-short-pdf-viewer-button"]',
|
||||
'View Short PDF',
|
||||
)
|
||||
.as('shortPdfButton')
|
||||
.should('be.visible')
|
||||
cy.get('[data-cy="element-long-pdf-viewer-button"]').should('not.exist')
|
||||
cy.get('@shortPdfButton').click()
|
||||
cy.get('[data-cy="pdf-viewer-modal"]').should('be.visible')
|
||||
cy.contains('[data-cy="pdf-viewer-title"]', 'Short PDF').should(
|
||||
'be.visible',
|
||||
)
|
||||
cy.get('[data-cy="pdf-viewer-document"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-page-status"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-previous-page"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-next-page"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-zoom-out"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-zoom-in"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-search-input"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-download"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-print"]').should('be.visible')
|
||||
cy.get('[data-cy="pdf-viewer-open-link"]')
|
||||
.should('be.visible')
|
||||
.and('have.attr', 'target', '_blank')
|
||||
cy.get('@shortPdfLink')
|
||||
.and('have.attr', 'href')
|
||||
.and('include', '/storage/element-pdfs/short/baderech.pdf')
|
||||
cy.get('[data-cy="element-long-pdf-link"]').should('not.exist')
|
||||
cy.get('[data-cy="pdf-viewer-close"]').click()
|
||||
cy.get('[data-cy="pdf-viewer-modal"]').should('not.exist')
|
||||
cy.contains('[data-cy="child-element-link"]', introductionAudioTitle)
|
||||
.as('introductionAudioLink')
|
||||
.should('have.attr', 'href', '/element/8')
|
||||
|
|
@ -134,8 +154,8 @@ describe('media page sets', () => {
|
|||
cy.contains('h1', introductionAudioTitle).should('be.visible')
|
||||
cy.get('[data-cy="element-icon"]').should('not.exist')
|
||||
cy.get('[data-cy="element-rich-text"]').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.get('[data-cy="child-element-list"]').should('not.exist')
|
||||
cy.get('[data-cy="element-youtube-embed"]')
|
||||
.should('be.visible')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue