Skip to content

Commit

Permalink
Merge pull request #897 from intuitem/hotfix/fix_test_race_condition
Browse files Browse the repository at this point in the history
Fix functional test race condition
  • Loading branch information
eric-intuitem authored Oct 3, 2024
2 parents 95ce9a7 + fc4d127 commit 357e1e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/tests/utils/page-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class PageContent extends BasePage {
}

async importLibrary(name: string, urn?: string, language = 'English') {
this.page.getByTestId('search-input').fill(name);
await this.page.getByTestId('search-input').fill(name);
if (
(await this.tab('Loaded libraries').isVisible()) &&
(await this.tab('Loaded libraries').getAttribute('aria-selected')) === 'true'
Expand All @@ -83,7 +83,7 @@ export class PageContent extends BasePage {
if (await this.tab('Loaded libraries').isVisible()) {
await this.tab('Loaded libraries').click();
expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy();
this.page.getByTestId('search-input').fill(name);
await this.page.getByTestId('search-input').fill(name);
}
await expect(this.getRow(name)).toBeVisible();
return;
Expand All @@ -94,7 +94,7 @@ export class PageContent extends BasePage {
});
await this.tab('Loaded libraries').click();
expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy();
this.page.getByTestId('search-input').fill(name);
await this.page.getByTestId('search-input').fill(name);
await expect(this.getRow(name)).toBeVisible();
}

Expand Down

0 comments on commit 357e1e0

Please sign in to comment.