describe('homepage hero', () => { beforeEach(() => { cy.visit('/') }) it('renders the header navigation', () => { cy.get('header').within(() => { cy.contains('Torah Media').should('be.visible') cy.contains('About').should('be.visible') cy.contains('Contact').should('be.visible') cy.contains('Donate').should('be.visible') }) }) it('renders the hero headline with italic emphasis', () => { cy.get('[data-cy="hero"]').within(() => { cy.contains('upgrade our lives').should('be.visible') cy.contains('em', 'healthy').should('be.visible') cy.contains('em', 'integrated').should('be.visible') cy.contains('em', 'balanced').should('be.visible') cy.contains('Torah existence').should('be.visible') cy.contains('Rabbi Yehoshua Gerzi').should('be.visible') }) }) it('renders the rabbi portrait image', () => { cy.get('[data-cy="hero-portrait"]') .should('be.visible') .and('have.attr', 'alt') .and('match', /Rabbi Yehoshua Gerzi/i) }) }) describe('homepage discover path section', () => { beforeEach(() => { cy.visit('/') }) it('renders the heading and body copy', () => { cy.get('[data-cy="discover-path"]').within(() => { cy.contains('h2', 'Discover a Path to a Holistically Engaged Life') .should('be.visible') cy.contains('Rabbi Yehoshua Gerzi has dedicated his life') .should('be.visible') cy.contains('Healthy, Integrated and Balanced Torah Living') .should('be.visible') cy.contains('Ramat Beit Shemesh').should('be.visible') cy.contains('Pilzno Institute of Higher Learning').should('be.visible') }) }) })