File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -40,4 +40,5 @@ yarn-error.log*
4040* .tsbuildinfo
4141next-env.d.ts
4242
43- tests /reports
43+ tests /reports
44+ playwright-report
Original file line number Diff line number Diff line change @@ -66,11 +66,15 @@ test.describe("Form Submission Tests", () => {
6666} ) ;
6767
6868test . describe ( "Weather Widget" , ( ) => {
69- test ( "should display current weather" , async ( { page } ) => {
69+ test ( "should display current weather" , async ( { page, context } ) => {
70+ // Mock geolocation to return a fixed location
71+ await context . grantPermissions ( [ "geolocation" ] ) ;
72+ await context . setGeolocation ( { latitude : 40.7128 , longitude : - 74.006 } ) ;
73+
7074 await page . goto ( "/form" ) ;
7175
7276 // Wait for the weather widget to load
73- await page . waitForSelector ( "text=Current Weather" ) ;
77+ await page . waitForSelector ( "text=Current Weather" , { timeout : 5000 } ) ;
7478
7579 // Check if temperature and wind speed are displayed
7680 const temperature = await page . locator ( "text=Temperature:" ) . isVisible ( ) ;
You can’t perform that action at this time.
0 commit comments