aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/vault-send-bitcoin.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/vault-send-bitcoin.spec.ts')
-rw-r--r--test/e2e/vault-send-bitcoin.spec.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/e2e/vault-send-bitcoin.spec.ts b/test/e2e/vault-send-bitcoin.spec.ts
index d9d229af..960e97a6 100644
--- a/test/e2e/vault-send-bitcoin.spec.ts
+++ b/test/e2e/vault-send-bitcoin.spec.ts
@@ -5,6 +5,9 @@ import {
bobUsername,
bobPassword,
loginNewContext,
+ apiLogin,
+ ensureVaultAccount,
+ setActiveAccount,
pasteAndSend,
} from "./helpers";
@@ -18,6 +21,12 @@ test("pasting vault bitcoin address redirects to /send/bitcoin, not /pay", async
alicePassword,
);
+ // Ensure vault account exists
+ const aliceToken = await apiLogin(alicePage, aliceUsername, alicePassword);
+ const vaultAccount = await ensureVaultAccount(alicePage, aliceToken, aliceUsername, alicePassword);
+ await setActiveAccount(alicePage, vaultAccount.id);
+ await alicePage.goto(`/${aliceUsername}`);
+
// Find the bitcoin vault account card and click Receive
const vaultCard = alicePage.locator('[data-testid="account-card"][data-account-type="bitcoin"]');
await expect(vaultCard.first()).toBeVisible({ timeout: 10_000 });