test portrait overflow

This commit is contained in:
Yisroel Baum 2026-06-06 21:32:54 +03:00
parent db14cfa617
commit 26eb9b6352
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -42,6 +42,27 @@ describe('homepage hero', () => {
.and('have.attr', 'alt') .and('have.attr', 'alt')
.and('match', /Rabbi Yehoshua Gerzi/i) .and('match', /Rabbi Yehoshua Gerzi/i)
}) })
it('lets the rabbi portrait rise above the circular frame', () => {
cy.get<HTMLImageElement>('[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', () => { describe('homepage discover path section', () => {