tracker
All repositories: gitoria
1.7 KB
// repro for tracker#38: real clicks on the pager, logs URL + first tile + current page after eachimport { launchBrowser, sleep } from './cdp.mjs';const BASE = process.argv[2] || 'https://tracker.worldapi.org';const width = Number(process.argv[3] || 1280);const b = await launchBrowser({ debugPortRange: (process.env.REPRO_CHROME || '8736-8739').split('-').map(Number) });const p = await b.newPage();if (width < 600) await p.send('Emulation.setDeviceMetricsOverride', { width, height: 800, deviceScaleFactor: 2, mobile: true });await p.goto(BASE + '/movies');await sleep(2500);const state = () => p.evaluate(`JSON.stringify({ url: location.pathname, first: (document.querySelector('a.tile tile-title')||{}).textContent, cur: (document.querySelector('pagination li.current')||{}).textContent, items: Array.from(document.querySelectorAll('pagination li')).map(l=>l.textContent.trim()).join(' '), n: document.querySelectorAll('pagination').length })`);console.log('start', await state());for (const step of ['2', '3', 'Next', 'Previous', '10', 'BACK', 'FORWARD']) {if (step === 'BACK') await p.evaluate('history.back()');else if (step === 'FORWARD') await p.evaluate('history.forward()');else {const ok = await p.evaluate(`(() => { document.querySelectorAll('[data-t38]').forEach(e => e.removeAttribute('data-t38')); const bt = Array.from(document.querySelectorAll('pagination button')).find(b => b.textContent.trim() === ${JSON.stringify(step)}); if (!bt) return false; bt.setAttribute('data-t38', '1'); return true; })()`);if (!ok) { console.log(step, 'NO BUTTON'); continue; }await p.click('[data-t38]');}await sleep(2500);console.log(step.padEnd(8), await state());}console.log('problems', JSON.stringify(p.problems().slice(0, 5)));await b.close();
Branches
Latest commits
- 64b8d1dclog: RV39 startedmre
- 1f2df72amission RV39mre
- 6c1936f9log+status: GC planmre
- 2846a840log: m569 result, GC hypothesismre
- b24cd2d5log: Anton on hl:fetch, mission 569mre
- 7d42cac1log+status: SL1 measured, fetch stalls remainmre
- 8e5f2ceflog: SL1 deployedmre
- 29f34212log: SL1 deploy startedmre
- 529dd741Merge sl1-slices: slice details repair and person fill (SL1)mre
- 8a83316blog: SL1 result, session drain slowermre
- 35e93e8dSL1: slice the details repair and person fill: catalog lists changed in place, 40 ms fill steps, people created in steps, writes one table per tickmre
- 72c9119flog+status: SL1 startedmre
- d74620fcmission SL1: slice repair and person fillmre
- 5d542d73log+status: ST1 resultmre
- 3945eb81ST1: stall diagnosis reportmre
- 404733aclog: ST1 startedmre
- 3e3d5a55mission ST1: stall diagnosismre
- 9c3180eblog+status: RV28d measured after deploymre
- fdf10b1alog: RV28d deployed on day38bmre
- 320005e9log: RV28d merged, deploy runningmre