Skip to content

Commit

Permalink
Attempt to fix functional tests by removing race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Oct 3, 2024
1 parent 77b7b07 commit 80d03fd
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 80d03fd

Please sign in to comment.