test baderech demo cards

This commit is contained in:
Yisroel Baum 2026-05-27 21:38:36 +03:00
parent 53f0dfc1ed
commit d1efea2bd5
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -45,16 +45,9 @@ describe('media page sets', () => {
.should('be.visible') .should('be.visible')
.and('have.attr', 'src') .and('have.attr', 'src')
.and('include', '/assets/baderech-haavodah-icon.png') .and('include', '/assets/baderech-haavodah-icon.png')
cy.get('[data-cy="element-rich-text"]').within(() => { cy.get('[data-cy="element-rich-text"]').should('not.exist')
cy.contains('Begin with a clear map for avodah growth.')
.should('be.visible')
cy.contains('strong', 'Move steadily').should('be.visible')
})
cy.get('[data-cy="element-youtube-embed"]') cy.get('[data-cy="element-youtube-embed"]')
.should('be.visible') .should('not.exist')
.and('have.attr', 'src')
.and('include', 'https://www.youtube.com/embed/yHx-r4p6hHU')
.and('include', 'start=1')
cy.contains('[data-cy="element-pdf-link"]', 'View PDF') cy.contains('[data-cy="element-pdf-link"]', 'View PDF')
.should('be.visible') .should('be.visible')
.and('have.attr', 'href', '/assets/pdfs/baderech.pdf') .and('have.attr', 'href', '/assets/pdfs/baderech.pdf')
@ -63,35 +56,45 @@ describe('media page sets', () => {
cy.get('[data-cy="child-element-list"]') cy.get('[data-cy="child-element-list"]')
.should( .should(
'not.contain.text', 'not.contain.text',
'Avodah foundations begin with honest awareness', 'Begin with a clear map for avodah growth.',
) )
cy.contains('[data-cy="child-element-link"]', 'Avodah Foundations') cy.contains('[data-cy="child-element-link"]', 'Introduction')
.as('avodahFoundationsLink') .as('introductionLink')
.should('have.attr', 'href', '/element/2') .should('have.attr', 'href', '/element/2')
cy.get('@avodahFoundationsLink') cy.get('@introductionLink')
.should( .should(
'contain.text', 'contain.text',
'Core foundations for building a steady avodah practice.', 'Your beliefs influence your thinking, and your thinking drives',
) )
cy.contains('[data-cy="child-element-link"]', 'Daily Practice') cy.contains('[data-cy="child-element-link"]', 'Foundations')
.as('dailyPracticeLink')
.should('have.attr', 'href', '/element/3')
cy.get('@dailyPracticeLink')
.should( .should(
'contain.text', 'contain.text',
'Practical steps for consistent daily growth.', 'Focal points for thriving in a chaotic world.',
) )
cy.contains('[data-cy="child-element-link"]', 'Divine Plan')
.should(
'contain.text',
'Understanding the unique greatness of our generation',
)
cy.contains(
'[data-cy="child-element-link"]',
'Architecture of the Soul',
)
.should(
'contain.text',
"Becoming a Baal Da'at - A Master of Inner Awareness",
)
cy.contains('[data-cy="child-element-link"]', 'Arba Yesodot')
.should('contain.text', 'Physical & Financial Health')
cy.contains('[data-cy="child-element-link"]', 'Fluid Integration')
.should('contain.text', 'engender a shift in mindset')
.and('have.attr', 'href', '/element/7')
cy.contains('[data-cy="child-element-link"]', 'Avodah Foundations') cy.contains('[data-cy="child-element-link"]', 'Introduction').click()
.click()
cy.location('pathname').should('eq', '/element/2') cy.location('pathname').should('eq', '/element/2')
cy.contains('h1', 'Avodah Foundations').should('be.visible') cy.contains('h1', 'Introduction').should('be.visible')
cy.get('[data-cy="element-icon"]').should('not.exist') cy.get('[data-cy="element-icon"]').should('not.exist')
cy.get('[data-cy="element-rich-text"]') cy.get('[data-cy="element-rich-text"]').should('not.exist')
.should(
'contain.text',
'Avodah foundations begin with honest awareness',
)
cy.get('[data-cy="element-youtube-embed"]').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-pdf-link"]').should('not.exist')
}) })