aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ark/custody-ui-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-22 23:17:13 -0700
committerAdam Soltys <[email protected]>2026-10-22 23:17:13 -0700
commit2d1f83c88000503b0ce5dbe391ce1929bcb9a71b (patch)
treea703da2608fb50e33b8f693eb547035ba5dac506 /tools/ark/custody-ui-test.js
parent60505c082937946f598dfbf11685c533f48ce4e1 (diff)
downloadcoinosv3-2d1f83c88000503b0ce5dbe391ce1929bcb9a71b.tar.gz
coinosv3-2d1f83c88000503b0ce5dbe391ce1929bcb9a71b.zip
Custody strategy: the price sits under the drop-down, not in the option text (which overflowed on a phone)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'tools/ark/custody-ui-test.js')
-rw-r--r--tools/ark/custody-ui-test.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/ark/custody-ui-test.js b/tools/ark/custody-ui-test.js
index 5eabbfa..9c238f5 100644
--- a/tools/ark/custody-ui-test.js
+++ b/tools/ark/custody-ui-test.js
@@ -78,7 +78,8 @@ try {
let tx = await text();
assert.match(tx, /Custody/);
const opts = await page.$$eval('.ark-custody option', (es) => es.map((e) => e.value + '=' + e.textContent));
- assert.deepEqual(opts, ['custodial=Allow coins to expire · no fees', 'self=Minimize renewal cost · 300 sats per renewal', 'exit=Minimize exit cost · 300 sats near expiry, 0.2% + 300 sats when early']);
+ assert.deepEqual(opts, ['custodial=Allow coins to expire', 'self=Minimize renewal cost', 'exit=Minimize exit cost']);
+ assert.equal(await page.$eval('.ark-custody-cost', (e) => e.textContent), 'no fees');
assert.equal(await page.$eval('#ark-custody-select', (e) => e.value), 'custodial', 'coins expire by default');
assert.equal(await page.evaluate(() => coopFeature.getCustody()), 'custodial');
assert.match(await page.$eval('.ark-custody-desc', (e) => e.textContent), /keeps its own exit until it expires/);
@@ -112,6 +113,7 @@ try {
assert.match(tx, /Custody choice saved/);
assert.match(await renewSheet(), /renews coins automatically once they are close to expiring/);
assert.match(await page.$eval('.ark-custody-desc', (e) => e.textContent), /Coins renew in the last hours/);
+ assert.equal(await page.$eval('.ark-custody-cost', (e) => e.textContent), '300 sats per renewal');
const calls = await page.evaluate(() => coopFeature.autoRefreshCalls);
assert.deepEqual(calls[0], ['ensure', 6, 8, 1], 'backstop orders registered at once (regtest margin 6)');
assert.deepEqual(calls[1], ['refresh', ['coin-1', 'coin-2']], 'the coin past its timelock is renewed now with the small change; the deep healthy one is left alone');
@@ -121,6 +123,7 @@ try {
await page.evaluate(() => { coopFeature.autoRefreshCalls.length = 0; });
await page.select('#ark-custody-select', 'exit'); await sleep(400);
assert.equal(await page.evaluate(() => coopFeature.getCustody()), 'exit');
+ assert.equal(await page.$eval('.ark-custody-cost', (e) => e.textContent), '300 sats near expiry, 0.2% + 300 sats when early');
const calls2 = await page.evaluate(() => coopFeature.autoRefreshCalls);
assert.deepEqual(calls2[1], ['refresh', ['coin-1', 'coin-0', 'coin-2']], 'expired + deep (worth it) + small change ride one round');
console.log('✓ "Keep my exit cheap" renews the deep coin too, when the fee is under a tenth of it');