aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-14 23:29:40 -0700
committerAdam Soltys <[email protected]>2026-10-14 23:29:40 -0700
commitc5d42cd305f2f96e84a7526fef1cffcc6aeaac02 (patch)
tree697cff4caa9b1d258f979f0ccb59c23b954e91a1 /tools
parent686309a584a8e7a13091cb194e42aa09e2aec5d5 (diff)
downloadcoinosv3-c5d42cd305f2f96e84a7526fef1cffcc6aeaac02.tar.gz
coinosv3-c5d42cd305f2f96e84a7526fef1cffcc6aeaac02.zip
Count posts rather than images in media pager
Diffstat (limited to 'tools')
-rw-r--r--tools/profile-pager-test.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/profile-pager-test.js b/tools/profile-pager-test.js
index 2835b34..85aee86 100644
--- a/tools/profile-pager-test.js
+++ b/tools/profile-pager-test.js
@@ -94,19 +94,22 @@ try {
check('her picture opens in the pager, on itself', await resting('a1.png'), await curPic());
const keys = await page.evaluate(() => [...document.querySelectorAll('.mp-slide')].map((s) => s.getAttribute('data-k').split('/').pop()));
check('the pager holds her pictures only, in her timeline\'s order', JSON.stringify(keys) === JSON.stringify(['a1.png', 'a2.png', 'b.png', 'd.png']), JSON.stringify(keys));
+ check('counter starts at the first post', await page.$eval('.mp-position', (e) => e.textContent) === '1 / 3');
await page.keyboard.press('ArrowRight');
check('right: the post\'s second picture', await resting('a2.png'), await curPic());
+ check('sideways keeps the same post number', await page.$eval('.mp-position', (e) => e.textContent) === '1 / 3');
await page.keyboard.press('ArrowDown');
check('down: her next post with a picture', await resting('b.png'), await curPic());
+ check('down advances by one post', await page.$eval('.mp-position', (e) => e.textContent) === '2 / 3');
await page.keyboard.press('ArrowDown');
check('down again: her last', await resting('d.png'), await curPic());
await page.keyboard.press('ArrowDown'); await sleep(600);
check('past her last wraps to her first post', await resting('a2.png'), await curPic());
- check('counter follows sideways position', await page.$eval('.mp-position', (e) => e.textContent) === '2 / 4');
+ check('counter counts the first post once', await page.$eval('.mp-position', (e) => e.textContent) === '1 / 3');
check('no loading slide', await page.$('.mp-tail') === null);
await page.keyboard.press('ArrowUp'); await resting('d.png');
check('up from first wraps to last', await curPic() === 'd.png');
- check('counter at the last picture', await page.$eval('.mp-position', (e) => e.textContent) === '4 / 4');
+ check('counter at the last post', await page.$eval('.mp-position', (e) => e.textContent) === '3 / 3');
await page.touchscreen.touchStart(195, 650);
for (let i = 1; i <= 8; i++) { await page.touchscreen.touchMove(195, 650 - 40 * i); await sleep(16); }
await page.touchscreen.touchEnd();