diff options
| author | Adam Soltys <[email protected]> | 2026-03-03 16:08:52 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-03 16:08:52 -0800 |
| commit | 8551df92b96ff69f3cda50184cb714ba30f3803d (patch) | |
| tree | b53b414d20d40d9bb9ab33764caa113c5996a262 /test | |
| parent | 14fff3ba852b1d696f61a0da25aaf0e04ccd4158 (diff) | |
| download | coinos-ui-8551df92b96ff69f3cda50184cb714ba30f3803d.tar.gz coinos-ui-8551df92b96ff69f3cda50184cb714ba30f3803d.zip | |
get rid of /receive route
Diffstat (limited to 'test')
| -rw-r--r-- | test/e2e/helpers.ts | 4 | ||||
| -rw-r--r-- | test/e2e/receive-lightning-redirect.spec.ts | 15 |
2 files changed, 10 insertions, 9 deletions
diff --git a/test/e2e/helpers.ts b/test/e2e/helpers.ts index f0a7b81d..baa372f4 100644 --- a/test/e2e/helpers.ts +++ b/test/e2e/helpers.ts @@ -82,7 +82,7 @@ export async function apiGetInvoice(page: Page, invoiceId: string) { // --- Invoice creation via UI --- export async function createBitcoinInvoiceViaUI(page: Page, username: string) { - await page.goto(`/${username}/receive?address_type=bech32`); + await page.goto(`/invoice?address_type=bech32`); await page.waitForURL(/\/invoice\/[^/?#]+/, { timeout: 15_000 }); const invoiceId = page.url().match(/\/invoice\/([^/?#]+)/)?.[1]; @@ -99,7 +99,7 @@ export async function createBitcoinInvoiceViaUI(page: Page, username: string) { } export async function createLightningInvoiceViaUI(page: Page, username: string) { - await page.goto(`/${username}/receive`); + await page.goto(`/invoice`); await page.waitForURL(/\/invoice\/[^/?#]+/, { timeout: 15_000 }); // Click "More options" then "Bolt 11" to switch invoice type diff --git a/test/e2e/receive-lightning-redirect.spec.ts b/test/e2e/receive-lightning-redirect.spec.ts index 0a0f98fc..50f37d4d 100644 --- a/test/e2e/receive-lightning-redirect.spec.ts +++ b/test/e2e/receive-lightning-redirect.spec.ts @@ -1,21 +1,22 @@ import { expect, test } from "@playwright/test"; import { apiBaseUrl, bobUsername, bobPassword, login, lightningPay, waitForPageReady } from "./helpers"; -test("redirects from /receive to /paid when lightning address payment arrives", async ({ +test("redirects from /invoice to /paid when lightning address payment arrives", async ({ page, }) => { test.setTimeout(90_000); - // --- Bob: log in and navigate to receive page --- + // --- Bob: log in and navigate to invoice page --- await login(page, bobUsername, bobPassword); - await page.goto(`/${bobUsername}/receive`); + await page.goto(`/invoice`); + await page.waitForURL(/\/invoice\/[^/?#]+/, { timeout: 15_000 }); await waitForPageReady(page); - // Wait for the receive page to settle and websocket to connect + // Wait for the page to settle and websocket to connect await page.waitForTimeout(3000); - console.log(`[e2e] Bob on receive page: ${page.url()}`); + console.log(`[e2e] Bob on invoice page: ${page.url()}`); - // Ensure we're on the receive page (not redirected to an invoice) - expect(page.url()).toContain(`/${bobUsername}/receive`); + // Ensure we're on the invoice page + expect(page.url()).toContain(`/invoice/`); // --- External: create and pay LNURL invoice --- // Step 1: Fetch LNURL pay request |
