test project backgrounds

This commit is contained in:
Yisroel Baum 2026-06-13 21:56:11 +03:00
parent 5014193484
commit 95b268224b
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -499,6 +499,28 @@ describe('homepage projects grid', () => {
cy.contains('Beit Shemesh municipality').should('be.visible')
})
})
it('uses background images for each project card', () => {
const expectedProjectImages = [
'/assets/projects/chaburot.webp',
'/assets/projects/pilzno-work-inspired.webp',
'/assets/projects/shul.webp',
'/assets/projects/new-building.webp',
]
cy.get('[data-cy="project-card"]').should('have.length', 4)
expectedProjectImages.forEach((expectedProjectImage, projectIndex) => {
cy.get('[data-cy="project-card"]')
.eq(projectIndex)
.then((projectCardElements) => {
const projectCardStyle = getComputedStyle(projectCardElements[0])
expect(projectCardStyle.backgroundImage).to.contain(
expectedProjectImage,
)
})
})
})
})
describe('homepage start your journey ctas', () => {