We need to establish a testing foundation for the header component to ensure its reliability and correctness. This will help catch any issues early during development and provide confidence when making changes in the future.
Objectives:
Write unit tests for the header component to verify rendering and props handling.
Create integration tests to check interactions with other components (e.g., navigation functionality).
Implement end-to-end tests to validate user interactions with the header (e.g., dropdowns, links).
Acceptance Criteria:
Before we can do anything we must:
[x] #12
[x] #13
[ ] add a npm script that runs our tests to our FE TEST stage ( make a blank sample script )
Unit Tests:
[x] #14
[x] #15
[x] #16
[x] #17
[x] #18
Integration Tests:
[ ] Confirm that clicking on navigation links updates the active state of the clicked link.
[ ] Verify that the mobile menu toggle button shows/hides the navigation menu on smaller screens.
[ ] Test that the Header component interacts correctly with any state management system (if applicable).
[ ] Ensure that the Header component responds appropriately to changes in screen size (responsive design).
[ ] Verify that any dropdown menus in the Header open and close as expected when interacted with.
End-to-End Tests:
[ ] #11
[ ] Simulate a user navigating through all main sections of the website using the Header links on desktop view.
Test the mobile menu functionality by:
[ ] Clicking the toggle button to open the sidebar
[ ] Verifying that all links are visible and clickable in the sidebar
[ ] Navigating to a different section using a sidebar link
[ ] Confirming that the sidebar closes after navigation
[ ] Verify that external links in the Header scrolls (shows) the correct information
All tests should run successfully in the CI pipeline without any errors or failures.
We need to establish a testing foundation for the header component to ensure its reliability and correctness. This will help catch any issues early during development and provide confidence when making changes in the future.
Objectives:
Acceptance Criteria:
Before we can do anything we must:
Unit Tests:
Integration Tests:
End-to-End Tests:
All tests should run successfully in the CI pipeline without any errors or failures.