website gallery: report + live check after v2 (open, next, close by clicking the picture, swipe keeps it open, JS off opens the file)
gates / gates (push) Successful in 4m27s
gates / gates (push) Successful in 4m27s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 289 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 309 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 255 KiB |
@@ -0,0 +1,52 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
||||
const state = p => p.evaluate(() => { const b = document.querySelector('.lightbox-overlay');
|
||||
return { open: !!(b && b.classList.contains('active')), src: b ? (b.querySelector('.lightbox-image').getAttribute('src') || '').split('/').pop() : null,
|
||||
counter: b ? b.querySelector('.lightbox-counter').textContent : null, closeLabel: b ? b.querySelector('.lightbox-close').getAttribute('aria-label') : null,
|
||||
focus: document.activeElement && document.activeElement.className, overflow: document.body.style.overflow }; });
|
||||
(async () => {
|
||||
const b = await puppeteer.launch({args: ['--no-sandbox']});
|
||||
const out = [];
|
||||
// 1-3: dashboard set on /, /en/, /technologiak — open, next, close by clicking the picture
|
||||
for (const u of ['https://felhom.eu/', 'https://felhom.eu/en/', 'https://felhom.eu/technologiak']) {
|
||||
const p = await b.newPage(); await p.setViewport({width: 1280, height: 900});
|
||||
await p.goto(u, {waitUntil: 'networkidle2'});
|
||||
await p.click('a[data-gallery="dashboard"]'); await sleep(600);
|
||||
const s1 = await state(p);
|
||||
await p.click('.lightbox-next'); await sleep(600);
|
||||
const s2 = await state(p);
|
||||
await p.screenshot({path: `/out/dash-${u.split('/').filter(Boolean).pop().replace('felhom.eu', 'root')}.png`});
|
||||
await p.click('.lightbox-image'); await sleep(400);
|
||||
const s3 = await state(p);
|
||||
out.push([u, 'opened', s1, 'next', s2, 'after click on picture', s3, 'url', p.url()]); await p.close();
|
||||
}
|
||||
// 4-5: app pictures on /alkalmazasok and /en/apps — open Immich, close by clicking the picture
|
||||
for (const u of ['https://felhom.eu/alkalmazasok', 'https://felhom.eu/en/apps']) {
|
||||
const p = await b.newPage(); await p.setViewport({width: 1280, height: 900});
|
||||
await p.goto(u, {waitUntil: 'networkidle2'});
|
||||
await p.click('a[data-gallery="immich"]'); await sleep(600);
|
||||
const s1 = await state(p);
|
||||
await p.click('.lightbox-image'); await sleep(400);
|
||||
out.push([u, 'opened', s1, 'after click on picture', await state(p), 'url', p.url()]); await p.close();
|
||||
}
|
||||
// 6: swipe at 376 px does not close
|
||||
{ const p = await b.newPage(); await p.setViewport({width: 376, height: 812, isMobile: true, hasTouch: true});
|
||||
await p.goto('https://felhom.eu/en/apps', {waitUntil: 'networkidle2'});
|
||||
await p.tap('a[data-gallery="immich"]'); await sleep(600);
|
||||
const s1 = await state(p);
|
||||
const c = await p.client ? null : null;
|
||||
const cdp = await p.target().createCDPSession();
|
||||
const t = async (type, x) => cdp.send('Input.dispatchTouchEvent', {type, touchPoints: type === 'touchEnd' ? [] : [{x, y: 400}]});
|
||||
await t('touchStart', 300); for (const x of [250, 200, 150, 100]) { await t('touchMove', x); await sleep(30); } await t('touchEnd', 100); await sleep(600);
|
||||
const s2 = await state(p);
|
||||
await p.screenshot({path: '/out/swipe-376.png'});
|
||||
await p.tap('.lightbox-image'); await sleep(500);
|
||||
out.push(['376 px /en/apps', 'opened', s1, 'after swipe left', s2, 'after tap on picture', await state(p)]); await p.close(); }
|
||||
// 7: JavaScript off — the link opens the image file
|
||||
{ const p = await b.newPage(); await p.setJavaScriptEnabled(false); await p.setViewport({width: 1280, height: 900});
|
||||
await p.goto('https://felhom.eu/', {waitUntil: 'networkidle2'});
|
||||
await Promise.all([p.waitForNavigation({waitUntil: 'networkidle2'}), p.click('a[data-gallery="dashboard"]')]);
|
||||
out.push(['JS off /', 'url after click', p.url()]); await p.close(); }
|
||||
for (const o of out) console.log(JSON.stringify(o));
|
||||
await b.close();
|
||||
})().catch(e => { console.error(e); process.exit(1); });
|
||||
@@ -0,0 +1,7 @@
|
||||
["https://felhom.eu/","opened",{"open":true,"src":"dashboard-start-hu.webp","counter":"1 / 4","closeLabel":"Bezárás","focus":"lightbox-close","overflow":"hidden"},"next",{"open":true,"src":"dashboard-apps-hu.webp","counter":"2 / 4","closeLabel":"Bezárás","focus":"lightbox-nav lightbox-next","overflow":"hidden"},"after click on picture",{"open":false,"src":"","counter":"2 / 4","closeLabel":"Bezárás","focus":"","overflow":""},"url","https://felhom.eu/"]
|
||||
["https://felhom.eu/en/","opened",{"open":true,"src":"dashboard-start-en.webp","counter":"1 / 4","closeLabel":"Close","focus":"lightbox-close","overflow":"hidden"},"next",{"open":true,"src":"dashboard-apps-en.webp","counter":"2 / 4","closeLabel":"Close","focus":"lightbox-nav lightbox-next","overflow":"hidden"},"after click on picture",{"open":false,"src":"","counter":"2 / 4","closeLabel":"Close","focus":"","overflow":""},"url","https://felhom.eu/en/"]
|
||||
["https://felhom.eu/technologiak","opened",{"open":true,"src":"dashboard-apps-hu.webp","counter":"1 / 2","closeLabel":"Bezárás","focus":"lightbox-close","overflow":"hidden"},"next",{"open":true,"src":"dashboard-backups-hu.webp","counter":"2 / 2","closeLabel":"Bezárás","focus":"lightbox-close","overflow":"hidden"},"after click on picture",{"open":false,"src":"","counter":"2 / 2","closeLabel":"Bezárás","focus":"","overflow":""},"url","https://felhom.eu/technologiak"]
|
||||
["https://felhom.eu/alkalmazasok","opened",{"open":true,"src":"immich-screenshot-1.webp","counter":"1 / 4","closeLabel":"Bezárás","focus":"lightbox-close","overflow":"hidden"},"after click on picture",{"open":false,"src":"","counter":"1 / 4","closeLabel":"Bezárás","focus":"app-shot-link","overflow":""},"url","https://felhom.eu/alkalmazasok"]
|
||||
["https://felhom.eu/en/apps","opened",{"open":true,"src":"immich-screenshot-1.webp","counter":"1 / 4","closeLabel":"Close","focus":"lightbox-close","overflow":"hidden"},"after click on picture",{"open":false,"src":"","counter":"1 / 4","closeLabel":"Close","focus":"app-shot-link","overflow":""},"url","https://felhom.eu/en/apps"]
|
||||
["376 px /en/apps","opened",{"open":true,"src":"immich-screenshot-1.webp","counter":"1 / 4","closeLabel":"Close","focus":"lightbox-close","overflow":"hidden"},"after swipe left",{"open":true,"src":"immich-screenshot-2.webp","counter":"2 / 4","closeLabel":"Close","focus":"lightbox-close","overflow":"hidden"},"after tap on picture",{"open":false,"src":"","counter":"2 / 4","closeLabel":"Close","focus":"app-shot-link","overflow":""}]
|
||||
["JS off /","url after click","https://felhom.eu/assets/dashboard-start-hu.webp"]
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 128 KiB |
Reference in New Issue
Block a user