From 8fe6dbc5c2e2be28ae16f6e96f344dd5484c42cc Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sat, 16 May 2026 21:56:49 +0300 Subject: [PATCH] test testimonials carousel renders --- frontend/rabbi_gerzi/cypress/e2e/home.cy.ts | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts index 59d4ea3..502cb5c 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts @@ -86,3 +86,38 @@ describe('homepage unique voice section', () => { }) }) }) + +describe('homepage testimonials carousel', () => { + beforeEach(() => { + cy.visit('/') + }) + + it('renders the heading and the active testimonial', () => { + cy.get('[data-cy="testimonials"]').within(() => { + cy.contains('h2', 'What People Are Saying').should('be.visible') + cy.get('[data-cy="testimonial-active"]').within(() => { + cy.contains('Nathaniel M').should('be.visible') + cy.contains('best Jewish day schools').should('be.visible') + }) + }) + }) + + it('advances to the next testimonial when next is clicked', () => { + cy.get('[data-cy="testimonials"]').within(() => { + cy.get('[data-cy="testimonial-active"]') + .should('contain.text', 'Nathaniel M') + cy.get('[data-cy="testimonial-next"]').click() + cy.get('[data-cy="testimonial-active"]') + .should('not.contain.text', 'Nathaniel M') + }) + }) + + it('goes back to the previous testimonial when prev is clicked', () => { + cy.get('[data-cy="testimonials"]').within(() => { + cy.get('[data-cy="testimonial-next"]').click() + cy.get('[data-cy="testimonial-prev"]').click() + cy.get('[data-cy="testimonial-active"]') + .should('contain.text', 'Nathaniel M') + }) + }) +})