diff --git a/backend/tests/Feature/DemoSeedDataTest.php b/backend/tests/Feature/DemoSeedDataTest.php index 0ad2968..bdbad25 100644 --- a/backend/tests/Feature/DemoSeedDataTest.php +++ b/backend/tests/Feature/DemoSeedDataTest.php @@ -71,6 +71,10 @@ class DemoSeedDataTest extends TestCase ], $this->serializeChildElements($childElements), ); + $this->assertSame( + $this->expectedIntroductionRichText(), + $childElements[0]->getRichText(), + ); } private function serializeChildElements(array $childElements): array @@ -85,4 +89,60 @@ class DemoSeedDataTest extends TestCase return $serializedChildElements; } + + private function expectedIntroductionRichText(): string + { + return '
A 'Baderech HaAvoda' is a way of living - a structured " + . 'path for inner and outer growth, spiritual refinement, and ' + . 'personal development. It is the art and discipline of knowing ' + . 'where to place your attention, how to engage your inner and ' + . 'outer world, and how to live the kind of life Hashem designed ' + . 'for human beings: a life of wholeness, integration, clarity, ' + . 'and joy.
' + . 'Throughout Jewish history, our sages taught that no person ' + . 'can reach their potential without a derech - a framework that ' + . 'provides:
' + . 'Baderech HaAvoda answers core human questions:
' + . 'Without a derech, people react to life instead of ' + . 'responding with wisdom.
' + . 'Without a derech, inspiration fades as quickly as it ' + . 'comes.
' + . 'Without a derech, a person cannot integrate what they ' + . 'learn into who they become.
' + . 'A Baderech HaAvoda is therefore not a luxury - it is a ' + . 'necessity for anyone who wants to live consciously, ' + . 'purposefully, and in alignment with their Creator.
' + . 'We live in a time overflowing with information and ' + . 'stimulation, yet starving for depth.
' + . 'Our generation faces challenges that previous generations ' + . 'rarely confronted:
' + . 'People today are not taught:
' + . 'We have incredible access to knowledge, yet many feel lost ' + . '- not for lack of information, but for lack of direction.
' + . 'A Baderech HaAvoda gives structure to the soul, it creates ' + . 'inner order, and it transforms scattered potential into ' + . 'living wisdom. It is a map for living a wholesome, healthy, ' + . 'and spiritually aligned life - the life we were created for.' + . '
'; + } } diff --git a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts index bc14896..0f08b0e 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts @@ -92,7 +92,21 @@ describe('media page sets', () => { cy.location('pathname').should('eq', '/element/2') cy.contains('h1', '1. Introduction').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-rich-text"]') + .should('contain.text', 'What is Baderech HaAvoda?') + .and( + 'contain.text', + 'Why We Need a Path of Spiritual Practice', + ) + .and( + 'contain.text', + "A 'Baderech HaAvoda' is a way of living", + ) + .and('contain.text', 'Direction') + .and('contain.text', 'How do I grow?') + .and('contain.text', 'The Challenge of Our Generation') + .and('contain.text', 'So many are Hashkafikly homeless') + .and('contain.text', 'the life we were created for.') cy.get('[data-cy="element-youtube-embed"]').should('not.exist') cy.get('[data-cy="element-pdf-link"]').should('not.exist') })