diff --git a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts index 85c5015..0c4dae4 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/home.cy.ts @@ -12,6 +12,19 @@ describe('homepage hero', () => { }) }) + it('opens the Torah Media page from the header navigation', () => { + cy.contains('header a', 'Torah Media').click() + + cy.location('pathname').should('eq', '/media') + 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') + }) + cy.contains('h1', 'Torah Media').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') diff --git a/frontend/rabbi_gerzi/cypress/e2e/login.cy.ts b/frontend/rabbi_gerzi/cypress/e2e/login.cy.ts index d979fe0..0ba798c 100644 --- a/frontend/rabbi_gerzi/cypress/e2e/login.cy.ts +++ b/frontend/rabbi_gerzi/cypress/e2e/login.cy.ts @@ -35,7 +35,7 @@ describe('admin login page', () => { }) }) - it('logs in with valid credentials and redirects to the home page', () => { + it('logs in and logs out from the home page navbar', () => { cy.visit('/login') cy.get('[data-cy="login-email"]').type('admin@rabbigerzi.test') @@ -44,5 +44,10 @@ describe('admin login page', () => { cy.url().should('eq', Cypress.config().baseUrl + '/') cy.getCookie('auth_token').should('exist') + cy.get('[data-cy="navbar-logout"]').should('be.visible') + cy.get('[data-cy="navbar-logout"]').click() + + cy.getCookie('auth_token').should('not.exist') + cy.get('[data-cy="navbar-logout"]').should('not.exist') }) }) diff --git a/frontend/rabbi_gerzi/src/components/SiteHeader.vue b/frontend/rabbi_gerzi/src/components/SiteHeader.vue new file mode 100644 index 0000000..65497a5 --- /dev/null +++ b/frontend/rabbi_gerzi/src/components/SiteHeader.vue @@ -0,0 +1,123 @@ + + + + + + + + + + + {{ item.icon }} + + {{ item.label }} + + + Logout + + + + + + diff --git a/frontend/rabbi_gerzi/src/router/index.ts b/frontend/rabbi_gerzi/src/router/index.ts index 32a0e58..6c71efd 100644 --- a/frontend/rabbi_gerzi/src/router/index.ts +++ b/frontend/rabbi_gerzi/src/router/index.ts @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from 'vue-router' import HomePage from '@/views/HomePage.vue' import LoginPage from '@/views/LoginPage.vue' +import MediaPage from '@/views/MediaPage.vue' const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -15,6 +16,11 @@ const router = createRouter({ name: 'login', component: LoginPage, }, + { + path: '/media', + name: 'media', + component: MediaPage, + }, ], }) diff --git a/frontend/rabbi_gerzi/src/views/HomePage.vue b/frontend/rabbi_gerzi/src/views/HomePage.vue index 57ae20c..d202d11 100644 --- a/frontend/rabbi_gerzi/src/views/HomePage.vue +++ b/frontend/rabbi_gerzi/src/views/HomePage.vue @@ -1,6 +1,7 @@ + + + + + + + Rabbi Yehoshua Gerzi + Torah Media + + Explore Rabbi Gerzi's Torah videos, audio teachings, and written resources. + + + + + + +
Rabbi Yehoshua Gerzi
+ Explore Rabbi Gerzi's Torah videos, audio teachings, and written resources. +