@@ -65,47 +65,3 @@ test.describe("Form Submission Tests", () => {
6565 } ) ;
6666} ) ;
6767
68- test . describe ( "Weather Widget" , ( ) => {
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-
74- await page . goto ( "/form" ) ;
75-
76- // Wait for the weather widget to load
77- await page . waitForSelector ( "text=Current Weather" , { timeout : 3000 } ) ;
78-
79- // Check if temperature and wind speed are displayed
80- const temperatureText = await page
81- . locator ( "text=Temperature:" )
82- . last ( )
83- . textContent ( ) ;
84- const windSpeedText = await page
85- . locator ( "text=Wind Speed:" )
86- . last ( )
87- . textContent ( ) ;
88-
89- expect ( temperatureText ) . toMatch ( / T e m p e r a t u r e : \d + \. \d + ° C / ) ;
90- expect ( windSpeedText ) . toMatch ( / W i n d S p e e d : \d + ( \. \d + ) ? k m \/ h / ) ;
91- } ) ;
92- } ) ;
93-
94- test . describe ( "Task List" , ( ) => {
95- test ( "should allow adding and deleting tasks" , async ( { page } ) => {
96- await page . goto ( "/" ) ;
97-
98- // Add a new task
99- await page . fill ( 'input[placeholder="Add a new task"]' , "Test Task" ) ;
100- await page . click ( "text=Add Task" ) ;
101-
102- // Verify the task is added
103- await expect ( page . locator ( "text=Test Task" ) ) . toBeVisible ( ) ;
104-
105- // Delete the task
106- await page . click ( "text=Delete" ) ;
107-
108- // Verify the task is removed
109- await expect ( page . locator ( "text=Test Task" ) ) . not . toBeVisible ( ) ;
110- } ) ;
111- } ) ;
0 commit comments