Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apps/dashboard/e2e/funding-gate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test("funding panel offers connected-wallet submission only", async ({ page }) =
await expect(page.getByText("Connected")).toBeVisible({ timeout: 20_000 });

await expect(page.getByText("Send crypto")).toHaveCount(0);
await expect(page.getByText("Available: 1000.00 USDC on Polygon", { exact: true })).toBeVisible();
await expect(page.getByText("Available: 1,000 USDC on Polygon", { exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: /^Send/ })).toBeEnabled();
await expect(page.getByText(/reach out to/)).toHaveCount(0);
expect(backend.balanceRequests.at(-1)).toMatchObject({ network: "polygon-mainnet" });
Expand All @@ -40,8 +40,8 @@ test("insufficient selected-network USDC balance blocks an offramp", async ({ pa

await page.locator("#token-amount").fill("54.054054");

await expect(page.getByText("Available: 50.00 USDC on Polygon", { exact: true })).toBeVisible({ timeout: 20_000 });
await expect(page.getByText(/Insufficient USDC balance.*54\.054054 USDC on Polygon/)).toBeVisible();
await expect(page.getByText("Available: 50 USDC on Polygon", { exact: true })).toBeVisible({ timeout: 20_000 });
await expect(page.getByText(/Insufficient USDC balance.*54\.054 USDC on Polygon/)).toBeVisible();
await expect(page.getByRole("button", { name: /^Send/ })).toBeDisabled();
expect(backend.registerRequests).toHaveLength(0);
});
Expand All @@ -64,7 +64,7 @@ test("balance check follows the selected payin network, not the wallet chain", a
await page.getByRole("combobox").filter({ hasText: "Polygon" }).click();
await page.getByRole("option", { exact: true, name: "Arbitrum One" }).click();

await expect(page.getByText("Available: 1.00 USDC on Arbitrum One", { exact: true })).toBeVisible({ timeout: 20_000 });
await expect(page.getByText("Available: 1 USDC on Arbitrum One", { exact: true })).toBeVisible({ timeout: 20_000 });
await expect(sendButton).toBeDisabled();
expect(backend.balanceRequests.map(request => request.network)).toEqual(
expect.arrayContaining(["polygon-mainnet", "arb-mainnet"])
Expand Down Expand Up @@ -118,7 +118,7 @@ test("balance gate checks the selected ERC-20 rather than another held token", a
await page.getByRole("option", { exact: true, name: "USDT" }).click();
await page.locator("#token-amount").fill("100");

await expect(page.getByText("Available: 50.00 USDT on Polygon", { exact: true })).toBeVisible({ timeout: 20_000 });
await expect(page.getByText("Available: 50 USDT on Polygon", { exact: true })).toBeVisible({ timeout: 20_000 });
await expect(page.getByText(/Insufficient USDT balance/)).toBeVisible();
await expect(page.getByRole("button", { name: /^Send/ })).toBeDisabled();
expect(backend.registerRequests).toHaveLength(0);
Expand All @@ -134,7 +134,7 @@ test("native POL uses the portfolio native balance", async ({ page }) => {
await page.getByRole("option", { exact: true, name: "POL" }).click();
await page.locator("#token-amount").fill("1");

await expect(page.getByText("Available: 2.000000 POL on Polygon", { exact: true })).toBeVisible({ timeout: 20_000 });
await expect(page.getByText("Available: 2 POL on Polygon", { exact: true })).toBeVisible({ timeout: 20_000 });
await expect(page.getByRole("button", { name: /Send ≈ 1 POL/ })).toBeEnabled();
});

Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/e2e/onramp-journeys.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test("Onramp prefills the connected wallet but keeps a manually edited destinati
await expect(destination).toHaveValue(DESTINATION);
await expect(page.getByText("1 MXN = 0.2022 USDC", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "Fee details" }).click();
await expect(page.getByText("1 MXN = 0.1820 USDC", { exact: true })).toBeVisible();
await expect(page.getByText("1 MXN = 0.182 USDC", { exact: true })).toBeVisible();

expect(backend.unmatchedRequests).toEqual([]);
expect(backend.unexpectedExternalRequests).toEqual([]);
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/e2e/transfer-mxn-journey.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test("SELL MXN transfer: quote, register, ephemeral presigning, wallet broadcast
await expect(sendButton).toContainText(DISPLAY_PAYIN_USDC);
await expect(page.getByText("1 USDC = 18.69 MXN", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "Fee details" }).click();
await expect(page.getByText("1 USDC = 18.50 MXN", { exact: true })).toBeVisible();
await expect(page.getByText("1 USDC = 18.5 MXN", { exact: true })).toBeVisible();

// Stage 3: submitting runs register -> presign -> user signing -> start. The form toasts and
// navigates once the machine reaches Tracking.
Expand Down
Loading