test portrait overflow
This commit is contained in:
parent
db14cfa617
commit
26eb9b6352
1 changed files with 21 additions and 0 deletions
|
|
@ -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', () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue