test element file routing

This commit is contained in:
Yisroel Baum 2026-06-14 23:05:45 +03:00
parent 14d2ce2284
commit 0d5783ba9c
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
14 changed files with 951 additions and 388 deletions

View file

@ -51,7 +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-pdf-link"]').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="child-element-list"]').should('be.visible')
cy.get('[data-cy="child-element-list"]')
.should(
@ -116,13 +117,14 @@ 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-pdf-link"]', 'View PDF')
.as('pdfLink')
cy.contains('[data-cy="element-short-pdf-link"]', 'View Short PDF')
.as('shortPdfLink')
.should('be.visible')
.and('have.attr', 'target', '_blank')
cy.get('@pdfLink')
cy.get('@shortPdfLink')
.and('have.attr', 'href')
.and('include', '/storage/element-pdfs/baderech.pdf')
.and('include', '/storage/element-pdfs/short/baderech.pdf')
cy.get('[data-cy="element-long-pdf-link"]').should('not.exist')
cy.contains('[data-cy="child-element-link"]', introductionAudioTitle)
.as('introductionAudioLink')
.should('have.attr', 'href', '/element/8')
@ -132,7 +134,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-pdf-link"]').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="child-element-list"]').should('not.exist')
cy.get('[data-cy="element-youtube-embed"]')
.should('be.visible')