test project backgrounds
This commit is contained in:
parent
5014193484
commit
95b268224b
1 changed files with 22 additions and 0 deletions
|
|
@ -499,6 +499,28 @@ describe('homepage projects grid', () => {
|
||||||
cy.contains('Beit Shemesh municipality').should('be.visible')
|
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', () => {
|
describe('homepage start your journey ctas', () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue