From 95b268224b0a300655084c1c923a648070897483 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sat, 13 Jun 2026 21:56:11 +0300 Subject: [PATCH] test project backgrounds --- frontend/rabbi_gerzi/cypress/e2e/home.cy.ts | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts index 9022792..9af2c43 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts @@ -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', () => {