diff --git a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts index 9af2c43..e95938a 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts @@ -12,6 +12,16 @@ describe('homepage hero', () => { }) }) + it('links the navbar Donate item to Causematch', () => { + const donateHref = 'https://causematch.com/pilzno_donate' + + cy.contains('header.site-header a', 'Donate') + .should('be.visible') + .and('have.attr', 'href', donateHref) + .and('have.attr', 'target', '_blank') + .and('have.attr', 'rel', 'noopener') + }) + it('opens the Torah Media page from the header navigation', () => { cy.contains('header.site-header a', 'Torah Media').click() @@ -572,4 +582,65 @@ describe('homepage get involved and footer', () => { cy.contains(/Rabbi Gerzi 2025/).should('be.visible') }) }) + + it('links the footer Donate item to Causematch', () => { + const donateHref = 'https://causematch.com/pilzno_donate' + + cy.contains('[data-cy="footer"] a', 'Donate') + .should('be.visible') + .and('have.attr', 'href', donateHref) + .and('have.attr', 'target', '_blank') + .and('have.attr', 'rel', 'noopener') + }) + + it('links footer social icons to the contact social pages', () => { + const expectedSocialLinks = [ + { + label: 'YouTube', + href: 'https://www.youtube.com/@rabbigerzi', + }, + { + label: 'Spotify', + href: + 'https://open.spotify.com/show/' + + '49H1X9A7KZWAnnIbcoQXQR?si=6253691f23be44ad', + }, + ] + + cy.get('[data-cy="footer"]').within(() => { + expectedSocialLinks.forEach((expectedSocialLink) => { + cy.get(`a[aria-label="${expectedSocialLink.label}"]`) + .should('be.visible') + .and('have.attr', 'href', expectedSocialLink.href) + .and('have.attr', 'target', '_blank') + .and('have.attr', 'rel', 'noopener') + }) + }) + }) + + it('navigates footer links without reloading the app', () => { + const footerNavigationMarker = 'client-navigation' + + cy.window().then((applicationWindow) => { + const markedWindow = applicationWindow as Window & { + footerNavigationMarker?: string + } + + markedWindow.footerNavigationMarker = footerNavigationMarker + }) + + cy.contains('[data-cy="footer"] a', 'About').click() + + cy.location('pathname').should('eq', '/about') + cy.window().then((applicationWindow) => { + const markedWindow = applicationWindow as Window & { + footerNavigationMarker?: string + } + + expect(markedWindow.footerNavigationMarker).to.equal( + footerNavigationMarker, + ) + }) + cy.contains('h1', 'About Rabbi Gerzi').should('be.visible') + }) }) diff --git a/frontend/rabbi_gerzi/src/components/SiteFooter.vue b/frontend/rabbi_gerzi/src/components/SiteFooter.vue new file mode 100644 index 0000000..f2ea224 --- /dev/null +++ b/frontend/rabbi_gerzi/src/components/SiteFooter.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/frontend/rabbi_gerzi/src/components/SiteHeader.vue b/frontend/rabbi_gerzi/src/components/SiteHeader.vue index 0ecdc90..34095b1 100644 --- a/frontend/rabbi_gerzi/src/components/SiteHeader.vue +++ b/frontend/rabbi_gerzi/src/components/SiteHeader.vue @@ -1,6 +1,7 @@