From 53f0dfc1ed2ad3cfbfce8f2c9f06639f5214b34f Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:37:18 +0300 Subject: [PATCH 01/17] test demo seed data --- backend/tests/Feature/DemoSeedDataTest.php | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 backend/tests/Feature/DemoSeedDataTest.php diff --git a/backend/tests/Feature/DemoSeedDataTest.php b/backend/tests/Feature/DemoSeedDataTest.php new file mode 100644 index 0000000..f1c07a2 --- /dev/null +++ b/backend/tests/Feature/DemoSeedDataTest.php @@ -0,0 +1,87 @@ +seed(DatabaseSeeder::class); + + $setRepository = app(SetRepository::class); + $elementRepository = app(ElementRepository::class); + $baderechSet = $setRepository->find(1); + $rootElement = $elementRepository->findRootBySet($baderechSet); + $childElements = $elementRepository->findByParentElement($rootElement); + + $this->assertSame('', $rootElement->getRichText()); + $this->assertNull($rootElement->getYoutubeUrl()); + $this->assertCount(6, $childElements); + $this->assertSame( + [ + [ + 'title' => 'Introduction', + 'description' => 'Your beliefs influence your thinking, ' + . 'and your thinking drives your choices. When you ' + . 'nurture healthy beliefs - about yourself, about ' + . 'the Creator, and about the meaning of life - you ' + . 'unlock the ability to live with strength, ' + . 'confidence, and hope.', + ], + [ + 'title' => 'Foundations', + 'description' => 'Focal points for thriving in a chaotic ' + . 'world. In this fast, complex era, you flourish ' + . 'when you develop clarity, well-being, resilience, ' + . 'and the ability to uplift the physical world with ' + . 'spiritual intention.', + ], + [ + 'title' => 'Divine Plan', + 'description' => 'Understanding the unique greatness of ' + . 'our generation and the call to remain hopeful, ' + . 'optimistic, and resilient.', + ], + [ + 'title' => 'Architecture of the Soul', + 'description' => "Becoming a Baal Da'at - A Master of " + . 'Inner Awareness', + ], + [ + 'title' => 'Arba Yesodot', + 'description' => 'A structured approach to balanced ' + . 'living: Physical & Financial Health, ' + . 'Relationships, Wisdom and Guidance.', + ], + [ + 'title' => 'Fluid Integration', + 'description' => 'A series of practical exercises to ' + . 'engender a shift in mindset, embed healthy ' + . 'routines, positive life practices.', + ], + ], + $this->serializeChildElements($childElements), + ); + } + + private function serializeChildElements(array $childElements): array + { + $serializedChildElements = []; + foreach ($childElements as $childElement) { + $serializedChildElements[] = [ + 'title' => $childElement->getTitle(), + 'description' => $childElement->getDescription(), + ]; + } + + return $serializedChildElements; + } +} From d1efea2bd517387b2ff2c383f961aa1cf9b96c74 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:38:36 +0300 Subject: [PATCH 02/17] test baderech demo cards --- frontend/rabbi_gerzi/cypress/e2e/media.cy.ts | 57 ++++++++++---------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts index c2894a4..90b437a 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts @@ -45,16 +45,9 @@ describe('media page sets', () => { .should('be.visible') .and('have.attr', 'src') .and('include', '/assets/baderech-haavodah-icon.png') - cy.get('[data-cy="element-rich-text"]').within(() => { - 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-rich-text"]').should('not.exist') cy.get('[data-cy="element-youtube-embed"]') - .should('be.visible') - .and('have.attr', 'src') - .and('include', 'https://www.youtube.com/embed/yHx-r4p6hHU') - .and('include', 'start=1') + .should('not.exist') cy.contains('[data-cy="element-pdf-link"]', 'View PDF') .should('be.visible') .and('have.attr', 'href', '/assets/pdfs/baderech.pdf') @@ -63,35 +56,45 @@ describe('media page sets', () => { cy.get('[data-cy="child-element-list"]') .should( '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') - .as('avodahFoundationsLink') + cy.contains('[data-cy="child-element-link"]', 'Introduction') + .as('introductionLink') .should('have.attr', 'href', '/element/2') - cy.get('@avodahFoundationsLink') + cy.get('@introductionLink') .should( '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') - .as('dailyPracticeLink') - .should('have.attr', 'href', '/element/3') - cy.get('@dailyPracticeLink') + cy.contains('[data-cy="child-element-link"]', 'Foundations') .should( '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') - .click() + cy.contains('[data-cy="child-element-link"]', 'Introduction').click() 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-rich-text"]') - .should( - 'contain.text', - 'Avodah foundations begin with honest awareness', - ) + 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') }) From bb80d624c3287c7e97e0704dd8d0d90ad5d4bb9b Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:39:40 +0300 Subject: [PATCH 03/17] update demo seed data --- backend/database/seeders/ElementSeeder.php | 86 +++++++++++++++------- 1 file changed, 58 insertions(+), 28 deletions(-) diff --git a/backend/database/seeders/ElementSeeder.php b/backend/database/seeders/ElementSeeder.php index 776d842..1347d24 100644 --- a/backend/database/seeders/ElementSeeder.php +++ b/backend/database/seeders/ElementSeeder.php @@ -19,36 +19,66 @@ class ElementSeeder extends Seeder title: $baderechSet->getName(), description: $baderechSet->getDescription(), iconImageUrl: '/assets/baderech-haavodah-icon.png', - richText: '

Begin with a clear map for avodah growth.

' - . '

Move steadily from awareness ' - . 'to practice.

', + richText: '', pdfPath: '/assets/pdfs/baderech.pdf', - youtubeUrl: 'https://www.youtube.com/watch?v=' - . 'yHx-r4p6hHU&t=1s', + youtubeUrl: null, parentElement: null, )); - $elementRepository->create(new CreateElementDto( - set: $baderechSet, - title: 'Avodah Foundations', - description: 'Core foundations for building a steady ' - . 'avodah practice.', - iconImageUrl: null, - richText: '

Avodah foundations begin with honest awareness ' - . 'and small repeatable steps.

', - pdfPath: null, - youtubeUrl: null, - parentElement: $rootElement, - )); - $elementRepository->create(new CreateElementDto( - set: $baderechSet, - title: 'Daily Practice', - description: 'Practical steps for consistent daily growth.', - iconImageUrl: null, - richText: '

Daily practice turns inspiration into a ' - . 'dependable rhythm.

', - pdfPath: null, - youtubeUrl: null, - parentElement: $rootElement, - )); + + $baderechChildElements = [ + [ + 'title' => 'Introduction', + 'description' => 'Your beliefs influence your thinking, ' + . 'and your thinking drives your choices. When you ' + . 'nurture healthy beliefs - about yourself, about ' + . 'the Creator, and about the meaning of life - you ' + . 'unlock the ability to live with strength, confidence, ' + . 'and hope.', + ], + [ + 'title' => 'Foundations', + 'description' => 'Focal points for thriving in a chaotic ' + . 'world. In this fast, complex era, you flourish when ' + . 'you develop clarity, well-being, resilience, and the ' + . 'ability to uplift the physical world with spiritual ' + . 'intention.', + ], + [ + 'title' => 'Divine Plan', + 'description' => 'Understanding the unique greatness of our ' + . 'generation and the call to remain hopeful, ' + . 'optimistic, and resilient.', + ], + [ + 'title' => 'Architecture of the Soul', + 'description' => "Becoming a Baal Da'at - A Master of " + . 'Inner Awareness', + ], + [ + 'title' => 'Arba Yesodot', + 'description' => 'A structured approach to balanced living: ' + . 'Physical & Financial Health, Relationships, Wisdom ' + . 'and Guidance.', + ], + [ + 'title' => 'Fluid Integration', + 'description' => 'A series of practical exercises to ' + . 'engender a shift in mindset, embed healthy routines, ' + . 'positive life practices.', + ], + ]; + + foreach ($baderechChildElements as $baderechChildElement) { + $elementRepository->create(new CreateElementDto( + set: $baderechSet, + title: $baderechChildElement['title'], + description: $baderechChildElement['description'], + iconImageUrl: null, + richText: '', + pdfPath: null, + youtubeUrl: null, + parentElement: $rootElement, + )); + } } } From 1b63829b686f5626b6f9b837ace3b2f169912e4d Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:40:55 +0300 Subject: [PATCH 04/17] test demo root pdf --- backend/tests/Feature/DemoSeedDataTest.php | 1 + frontend/rabbi_gerzi/cypress/e2e/media.cy.ts | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/tests/Feature/DemoSeedDataTest.php b/backend/tests/Feature/DemoSeedDataTest.php index f1c07a2..0777c4a 100644 --- a/backend/tests/Feature/DemoSeedDataTest.php +++ b/backend/tests/Feature/DemoSeedDataTest.php @@ -23,6 +23,7 @@ class DemoSeedDataTest extends TestCase $childElements = $elementRepository->findByParentElement($rootElement); $this->assertSame('', $rootElement->getRichText()); + $this->assertNull($rootElement->getPdfPath()); $this->assertNull($rootElement->getYoutubeUrl()); $this->assertCount(6, $childElements); $this->assertSame( diff --git a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts index 90b437a..f3a03e1 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts @@ -48,10 +48,7 @@ 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.contains('[data-cy="element-pdf-link"]', 'View PDF') - .should('be.visible') - .and('have.attr', 'href', '/assets/pdfs/baderech.pdf') - .and('have.attr', 'target', '_blank') + cy.get('[data-cy="element-pdf-link"]').should('not.exist') cy.get('[data-cy="child-element-list"]').should('be.visible') cy.get('[data-cy="child-element-list"]') .should( From 3a707bb9d65a5a57b56758a81af4f458819d7ed2 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:41:30 +0300 Subject: [PATCH 05/17] remove demo root pdf --- backend/database/seeders/ElementSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/database/seeders/ElementSeeder.php b/backend/database/seeders/ElementSeeder.php index 1347d24..5fe7ec9 100644 --- a/backend/database/seeders/ElementSeeder.php +++ b/backend/database/seeders/ElementSeeder.php @@ -20,7 +20,7 @@ class ElementSeeder extends Seeder description: $baderechSet->getDescription(), iconImageUrl: '/assets/baderech-haavodah-icon.png', richText: '', - pdfPath: '/assets/pdfs/baderech.pdf', + pdfPath: null, youtubeUrl: null, parentElement: null, )); From d9a304004001c46eabfe458cb8e757725c8d464f Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:42:25 +0300 Subject: [PATCH 06/17] test numbered demo titles --- backend/tests/Feature/DemoSeedDataTest.php | 12 ++++++------ frontend/rabbi_gerzi/cypress/e2e/media.cy.ts | 17 +++++++++-------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/backend/tests/Feature/DemoSeedDataTest.php b/backend/tests/Feature/DemoSeedDataTest.php index 0777c4a..0ad2968 100644 --- a/backend/tests/Feature/DemoSeedDataTest.php +++ b/backend/tests/Feature/DemoSeedDataTest.php @@ -29,7 +29,7 @@ class DemoSeedDataTest extends TestCase $this->assertSame( [ [ - 'title' => 'Introduction', + 'title' => '1. Introduction', 'description' => 'Your beliefs influence your thinking, ' . 'and your thinking drives your choices. When you ' . 'nurture healthy beliefs - about yourself, about ' @@ -38,7 +38,7 @@ class DemoSeedDataTest extends TestCase . 'confidence, and hope.', ], [ - 'title' => 'Foundations', + 'title' => '2. Foundations', 'description' => 'Focal points for thriving in a chaotic ' . 'world. In this fast, complex era, you flourish ' . 'when you develop clarity, well-being, resilience, ' @@ -46,24 +46,24 @@ class DemoSeedDataTest extends TestCase . 'spiritual intention.', ], [ - 'title' => 'Divine Plan', + 'title' => '3. Divine Plan', 'description' => 'Understanding the unique greatness of ' . 'our generation and the call to remain hopeful, ' . 'optimistic, and resilient.', ], [ - 'title' => 'Architecture of the Soul', + 'title' => '4. Architecture of the Soul', 'description' => "Becoming a Baal Da'at - A Master of " . 'Inner Awareness', ], [ - 'title' => 'Arba Yesodot', + 'title' => '5. Arba Yesodot', 'description' => 'A structured approach to balanced ' . 'living: Physical & Financial Health, ' . 'Relationships, Wisdom and Guidance.', ], [ - 'title' => 'Fluid Integration', + 'title' => '6. Fluid Integration', 'description' => 'A series of practical exercises to ' . 'engender a shift in mindset, embed healthy ' . 'routines, positive life practices.', diff --git a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts index f3a03e1..bc14896 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts @@ -55,7 +55,7 @@ describe('media page sets', () => { 'not.contain.text', 'Begin with a clear map for avodah growth.', ) - cy.contains('[data-cy="child-element-link"]', 'Introduction') + cy.contains('[data-cy="child-element-link"]', '1. Introduction') .as('introductionLink') .should('have.attr', 'href', '/element/2') cy.get('@introductionLink') @@ -63,33 +63,34 @@ describe('media page sets', () => { 'contain.text', 'Your beliefs influence your thinking, and your thinking drives', ) - cy.contains('[data-cy="child-element-link"]', 'Foundations') + cy.contains('[data-cy="child-element-link"]', '2. Foundations') .should( 'contain.text', 'Focal points for thriving in a chaotic world.', ) - cy.contains('[data-cy="child-element-link"]', 'Divine Plan') + cy.contains('[data-cy="child-element-link"]', '3. Divine Plan') .should( 'contain.text', 'Understanding the unique greatness of our generation', ) cy.contains( '[data-cy="child-element-link"]', - 'Architecture of the Soul', + '4. 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') + cy.contains('[data-cy="child-element-link"]', '5. Arba Yesodot') .should('contain.text', 'Physical & Financial Health') - cy.contains('[data-cy="child-element-link"]', 'Fluid Integration') + cy.contains('[data-cy="child-element-link"]', '6. Fluid Integration') .should('contain.text', 'engender a shift in mindset') .and('have.attr', 'href', '/element/7') - cy.contains('[data-cy="child-element-link"]', 'Introduction').click() + cy.contains('[data-cy="child-element-link"]', '1. Introduction') + .click() cy.location('pathname').should('eq', '/element/2') - cy.contains('h1', 'Introduction').should('be.visible') + 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-youtube-embed"]').should('not.exist') From c794fda07435e2ed81cc603ee9c9580143daee79 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:43:10 +0300 Subject: [PATCH 07/17] number demo section titles --- backend/database/seeders/ElementSeeder.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/database/seeders/ElementSeeder.php b/backend/database/seeders/ElementSeeder.php index 5fe7ec9..9c8935d 100644 --- a/backend/database/seeders/ElementSeeder.php +++ b/backend/database/seeders/ElementSeeder.php @@ -27,7 +27,7 @@ class ElementSeeder extends Seeder $baderechChildElements = [ [ - 'title' => 'Introduction', + 'title' => '1. Introduction', 'description' => 'Your beliefs influence your thinking, ' . 'and your thinking drives your choices. When you ' . 'nurture healthy beliefs - about yourself, about ' @@ -36,7 +36,7 @@ class ElementSeeder extends Seeder . 'and hope.', ], [ - 'title' => 'Foundations', + 'title' => '2. Foundations', 'description' => 'Focal points for thriving in a chaotic ' . 'world. In this fast, complex era, you flourish when ' . 'you develop clarity, well-being, resilience, and the ' @@ -44,24 +44,24 @@ class ElementSeeder extends Seeder . 'intention.', ], [ - 'title' => 'Divine Plan', + 'title' => '3. Divine Plan', 'description' => 'Understanding the unique greatness of our ' . 'generation and the call to remain hopeful, ' . 'optimistic, and resilient.', ], [ - 'title' => 'Architecture of the Soul', + 'title' => '4. Architecture of the Soul', 'description' => "Becoming a Baal Da'at - A Master of " . 'Inner Awareness', ], [ - 'title' => 'Arba Yesodot', + 'title' => '5. Arba Yesodot', 'description' => 'A structured approach to balanced living: ' . 'Physical & Financial Health, Relationships, Wisdom ' . 'and Guidance.', ], [ - 'title' => 'Fluid Integration', + 'title' => '6. Fluid Integration', 'description' => 'A series of practical exercises to ' . 'engender a shift in mindset, embed healthy routines, ' . 'positive life practices.', From e9fa31138bf53ad9ffed0198eb9afdf9a9b47a18 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:47:07 +0300 Subject: [PATCH 08/17] test introduction rich text --- backend/tests/Feature/DemoSeedDataTest.php | 60 ++++++++++++++++++++ frontend/rabbi_gerzi/cypress/e2e/media.cy.ts | 16 +++++- 2 files changed, 75 insertions(+), 1 deletion(-) 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 '

What is Baderech HaAvoda?

' + . '

Why We Need a Path of Spiritual Practice

' + . "

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:

' + . '
  • Direction
  • Focus
  • Discernment
  • ' + . '
  • Continuity
  • Practical Steps
' + . '

Baderech HaAvoda answers core human questions:

' + . '
  • How do I grow?
  • How do I align my inner world ' + . 'with my values?
  • How do I relate to challenges?
  • ' + . '
  • Where should I place my mind, heart, and actions each ' + . 'day?
  • How do I live as the person Hashem intended me ' + . 'to be?
' + . '

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.

' + . '

The Challenge of Our Generation

' + . '

We live in a time overflowing with information and ' + . 'stimulation, yet starving for depth.

' + . '

Our generation faces challenges that previous generations ' + . 'rarely confronted:

' + . '
  • Constant Distraction
  • Fragmented Attention
  • ' + . '
  • Emotional Overwhelm
  • Lack of clarity about ' + . 'identity and purpose
  • Minimal guidance in inner ' + . 'development
  • Being told what to think rather than how ' + . 'to think
  • So many are Hashkafikly homeless
' + . '

People today are not taught:

' + . '
  • How to understand themselves
  • How to regulate ' + . 'their minds
  • How to cultivate awareness
  • How to ' + . 'build a healthy inner life
  • How to live as integrated ' + . 'human beings
  • The few important areas in life to focus ' + . 'on
' + . '

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') }) From 6cb215a7bf87ed7b681bc4fdd1e8782e689a3034 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:48:37 +0300 Subject: [PATCH 09/17] seed introduction rich text --- backend/database/seeders/ElementSeeder.php | 64 +++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/backend/database/seeders/ElementSeeder.php b/backend/database/seeders/ElementSeeder.php index 9c8935d..bc86b55 100644 --- a/backend/database/seeders/ElementSeeder.php +++ b/backend/database/seeders/ElementSeeder.php @@ -34,6 +34,7 @@ class ElementSeeder extends Seeder . 'the Creator, and about the meaning of life - you ' . 'unlock the ability to live with strength, confidence, ' . 'and hope.', + 'richText' => $this->introductionRichText(), ], [ 'title' => '2. Foundations', @@ -42,29 +43,34 @@ class ElementSeeder extends Seeder . 'you develop clarity, well-being, resilience, and the ' . 'ability to uplift the physical world with spiritual ' . 'intention.', + 'richText' => '', ], [ 'title' => '3. Divine Plan', 'description' => 'Understanding the unique greatness of our ' . 'generation and the call to remain hopeful, ' . 'optimistic, and resilient.', + 'richText' => '', ], [ 'title' => '4. Architecture of the Soul', 'description' => "Becoming a Baal Da'at - A Master of " . 'Inner Awareness', + 'richText' => '', ], [ 'title' => '5. Arba Yesodot', 'description' => 'A structured approach to balanced living: ' . 'Physical & Financial Health, Relationships, Wisdom ' . 'and Guidance.', + 'richText' => '', ], [ 'title' => '6. Fluid Integration', 'description' => 'A series of practical exercises to ' . 'engender a shift in mindset, embed healthy routines, ' . 'positive life practices.', + 'richText' => '', ], ]; @@ -74,11 +80,67 @@ class ElementSeeder extends Seeder title: $baderechChildElement['title'], description: $baderechChildElement['description'], iconImageUrl: null, - richText: '', + richText: $baderechChildElement['richText'], pdfPath: null, youtubeUrl: null, parentElement: $rootElement, )); } } + + private function introductionRichText(): string + { + return '

What is Baderech HaAvoda?

' + . '

Why We Need a Path of Spiritual Practice

' + . "

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:

' + . '
  • Direction
  • Focus
  • Discernment
  • ' + . '
  • Continuity
  • Practical Steps
' + . '

Baderech HaAvoda answers core human questions:

' + . '
  • How do I grow?
  • How do I align my inner world ' + . 'with my values?
  • How do I relate to challenges?
  • ' + . '
  • Where should I place my mind, heart, and actions each ' + . 'day?
  • How do I live as the person Hashem intended me ' + . 'to be?
' + . '

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.

' + . '

The Challenge of Our Generation

' + . '

We live in a time overflowing with information and ' + . 'stimulation, yet starving for depth.

' + . '

Our generation faces challenges that previous generations ' + . 'rarely confronted:

' + . '
  • Constant Distraction
  • Fragmented Attention
  • ' + . '
  • Emotional Overwhelm
  • Lack of clarity about ' + . 'identity and purpose
  • Minimal guidance in inner ' + . 'development
  • Being told what to think rather than how ' + . 'to think
  • So many are Hashkafikly homeless
' + . '

People today are not taught:

' + . '
  • How to understand themselves
  • How to regulate ' + . 'their minds
  • How to cultivate awareness
  • How to ' + . 'build a healthy inner life
  • How to live as integrated ' + . 'human beings
  • The few important areas in life to focus ' + . 'on
' + . '

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.' + . '

'; + } } From c1f6437769619575883de0f940591c35d84b4549 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:50:23 +0300 Subject: [PATCH 10/17] test introduction pdf --- backend/tests/Feature/DemoSeedDataTest.php | 4 ++++ frontend/rabbi_gerzi/cypress/e2e/media.cy.ts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/tests/Feature/DemoSeedDataTest.php b/backend/tests/Feature/DemoSeedDataTest.php index bdbad25..59edd13 100644 --- a/backend/tests/Feature/DemoSeedDataTest.php +++ b/backend/tests/Feature/DemoSeedDataTest.php @@ -75,6 +75,10 @@ class DemoSeedDataTest extends TestCase $this->expectedIntroductionRichText(), $childElements[0]->getRichText(), ); + $this->assertSame( + '/assets/pdfs/baderech.pdf', + $childElements[0]->getPdfPath(), + ); } private function serializeChildElements(array $childElements): array diff --git a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts index 0f08b0e..573a1e7 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts @@ -108,6 +108,9 @@ describe('media page sets', () => { .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') + cy.contains('[data-cy="element-pdf-link"]', 'View PDF') + .should('be.visible') + .and('have.attr', 'href', '/assets/pdfs/baderech.pdf') + .and('have.attr', 'target', '_blank') }) }) From f979630bdeb74e7e9978bf648d681a38723eea88 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:51:18 +0300 Subject: [PATCH 11/17] seed introduction pdf --- backend/database/seeders/ElementSeeder.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/database/seeders/ElementSeeder.php b/backend/database/seeders/ElementSeeder.php index bc86b55..538e47e 100644 --- a/backend/database/seeders/ElementSeeder.php +++ b/backend/database/seeders/ElementSeeder.php @@ -35,6 +35,7 @@ class ElementSeeder extends Seeder . 'unlock the ability to live with strength, confidence, ' . 'and hope.', 'richText' => $this->introductionRichText(), + 'pdfPath' => '/assets/pdfs/baderech.pdf', ], [ 'title' => '2. Foundations', @@ -44,6 +45,7 @@ class ElementSeeder extends Seeder . 'ability to uplift the physical world with spiritual ' . 'intention.', 'richText' => '', + 'pdfPath' => null, ], [ 'title' => '3. Divine Plan', @@ -51,12 +53,14 @@ class ElementSeeder extends Seeder . 'generation and the call to remain hopeful, ' . 'optimistic, and resilient.', 'richText' => '', + 'pdfPath' => null, ], [ 'title' => '4. Architecture of the Soul', 'description' => "Becoming a Baal Da'at - A Master of " . 'Inner Awareness', 'richText' => '', + 'pdfPath' => null, ], [ 'title' => '5. Arba Yesodot', @@ -64,6 +68,7 @@ class ElementSeeder extends Seeder . 'Physical & Financial Health, Relationships, Wisdom ' . 'and Guidance.', 'richText' => '', + 'pdfPath' => null, ], [ 'title' => '6. Fluid Integration', @@ -71,6 +76,7 @@ class ElementSeeder extends Seeder . 'engender a shift in mindset, embed healthy routines, ' . 'positive life practices.', 'richText' => '', + 'pdfPath' => null, ], ]; @@ -81,7 +87,7 @@ class ElementSeeder extends Seeder description: $baderechChildElement['description'], iconImageUrl: null, richText: $baderechChildElement['richText'], - pdfPath: null, + pdfPath: $baderechChildElement['pdfPath'], youtubeUrl: null, parentElement: $rootElement, )); From 90e1c6f19691c53036bf4cfe72549aefc9c543e6 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:53:49 +0300 Subject: [PATCH 12/17] test rich text heading --- frontend/rabbi_gerzi/cypress/e2e/media.cy.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts index 573a1e7..e303253 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts @@ -107,6 +107,11 @@ describe('media page sets', () => { .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.contains( + '[data-cy="element-rich-text"] h2', + 'What is Baderech HaAvoda?', + ) + .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') .should('be.visible') From 0931819100a41d59bb799a3d7397bc2e8b0388d3 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:54:37 +0300 Subject: [PATCH 13/17] center rich text headings --- frontend/rabbi_gerzi/src/views/ElementPage.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/rabbi_gerzi/src/views/ElementPage.vue b/frontend/rabbi_gerzi/src/views/ElementPage.vue index f75460a..424fcba 100644 --- a/frontend/rabbi_gerzi/src/views/ElementPage.vue +++ b/frontend/rabbi_gerzi/src/views/ElementPage.vue @@ -330,6 +330,16 @@ function isShortYoutubeHost(hostname: string): boolean { line-height: 1.75; } +.element-page__rich-text :deep(h2) { + margin: 0 0 0.9rem; + color: #2c2c2c; + font-family: var(--font-serif); + font-size: 2rem; + font-weight: 400; + line-height: 1.2; + text-align: center; +} + .element-page__rich-text :deep(p) { margin: 0 0 1rem; } From df410e1706c0b577c1824f86486c73a1b167102c Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:58:07 +0300 Subject: [PATCH 14/17] test editable heading alignment --- backend/tests/Feature/DemoSeedDataTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/tests/Feature/DemoSeedDataTest.php b/backend/tests/Feature/DemoSeedDataTest.php index 59edd13..84159eb 100644 --- a/backend/tests/Feature/DemoSeedDataTest.php +++ b/backend/tests/Feature/DemoSeedDataTest.php @@ -96,7 +96,8 @@ class DemoSeedDataTest extends TestCase private function expectedIntroductionRichText(): string { - return '

What is Baderech HaAvoda?

' + return '

' + . 'What is Baderech HaAvoda?

' . '

Why We Need a Path of Spiritual Practice

' . "

A 'Baderech HaAvoda' is a way of living - a structured " . 'path for inner and outer growth, spiritual refinement, and ' From b0ffcdf27be1b24eda1dd1a47dbb9a5520d589c8 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 21:59:07 +0300 Subject: [PATCH 15/17] make heading alignment editable --- backend/database/seeders/ElementSeeder.php | 3 ++- frontend/rabbi_gerzi/src/views/ElementPage.vue | 10 ---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/backend/database/seeders/ElementSeeder.php b/backend/database/seeders/ElementSeeder.php index 538e47e..7c7c48e 100644 --- a/backend/database/seeders/ElementSeeder.php +++ b/backend/database/seeders/ElementSeeder.php @@ -96,7 +96,8 @@ class ElementSeeder extends Seeder private function introductionRichText(): string { - return '

What is Baderech HaAvoda?

' + return '

' + . 'What is Baderech HaAvoda?

' . '

Why We Need a Path of Spiritual Practice

' . "

A 'Baderech HaAvoda' is a way of living - a structured " . 'path for inner and outer growth, spiritual refinement, and ' diff --git a/frontend/rabbi_gerzi/src/views/ElementPage.vue b/frontend/rabbi_gerzi/src/views/ElementPage.vue index 424fcba..f75460a 100644 --- a/frontend/rabbi_gerzi/src/views/ElementPage.vue +++ b/frontend/rabbi_gerzi/src/views/ElementPage.vue @@ -330,16 +330,6 @@ function isShortYoutubeHost(hostname: string): boolean { line-height: 1.75; } -.element-page__rich-text :deep(h2) { - margin: 0 0 0.9rem; - color: #2c2c2c; - font-family: var(--font-serif); - font-size: 2rem; - font-weight: 400; - line-height: 1.2; - text-align: center; -} - .element-page__rich-text :deep(p) { margin: 0 0 1rem; } From 99fa93587aab865c7fc9adff9c9c22ac4d4a23f4 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 22:07:08 +0300 Subject: [PATCH 16/17] test introduction audio child --- backend/tests/Feature/DemoSeedDataTest.php | 19 +++++++++++++++++++ frontend/rabbi_gerzi/cypress/e2e/media.cy.ts | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/backend/tests/Feature/DemoSeedDataTest.php b/backend/tests/Feature/DemoSeedDataTest.php index 84159eb..fcc4fe7 100644 --- a/backend/tests/Feature/DemoSeedDataTest.php +++ b/backend/tests/Feature/DemoSeedDataTest.php @@ -79,6 +79,25 @@ class DemoSeedDataTest extends TestCase '/assets/pdfs/baderech.pdf', $childElements[0]->getPdfPath(), ); + + $introductionChildElements = $elementRepository->findByParentElement( + $childElements[0], + ); + $this->assertCount(1, $introductionChildElements); + $introductionAudioElement = $introductionChildElements[0]; + $this->assertSame( + 'Fundamentals # 1: Living Our Way to a Wholesome Fulfilled Life ' + . '(Audio)', + $introductionAudioElement->getTitle(), + ); + $this->assertSame('', $introductionAudioElement->getDescription()); + $this->assertNull($introductionAudioElement->getIconImageUrl()); + $this->assertSame('', $introductionAudioElement->getRichText()); + $this->assertNull($introductionAudioElement->getPdfPath()); + $this->assertSame( + 'https://www.youtube.com/watch?v=yHx-r4p6hHU&t=1s', + $introductionAudioElement->getYoutubeUrl(), + ); } private function serializeChildElements(array $childElements): array diff --git a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts index e303253..b3e1424 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/media.cy.ts @@ -1,5 +1,8 @@ describe('media page sets', () => { it('fetches and renders seeded set cards', () => { + const introductionAudioTitle = + 'Fundamentals # 1: Living Our Way to a Wholesome Fulfilled Life (Audio)' + cy.visit('/media') cy.get('header.site-header').within(() => { @@ -117,5 +120,21 @@ describe('media page sets', () => { .should('be.visible') .and('have.attr', 'href', '/assets/pdfs/baderech.pdf') .and('have.attr', 'target', '_blank') + cy.contains('[data-cy="child-element-link"]', introductionAudioTitle) + .as('introductionAudioLink') + .should('have.attr', 'href', '/element/8') + + cy.get('@introductionAudioLink').click() + cy.location('pathname').should('eq', '/element/8') + 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="child-element-list"]').should('not.exist') + cy.get('[data-cy="element-youtube-embed"]') + .should('be.visible') + .and('have.attr', 'src') + .and('include', 'https://www.youtube.com/embed/yHx-r4p6hHU') + .and('include', 'start=1') }) }) From a74dd55619f5b113db31212626ec33b816a2e9ca Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 27 May 2026 22:08:24 +0300 Subject: [PATCH 17/17] seed introduction audio child --- backend/database/seeders/ElementSeeder.php | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/backend/database/seeders/ElementSeeder.php b/backend/database/seeders/ElementSeeder.php index 7c7c48e..ba89ab1 100644 --- a/backend/database/seeders/ElementSeeder.php +++ b/backend/database/seeders/ElementSeeder.php @@ -6,6 +6,7 @@ use App\Element\CreateElementDto; use App\Element\ElementRepository; use App\Set\SetRepository; use Illuminate\Database\Seeder; +use RuntimeException; class ElementSeeder extends Seeder { @@ -80,8 +81,9 @@ class ElementSeeder extends Seeder ], ]; + $introductionElement = null; foreach ($baderechChildElements as $baderechChildElement) { - $elementRepository->create(new CreateElementDto( + $createdElement = $elementRepository->create(new CreateElementDto( set: $baderechSet, title: $baderechChildElement['title'], description: $baderechChildElement['description'], @@ -91,7 +93,27 @@ class ElementSeeder extends Seeder youtubeUrl: null, parentElement: $rootElement, )); + if ($baderechChildElement['title'] === '1. Introduction') { + $introductionElement = $createdElement; + } } + + if ($introductionElement === null) { + throw new RuntimeException('Introduction element was not seeded'); + } + + $elementRepository->create(new CreateElementDto( + set: $baderechSet, + title: 'Fundamentals # 1: Living Our Way to a Wholesome ' + . 'Fulfilled Life (Audio)', + description: '', + iconImageUrl: null, + richText: '', + pdfPath: null, + youtubeUrl: 'https://www.youtube.com/watch?v=' + . 'yHx-r4p6hHU&t=1s', + parentElement: $introductionElement, + )); } private function introductionRichText(): string