diff options
| author | Adam Soltys <[email protected]> | 2026-03-01 12:42:16 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-01 12:42:16 -0800 |
| commit | 0167d3d9348d9e2cb1f85cd499ef346f6e85dad1 (patch) | |
| tree | 8c3048fdf0f4209618ff7a4cb2be612856d3780b /test/e2e/ark-custodial-receive.spec.ts | |
| parent | 6ac0d3da9668149cb2c3b6322fa431a2f7f508a9 (diff) | |
| download | coinos-ui-0167d3d9348d9e2cb1f85cd499ef346f6e85dad1.tar.gz coinos-ui-0167d3d9348d9e2cb1f85cd499ef346f6e85dad1.zip | |
Fix ark e2e tests: consolidate into serial suite, fix VTXO contention
- Skip settle/refresh during tests via ark:skipSettle flag to prevent
VTXOs from being registered in never-completing ark rounds
- Add 3s timeout on syncPromise wait in sendArk to prevent hangs
- Fix ensureArkAccount to wait for autoUnlockArk and create account
via API with correct address (Schnorr signatures are non-deterministic)
- Consolidate all 6 ark tests into single serial file to prevent
server wallet contention
- Split playwright config into parallel (non-ark) and serial (ark) projects
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Diffstat (limited to 'test/e2e/ark-custodial-receive.spec.ts')
| -rw-r--r-- | test/e2e/ark-custodial-receive.spec.ts | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/test/e2e/ark-custodial-receive.spec.ts b/test/e2e/ark-custodial-receive.spec.ts deleted file mode 100644 index 41b63733..00000000 --- a/test/e2e/ark-custodial-receive.spec.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { expect, test } from "@playwright/test"; -import { - bobUsername, - bobPassword, - testSecret, - apiBaseUrl, - login, - createArkInvoiceViaUI, - sendArkFromTestEndpoint, -} from "./helpers"; - -test("custodial account receives ark payment via vault forward", async ({ page }) => { - test.setTimeout(120_000); - test.skip(!testSecret, "E2E_TEST_SECRET is required"); - - // 1. Log in as Bob - await login(page, bobUsername, bobPassword); - - // 2. Create ark invoice via the vault account (needs wallet unlock) - const { invoiceId, address } = await createArkInvoiceViaUI(page, bobPassword); - console.log(`[e2e] Created ark invoice ${invoiceId} on vault account, address: ${address}`); - - // 3. Stay on invoice page (subscribe to websocket notifications) - await page.goto(`/invoice/${invoiceId}`); - await page.waitForURL(new RegExp(`/invoice/${invoiceId}`)); - - // 4. Send ark funds from the server test wallet to the vault address - await sendArkFromTestEndpoint(page, address, 1000, invoiceId); - console.log(`[e2e] Sent 1000 sats to vault address ${address}`); - - // 5. Wait for the custodial forward to complete - // Flow: vault receives → arkSync detects → client forwards to server ark wallet - // → POST /ark/receive → credits custodial account - let paid = false; - let status: any; - - for (let i = 0; i < 60; i++) { - const statusResponse = await page.request.get(`${apiBaseUrl}/invoice/${invoiceId}`); - if (statusResponse.ok()) { - status = await statusResponse.json(); - if ((status?.received || 0) >= 1000) { - paid = true; - break; - } - } - await page.waitForTimeout(2000); - } - - expect(paid, `Custodial ark forward did not complete: ${JSON.stringify(status)}`).toBeTruthy(); - - console.log( - `[e2e] Custodial ark receive complete: invoice ${invoiceId} received=${status?.received}`, - ); -}); |
