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 Dec 28, 2022
1 parent 7e3a8cb commit 70cd55f
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 @@ -200,7 +200,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 70cd55f

Please sign in to comment.