Skip to content

Commit

Permalink
fix: wait for loading indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
ozyx committed Jan 25, 2023
1 parent b37a021 commit a175d3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion e2e/appActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ async function expandEntireTree(page) {
const collapsedTreeItems = treePane.locator('role=treeitem[expanded=false]');
let count = await collapsedTreeItems.count();
while (count > 0) {
await collapsedTreeItems.first().locator('.c-disclosure-triangle').click();
await collapsedTreeItems.locator('.c-disclosure-triangle.is-enabled').first().click();
// Wait for the loading indicator to appear then disappear
await page.locator('.is-loading').isVisible();
await page.locator('.is-loading').isHidden();
count = await collapsedTreeItems.count();
}
}
Expand Down

0 comments on commit a175d3a

Please sign in to comment.