aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ark/alice.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-07 09:08:57 -0700
committerAdam Soltys <[email protected]>2026-10-07 09:08:57 -0700
commit014cf755cc330529c5fa1dedb321b27750b150b1 (patch)
tree917ed78ecf97333e2c50f0f8ea55ab98648fb624 /tools/ark/alice.js
parent66113070c59cfabf7b418828d174f70c55a21dd6 (diff)
downloadcoinosv3-014cf755cc330529c5fa1dedb321b27750b150b1.tar.gz
coinosv3-014cf755cc330529c5fa1dedb321b27750b150b1.zip
ark ui-test: port the browser e2e to the current app
The old test spawned ~/halwallet's dev server and drove its long-gone UI (receive-mode select, Settings 'Refresh / consolidate'). It now builds this repo's app bundle and drives it against the regtest stack: set up Spending, receive over Ark from alice, send back from the Send form, fund Savings on-chain and move it into Spending (board), reload. Only the page and the local backends are reachable. aliceReady uses 'bark maintain' so actions a killed run left half-done get resumed instead of holding coins locked. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'tools/ark/alice.js')
-rw-r--r--tools/ark/alice.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/ark/alice.js b/tools/ark/alice.js
index 9c33661..b270edd 100644
--- a/tools/ark/alice.js
+++ b/tools/ark/alice.js
@@ -27,7 +27,10 @@ const expiredCoins = () => {
export async function aliceReady() {
if (expiredCoins().length) {
console.log(' … refreshing alice\'s expired coins first');
- sh(`${ALICE} -q refresh --all >/dev/null`);
+ // maintain = refresh what's expiring + resume any action a killed run left
+ // half-done (those hold their coins locked); errors surface below as a
+ // balance that never comes back
+ try { sh(`${ALICE} -q maintain >/dev/null 2>&1`); } catch {}
// the round's output turns spendable once its funding tx confirms and the
// indexer has seen it — keep mining until bark agrees
for (let i = 0; i < 20 && (expiredCoins().length || !aliceBalance()); i++) { mine(1); await sleep(1500); }