-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3785354
commit c785c15
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { describe, it, vi, expect } from 'vitest'; | ||
import { render, screen } from '@testing-library/react'; | ||
import { BrowserRouter } from 'react-router-dom'; | ||
import LandingPage from '../src/pages/landingPage/landingPage'; | ||
|
||
describe('Landing Page Navigation', () => { | ||
it('should show navigation options', () => { | ||
render( | ||
<BrowserRouter> | ||
<LandingPage /> | ||
</BrowserRouter> | ||
); | ||
|
||
// Check for the main header elements | ||
const welcomeText = screen.getByText(/welcome to/i); | ||
const oHoursText = screen.getByText('OHours'); | ||
expect(welcomeText).toBeInTheDocument(); | ||
expect(oHoursText).toBeInTheDocument(); | ||
|
||
// Check for navigation links | ||
const studentLink = screen.getByRole('link', { name: /students/i }); | ||
const staffLink = screen.getByRole('link', { name: /staff/i }); | ||
expect(studentLink).toHaveAttribute('href', '/student'); | ||
expect(staffLink).toHaveAttribute('href', '/PMLand'); | ||
}); | ||
}); |