Skip to content

Commit

Permalink
Merge pull request #892 from intuitem/fix/playwright-await-missing
Browse files Browse the repository at this point in the history
add missing await
  • Loading branch information
nas-tabchiche authored Oct 3, 2024
2 parents 57dbf88 + 8ce049f commit 7f2aa41
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions frontend/tests/utils/page-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ export class PageContent extends BasePage {
}
// If the library is not visible, it might have already been loaded
if (await this.importItemButton(name, language === 'any' ? undefined : language).isHidden()) {
await this.tab('Loaded libraries').click();
expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy();
this.page.getByTestId('search-input').fill(name);
expect(this.getRow(name)).toBeVisible();
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 expect(this.getRow(name)).toBeVisible();
return;
}
await this.importItemButton(name, language === 'any' ? undefined : language).click();
Expand All @@ -92,7 +94,8 @@ export class PageContent extends BasePage {
});
await this.tab('Loaded libraries').click();
expect(this.tab('Loaded libraries').getAttribute('aria-selected')).toBeTruthy();
expect(this.getRow(name)).toBeVisible();
this.page.getByTestId('search-input').fill(name);
await expect(this.getRow(name)).toBeVisible();
}

async viewItemDetail(value?: string) {
Expand Down

0 comments on commit 7f2aa41

Please sign in to comment.