Skip to content

Commit de2cb34

Browse files
committed
e2e: Fix authenticate token hang up and cluster navigation
since we now use a multi cluster structure to run our tests, the cluster navigation step must be its own full nav step, different from navigateToPage, if it is tied to an auth step. Signed-off-by: Vincent T <[email protected]>
1 parent 408c6de commit de2cb34

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

e2e-tests/tests/headlampPage.ts

Lines changed: 7 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 || '');
@@ -24,10 +22,16 @@ export class HeadlampPage {
2422
this.page.click('button:has-text("Authenticate")'),
2523
]);
2624
}
25+
26+
await this.page.waitForLoadState('load');
2727
}
2828

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

0 commit comments

Comments
 (0)