Skip to content

Commit c33832f

Browse files
committed
test: ✅ update test to navigate to vault properly
1 parent 6638a1a commit c33832f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.changeset/spotty-planets-jump.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@fireblocks/e2e-tests': minor
3+
---
4+
5+
update vault navigation to be able to go to vault from main page or from specific vault

packages/e2e-tests/test-utils.ts

+12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ export const navigateToVault = async (page: Page, vaultToNavigateTo: number) =>
88
return;
99
} catch (e) {
1010
console.log(`Utility is not in Vault ${vaultToNavigateTo}`, e);
11+
try {
12+
try {
13+
await page.getByRole('link', { name: 'My Vault' }).innerText({ timeout: 5000 });
14+
await page.getByRole('link', { name: 'My Vault' }).click();
15+
} catch (e) {
16+
console.log(`Not in a specifiv vault, willt try to move to one`, e);
17+
}
18+
await page.getByRole('cell', { name: `Vault ${vaultToNavigateTo}` }).click();
19+
return;
20+
} catch (e) {
21+
console.log(`Failed to navigate to Vault ${vaultToNavigateTo}`, e);
22+
}
1123
}
1224
await page.getByLabel('Close modal').click();
1325
await page.getByRole('link', { name: 'My Vault' }).click();

0 commit comments

Comments
 (0)