File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { test , expect } from '@playwright/test' ;
2+
3+ test . beforeEach ( async ( { page } ) => {
4+ page . goto ( 'http://localhost:3000/#footer' ) ;
5+ } ) ;
6+
7+ test . describe ( 'Test Footer Navigation Links' , ( ) => {
8+ test ( 'About us link should navigate to about us section' , async ( {
9+ page,
10+ } ) => {
11+ await page . getByRole ( 'link' , { name : 'About us' } ) . click ( ) ;
12+ await expect ( page ) . toHaveURL ( '/#about-us' ) ;
13+ } ) ;
14+
15+ test ( 'Events link should navigate to Events section' , async ( { page } ) => {
16+ await page . getByRole ( 'link' , { name : 'Events' } ) . click ( ) ;
17+ await expect ( page ) . toHaveURL ( '/#events' ) ;
18+ } ) ;
19+
20+ test ( 'Contact link should navigate to Contact Us section' , async ( {
21+ page,
22+ } ) => {
23+ await page . getByRole ( 'link' , { name : 'Contact' } ) . click ( ) ;
24+ await expect ( page ) . toHaveURL ( '/#contact-us' ) ;
25+ } ) ;
26+ } ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ export default function Footer() {
2020 } , [ ] ) ;
2121
2222 return (
23- < footer className = "bg-[#CEEDF4] w-full md:pt-12 md:pb-[25px] py-4" >
23+ < footer
24+ id = "footer"
25+ className = "bg-[#CEEDF4] w-full md:pt-12 md:pb-[25px] py-4"
26+ >
2427 < div className = "lg:w-1/4 md:w-[35%] sm:w-[40%] w-[65%] mx-auto flex flex-col justify-center items-center" >
2528 { screenWidth && (
2629 < div >
You can’t perform that action at this time.
0 commit comments