aboutsummaryrefslogtreecommitdiffstats
path: root/tools/feed-custom-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/feed-custom-test.js')
-rw-r--r--tools/feed-custom-test.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/feed-custom-test.js b/tools/feed-custom-test.js
index c5c7c44..122cb0a 100644
--- a/tools/feed-custom-test.js
+++ b/tools/feed-custom-test.js
@@ -194,8 +194,12 @@ try {
await page.click('[aria-label="Feed options"]'); await sleep(300); // the editor lives in the feed's ⋯ menu now
await page.evaluate(() => [...document.querySelectorAll('.msg-sheet button')].find((b) => /edit feed/i.test(b.textContent)).click()); await sleep(400);
check('the editor shows what was saved', await page.evaluate(() => document.querySelector('input[placeholder="#bitcoin #nostr"]').value === '#bitcoin #lightning' && document.querySelector('input[type=checkbox]:not(.feed-all-toggle)').checked));
- await click('delete feed'); await sleep(1000);
- check('deleting it lands back on Following', JSON.stringify(await chips()) === JSON.stringify(['*Following', 'Popular', '#gardenstr', 'Pack feed', 'Everything', 'Follows + lists', '+']), JSON.stringify(await chips()));
+ await page.click('.chat-back'); await sleep(600);
+ // Delete feed sits in the ⋯ menu itself, not behind Edit
+ await page.click('[aria-label="Feed options"]'); await sleep(300);
+ check('the menu offers Delete feed beside Edit', await page.evaluate(() => { const b = [...document.querySelectorAll('.msg-sheet button')].map((x) => x.textContent); return b.some((x) => /edit feed/i.test(x)) && b.some((x) => /delete feed/i.test(x)); }));
+ await page.evaluate(() => [...document.querySelectorAll('.msg-sheet button')].find((b) => /delete feed/i.test(b.textContent)).click()); await sleep(1000);
+ check('deleting it from the menu lands back on Following', JSON.stringify(await chips()) === JSON.stringify(['*Following', 'Popular', '#gardenstr', 'Pack feed', 'Everything', 'Follows + lists', '+']), JSON.stringify(await chips()));
check('no page errors', errs.length === 0, errs.slice(0, 2).join(' | '));
} finally { await browser.close(); server.stop(true); }
console.log(ok ? '\n✅ feeds: Following is one of many' : '\n❌ failed');