test preview corner radius

This commit is contained in:
Yisroel Baum 2026-06-06 23:03:09 +03:00
parent 6ab22d35d2
commit c58af4b720
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -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', () => { it('brings entering side previews in from the clicked direction', () => {
const transitionSampleDelay = 100 const transitionSampleDelay = 100
const transitionSettleDelay = 1100 const transitionSettleDelay = 1100