aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gif-picker-test.js4
-rw-r--r--tools/post-actions-test.js5
2 files changed, 5 insertions, 4 deletions
diff --git a/tools/gif-picker-test.js b/tools/gif-picker-test.js
index 956b4f7..f72cde3 100644
--- a/tools/gif-picker-test.js
+++ b/tools/gif-picker-test.js
@@ -53,8 +53,8 @@ try {
await page.evaluate(() => document.querySelector('.app-nav-button[aria-label="Feed"]')?.click());
await waitFor(() => !!document.querySelector('.feed-post-fab'), 15000);
await page.evaluate(() => document.querySelector('.feed-post-fab').click());
- check('the post composer has a GIF button', await waitFor(() => !!document.querySelector('.post-actions .gif-btn'), 8000));
- await page.evaluate(() => document.querySelector('.post-actions .gif-btn').click());
+ check('the post composer has a GIF button', await waitFor(() => !!document.querySelector('.compose-box .gif-btn'), 8000));
+ await page.evaluate(() => document.querySelector('.compose-box .gif-btn').click());
check('the picker opens with the nostr.build attribution, linked', await waitFor(() => !!document.querySelector('.gif-sheet .gif-head a[href="https://nostr.build"]'), 5000));
check('...and the first starter\'s GIFs', await waitFor(() => document.querySelectorAll('.gif-grid .gif-tile').length >= 6, 20000), String(await page.evaluate(() => document.querySelectorAll('.gif-tile').length)));
check('a tile plays the small mp4, not the original', await waitFor(() => [...document.querySelectorAll('.gif-tile video')].some((v) => /mp4/.test(v.currentSrc || v.getAttribute('src') || '') && v.readyState >= 2), 15000));
diff --git a/tools/post-actions-test.js b/tools/post-actions-test.js
index a33079e..766cfa3 100644
--- a/tools/post-actions-test.js
+++ b/tools/post-actions-test.js
@@ -93,10 +93,11 @@ try {
const reply = await page.evaluate(() => {
const box = document.querySelector('.thread-reply-input');
if (!box) return { box: false };
- const row = box.parentElement;
+ const row = box.closest('.thread-reply');
return {
box: true,
- attach: !!row.querySelector('.attach-btn'),
+ // in the field's corner now, beside the GIF button
+ attach: !!row.querySelector('.compose-box .compose-tool:not(.gif-btn)'),
file: !!row.querySelector('#reply-file'),
accepts: (row.querySelector('#reply-file') || {}).accept,
};