test preview corner radius
This commit is contained in:
parent
6ab22d35d2
commit
c58af4b720
1 changed files with 31 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue