Skip to content

Commit 7ccd940

Browse files
committed
fix broken test
1 parent eb5f58c commit 7ccd940

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

zeppelin-web-angular/e2e/models/base-page.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ export class BasePage {
1818
readonly page: Page;
1919
readonly loadingScreen: Locator;
2020
readonly e2eTestFolder: Locator;
21+
readonly e2eTestFolderSwitcher: Locator;
2122

2223
constructor(page: Page) {
2324
this.page = page;
2425
this.loadingScreen = page.locator('section.spin');
2526
this.e2eTestFolder = page.locator('a.name', {
2627
hasText: E2E_TEST_FOLDER
2728
});
29+
this.e2eTestFolderSwitcher = page.locator('.ant-tree-treenode').filter({ has: this.e2eTestFolder });
2830
}
2931

3032
async waitForPageLoad(): Promise<void> {
@@ -33,8 +35,8 @@ export class BasePage {
3335

3436
async clickE2ETestFolder(): Promise<void> {
3537
await this.e2eTestFolder.waitFor({ state: 'visible', timeout: 30000 });
36-
await this.e2eTestFolder.hover();
37-
await this.e2eTestFolder.click({ force: true });
38+
await this.e2eTestFolderSwitcher.locator('.ant-tree-switcher').click({ force: true });
39+
await this.e2eTestFolderSwitcher.locator('.ant-tree-switcher_open').waitFor({ state: 'visible' });
3840
await this.page.waitForLoadState('networkidle', { timeout: 15000 });
3941
}
4042
}

0 commit comments

Comments
 (0)