Skip to content

Commit

Permalink
chore(website tests): replace waitUntil: 'networkidle' with 'load' (#…
Browse files Browse the repository at this point in the history
…1783)

* chore(website/tests): replace waitUntil: 'networkidle' with 'load' (default)
  • Loading branch information
corneliusroemer authored May 6, 2024
1 parent e7fc3c6 commit 6dbc49b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 20 deletions.
4 changes: 1 addition & 3 deletions website/tests/pages/edit/edit.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ export class EditPage {
}

public async goto(accessionVersion: AccessionVersion) {
await this.page.goto(`${baseUrl}${routes.editPage(dummyOrganism.key, accessionVersion)}`, {
waitUntil: 'networkidle',
});
await this.page.goto(`${baseUrl}${routes.editPage(dummyOrganism.key, accessionVersion)}`);
}

public async submit(groupId: number) {
Expand Down
4 changes: 1 addition & 3 deletions website/tests/pages/review/review.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export class ReviewPage {
}

public async goto(groupId: number) {
await this.page.goto(`${baseUrl}${routes.userSequenceReviewPage(dummyOrganism.key, groupId)}`, {
waitUntil: 'networkidle',
});
await this.page.goto(`${baseUrl}${routes.userSequenceReviewPage(dummyOrganism.key, groupId)}`);
}

public async getReviewPageOverview(): Promise<ReviewPageOverview> {
Expand Down
4 changes: 1 addition & 3 deletions website/tests/pages/revise/revise.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ export class RevisePage {
}

public async goto(groupId: number) {
await this.page.goto(`${baseUrl}${routes.revisePage(dummyOrganism.key, groupId)}`, {
waitUntil: 'networkidle',
});
await this.page.goto(`${baseUrl}${routes.revisePage(dummyOrganism.key, groupId)}`);
}

public async uploadSequenceData(file: string = sequencesTestFile) {
Expand Down
4 changes: 1 addition & 3 deletions website/tests/pages/sequences/sequences.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export class SequencePage {
}

public async goto(accessionVersion: AccessionVersion) {
await this.page.goto(`${baseUrl}${routes.sequencesDetailsPage(accessionVersion)}`, {
waitUntil: 'networkidle',
});
await this.page.goto(`${baseUrl}${routes.sequencesDetailsPage(accessionVersion)}`);
await expect(this.page).toHaveTitle(getAccessionVersionString(accessionVersion));
}

Expand Down
4 changes: 1 addition & 3 deletions website/tests/pages/submission/submit.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ export class SubmitPage {
}

public async goto(groupId: number) {
await this.page.goto(`${baseUrl}${routes.submitPage(dummyOrganism.key, groupId)}`, {
waitUntil: 'networkidle',
});
await this.page.goto(`${baseUrl}${routes.submitPage(dummyOrganism.key, groupId)}`);
}

public async uploadMetadata() {
Expand Down
6 changes: 2 additions & 4 deletions website/tests/pages/user/group/group.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class GroupPage {
constructor(public readonly page: Page) {}

public async goToUserPage() {
await this.page.goto(`${baseUrl}${routes.userOverviewPage()}`, { waitUntil: 'networkidle' });
await this.page.goto(`${baseUrl}${routes.userOverviewPage()}`, { waitUntil: 'load' });
await this.page.waitForURL(`${baseUrl}${routes.userOverviewPage()}`);
}

Expand All @@ -17,9 +17,7 @@ export class GroupPage {
}

public async goToGroupPage(groupId: number) {
await this.page.goto(`${baseUrl}${routes.groupOverviewPage(groupId)}`, {
waitUntil: 'networkidle',
});
await this.page.goto(`${baseUrl}${routes.groupOverviewPage(groupId)}`);
await this.page.waitForURL(`${baseUrl}${routes.groupOverviewPage(groupId)}`);
}

Expand Down
2 changes: 1 addition & 1 deletion website/tests/pages/user/userPage/userPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class UserPage {
constructor(public readonly page: Page) {}

public async goToUserPage() {
await this.page.goto(`${baseUrl}${routes.userOverviewPage()}`, { waitUntil: 'networkidle' });
await this.page.goto(`${baseUrl}${routes.userOverviewPage()}`, { waitUntil: 'load' });
await this.page.waitForURL(`${baseUrl}${routes.userOverviewPage()}`);
}

Expand Down

0 comments on commit 6dbc49b

Please sign in to comment.