Skip to content

Commit 39fd0a2

Browse files
committed
Revert "Update homePage.js"
This reverts commit 8f17192.
1 parent e6bb5ba commit 39fd0a2

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

tests/ui-testing/pages/generalPages/homePage.js

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,15 @@ export class HomePage {
5353
// await this.page.pause();
5454
await this.page.waitForTimeout(5000);
5555
await this.page.reload();
56-
57-
// Open organization dropdown
5856
await this.page.locator('[data-test="navbar-organizations-select"]').getByText('arrow_drop_down').click();
59-
await this.page.waitForTimeout(2000);
60-
61-
// Wait for the organization menu to be visible
62-
await this.page.waitForSelector('[data-test="organization-search-input"]', { state: 'visible', timeout: 10000 });
57+
await this.page.waitForTimeout(5000);
6358

6459
// Search for the organization
6560
await this.page.locator('[data-test="organization-search-input"]').fill(orgName);
66-
await this.page.waitForTimeout(1000);
61+
await this.page.waitForTimeout(2000);
6762

68-
// Wait for search results and click the organization
69-
// Try multiple selectors in case the structure changed
70-
try {
71-
await this.page.locator('[data-test="organization-menu-item-label-item-label"]').first().waitFor({ state: 'visible', timeout: 5000 });
72-
await this.page.locator('[data-test="organization-menu-item-label-item-label"]').first().click();
73-
} catch (error) {
74-
// Fallback: try alternative selectors
75-
const orgMenuItem = this.page.getByRole('option').filter({ hasText: orgName }).first();
76-
await orgMenuItem.waitFor({ state: 'visible', timeout: 5000 });
77-
await orgMenuItem.click();
78-
}
63+
// Click the organization from search results
64+
await this.page.locator('[data-test="organization-menu-item-label-item-label"]').first().click();
7965
}
8066

8167
async homePageURLValidation(orgName) {

0 commit comments

Comments
 (0)