diff --git a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts index 3a29014..3fd34ee 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts @@ -42,6 +42,27 @@ describe('homepage hero', () => { .and('have.attr', 'alt') .and('match', /Rabbi Yehoshua Gerzi/i) }) + + it('lets the rabbi portrait rise above the circular frame', () => { + cy.get('[data-cy="hero-portrait"]').then( + (portraitElements) => { + const portraitImage = portraitElements[0] + const frameElement = portraitImage.parentElement + + if (frameElement === null) { + throw new Error('Portrait frame is missing') + } + + const frameStyle = getComputedStyle(frameElement) + + expect(frameStyle.overflowX).to.equal('visible') + expect(frameStyle.overflowY).to.equal('visible') + expect(portraitImage.getBoundingClientRect().top).to.be.lessThan( + frameElement.getBoundingClientRect().top, + ) + }, + ) + }) }) describe('homepage discover path section', () => {