aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/nip29-group-test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/nip29-group-test.js b/tools/nip29-group-test.js
index 9096a47..de9b8e1 100644
--- a/tools/nip29-group-test.js
+++ b/tools/nip29-group-test.js
@@ -122,6 +122,15 @@ try {
let shown = false;
for (let i = 0; i < 60 && !shown; i++) { shown = await p2.evaluate(() => [...document.querySelectorAll('.chat-thread-row')].some((r) => r.textContent.includes('pyramid runners'))); if (!shown) await sleep(250); }
check('...and the group joined on the laptop appears there', !before && shown);
+ // a group whose relay is gone says so on its row, not "0 members"
+ await p2.evaluate(() => [...document.querySelectorAll('button')].find((n) => n.textContent.trim().toLowerCase() === 'new group')?.click()); await sleep(300);
+ await p2.evaluate(() => [...document.querySelectorAll('button')].find((n) => n.textContent.trim().toLowerCase() === 'relay group')?.click()); await sleep(200);
+ await p2.type('.nip29-address', "gone.invalid'deadgroup");
+ await p2.evaluate(() => [...document.querySelectorAll('button')].find((n) => n.textContent.trim().toLowerCase() === 'join')?.click()); await sleep(1500);
+ await p2.evaluate(() => document.querySelector('.chat-head button')?.click()); await sleep(500);
+ let dead = '';
+ for (let i = 0; i < 60 && !/answering/.test(dead); i++) { dead = await p2.evaluate(() => [...document.querySelectorAll('.chat-thread-row')].find((r) => r.textContent.includes('deadgroup'))?.textContent || ''); if (!/answering/.test(dead)) await sleep(250); }
+ check("a group on a relay that's gone says so", /gone\.invalid isn't answering/.test(dead), dead.slice(0, 80));
await ctx.close();
}