Skip to content

Commit

Permalink
test(@fireblocks/e2e-tests): ✅ raise error if can't get balance from …
Browse files Browse the repository at this point in the history
…node
  • Loading branch information
a0ngo committed Oct 13, 2024
1 parent e081c5a commit 2418fcb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-humans-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/e2e-tests': minor
---

raise error if couldn't get balance
3 changes: 3 additions & 0 deletions packages/e2e-tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const sleep = async (ms: number) => await new Promise((r) => setTimeout(r, ms));

const waitForLoadingToEnd = async (page: Page) => {
for (;;) {
if (await page.getByText('Could not get balance').isVisible()) {
throw new FixError('Unable to obtain balance');
}
const visible = await page.locator('.MuiCircularProgress-indeterminate').first().isVisible();
if (visible) {
sleep(100);
Expand Down

0 comments on commit 2418fcb

Please sign in to comment.