From c58af4b7204983253b3abbc7e2cb8046480d267d Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sat, 6 Jun 2026 23:03:09 +0300 Subject: [PATCH] test preview corner radius --- frontend/rabbi_gerzi/cypress/e2e/home.cy.ts | 31 +++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts index 6f529ee..1b2adae 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts @@ -285,6 +285,37 @@ describe('homepage testimonials carousel', () => { }) }) + it('rounds the outer corners of clipped preview cards', () => { + cy.viewport(1200, 800) + cy.get('[data-cy="testimonials"]').within(() => { + cy.get('[data-cy="testimonials-stage"]').as('testimonialStage') + cy.get('[data-cy="testimonial-active"]').as('activeCard') + }) + + cy.get('@activeCard').then((activeCardElements) => { + const activeCardStyle = getComputedStyle(activeCardElements[0]) + + cy.get('@testimonialStage').then((testimonialStageElements) => { + const testimonialStageStyle = getComputedStyle( + testimonialStageElements[0], + ) + + expect(testimonialStageStyle.borderTopLeftRadius).to.equal( + activeCardStyle.borderTopLeftRadius, + ) + expect(testimonialStageStyle.borderTopRightRadius).to.equal( + activeCardStyle.borderTopRightRadius, + ) + expect(testimonialStageStyle.borderBottomLeftRadius).to.equal( + activeCardStyle.borderBottomLeftRadius, + ) + expect(testimonialStageStyle.borderBottomRightRadius).to.equal( + activeCardStyle.borderBottomRightRadius, + ) + }) + }) + }) + it('brings entering side previews in from the clicked direction', () => { const transitionSampleDelay = 100 const transitionSettleDelay = 1100