From ca1853460b005eb3c03ead5e1d5d013c26cc1ebe Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sat, 13 Jun 2026 22:56:59 +0300 Subject: [PATCH] test about page --- frontend/rabbi_gerzi/cypress/e2e/about.cy.ts | 129 +++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 frontend/rabbi_gerzi/cypress/e2e/about.cy.ts diff --git a/frontend/rabbi_gerzi/cypress/e2e/about.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/about.cy.ts new file mode 100644 index 0000000..be249f8 --- /dev/null +++ b/frontend/rabbi_gerzi/cypress/e2e/about.cy.ts @@ -0,0 +1,129 @@ +describe('about page', () => { + beforeEach(() => { + cy.visit('/about') + }) + + it('renders the header and about hero', () => { + cy.get('header.site-header').within(() => { + cy.contains('Torah Media').should('be.visible') + cy.contains('About').should('be.visible') + cy.contains('Contact').should('be.visible') + cy.contains('Donate').should('be.visible') + }) + + cy.get('[data-cy="about-hero"]').within(() => { + cy.contains('h1', 'About Rabbi Gerzi').should('be.visible') + cy.contains('Healthy, Integrated and Balanced Torah living') + .should('be.visible') + cy.get('[data-cy="about-hero-image"]') + .should('be.visible') + .and('have.attr', 'alt') + .and('match', /Rabbi Yehoshua Gerzi/i) + }) + }) + + it('renders the copied biography and mission sections', () => { + cy.get('[data-cy="about-story"]').within(() => { + cy.contains('h2', 'About Rabbi Gerzi').should('be.visible') + cy.contains('Pilzno Rebbe').should('be.visible') + cy.contains('descends from an illustrious lineage') + .should('be.visible') + cy.contains('physical therapist, music instructor, martial artist') + .should('be.visible') + }) + + cy.get('[data-cy="about-vision"]').within(() => { + cy.contains('h2', "Rabbi Gerzi's Vision").should('be.visible') + cy.contains('from vagueness to clarity').should('be.visible') + cy.contains('weekly chaburot and various events') + .should('be.visible') + }) + + cy.get('[data-cy="about-mission"]').within(() => { + cy.contains('h2', 'The Mission').should('be.visible') + cy.contains('A Clear Framework').should('be.visible') + cy.contains('Community and Support').should('be.visible') + cy.contains('Professional Structure').should('be.visible') + }) + + cy.get('[data-cy="about-teachers"]').within(() => { + cy.contains('h2', "Rabbi Gerzi's Teachers").should('be.visible') + cy.contains('Rabbi Yosef Singer').should('be.visible') + cy.contains('Rabbi Efraim Greenblatt').should('be.visible') + cy.contains('Rabbi Mordechai Zukerman').should('be.visible') + }) + }) + + it('renders the rabbanim section without repeated carousel copies', () => { + const expectedRabbanim = [ + 'The Biala Rebbe', + 'The Pilzno Rebbe, Rabbi Yosef Singer', + 'Dayan Gershon Lopian', + 'Rabbi Efraim Greenblatt', + 'The Sassover Rebbe', + 'The Pashkana Rebbe', + 'Rabbi Mordechai Zukerman', + 'The Radamishler Rebbe', + 'Rabbi Yoseph Leiberman', + 'The Krechnover Rebbe', + ] + + cy.get('[data-cy="rabbanim"]').within(() => { + cy.contains('h2', 'Rabbanim').should('be.visible') + cy.get('[data-cy="rabbanim-card"]').should( + 'have.length', + expectedRabbanim.length, + ) + + expectedRabbanim.forEach((rabbiName) => { + cy.contains('[data-cy="rabbanim-card"]', rabbiName) + .should('be.visible') + }) + + cy.contains('match the person in front of you').should('be.visible') + cy.contains('depth and the profundity of love') + .should('be.visible') + }) + }) + + it('renders the haskamot image gallery', () => { + cy.get('[data-cy="haskamot"]').within(() => { + cy.contains('h2', 'Haskamot').should('be.visible') + cy.get('[data-cy="haskamah-image"]').should('have.length', 6) + cy.get('[data-cy="haskamah-image"]') + .first() + .should('be.visible') + .and('have.attr', 'alt', 'Haskamah letter 1') + cy.get('[data-cy="haskamah-image"]') + .last() + .and('have.attr', 'alt', 'Haskamah letter 6') + }) + }) + + it('keeps the page readable on mobile', () => { + cy.viewport(390, 900) + + cy.get('[data-cy="about-hero"]').should('be.visible') + cy.get('[data-cy="rabbanim-card"]').first().should('be.visible') + cy.get('[data-cy="haskamah-image"]').first().should('be.visible') + }) + + it('renders the get involved form and footer', () => { + cy.get('[data-cy="get-involved"]').within(() => { + cy.contains('h2', 'Get Involved').should('be.visible') + cy.contains('Subscribe for updates as we release new content') + .should('be.visible') + cy.get('input[name="fullName"]').should('be.visible') + cy.get('input[name="email"]').should('be.visible') + cy.contains('button', 'Submit').should('be.visible') + }) + + cy.get('[data-cy="footer"]').within(() => { + cy.contains('Torah Media').should('be.visible') + cy.contains('About').should('be.visible') + cy.contains('Donate').should('be.visible') + cy.contains('Contact').should('be.visible') + cy.contains(/Rabbi Gerzi 2025/).should('be.visible') + }) + }) +})