Skip to content

Commit 7c3aaa4

Browse files
Update form.spec.ts
1 parent 12380e3 commit 7c3aaa4

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

tests/form.spec.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -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(/Temperature: \d+\.\d+°C/);
90-
expect(windSpeedText).toMatch(/Wind Speed: \d+(\.\d+)? km\/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

Comments
 (0)