Skip to content

Commit 6290590

Browse files
committed
e2e: Fix authenticate token hang up and cluster navigation
Signed-off-by: Vincent T <vtaylor@microsoft.com>
1 parent 4384d4c commit 6290590

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

e2e-tests/tests/headlampPage.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export class HeadlampPage {
99
}
1010

1111
async authenticate(token?: string) {
12-
await this.page.waitForSelector('h1:has-text("Authentication")');
13-
1412
// Check to see if already authenticated
1513
if (await this.page.isVisible('button:has-text("Authenticate")')) {
1614
this.hasToken(token || '');
@@ -27,7 +25,11 @@ export class HeadlampPage {
2725
}
2826

2927
async navigateToCluster(name: string, token?: string) {
30-
await this.navigateTopage(`/c/${name}`);
28+
// Since we are using multi cluster structure we need to have a full reset navigation
29+
await this.page.goto(`${this.testURL}`);
30+
await this.page.waitForLoadState('load');
31+
await this.page.getByRole('link', { name: name, exact: true }).click();
32+
await this.page.waitForLoadState('load');
3133
await this.authenticate(token);
3234
}
3335

0 commit comments

Comments
 (0)