Skip to content

Commit aea8be4

Browse files
committed
fix: maybe this
1 parent dde8cbf commit aea8be4

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/helpers/index.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@ import { Page, expect } from "@playwright/test";
22

33
export const selectFacultyAndRegistration = async (page: Page) => {
44
console.log("selectFacultyAndRegistration - 1");
5+
await page.waitForTimeout(1000);
56
const facultyButton = page.getByText(/wybierz swój/i);
67
await facultyButton.click();
78
console.log("selectFacultyAndRegistration - 2");
8-
await page.waitForTimeout(1000);
9-
const chosenFaculty = page.getByRole("option", { name: /w5/i });
9+
10+
// Wait for the dropdown content to be visible
11+
await page.waitForSelector('[role="option"]', { state: "visible" });
12+
13+
// Wait specifically for the W5 option to be available
14+
const chosenFaculty = page
15+
.locator('[role="option"]')
16+
.filter({ hasText: "W5" });
17+
await expect(chosenFaculty).toBeVisible();
1018
console.log("selectFacultyAndRegistration - 2.5");
1119
await chosenFaculty.click();
1220
console.log("selectFacultyAndRegistration - 3");

0 commit comments

Comments
 (0)