gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitf29e2502f29e2502log: RV39 gate fixmref29e2502/tests/repro-t38.mjs

1.7 KB

  1. // repro for tracker#38: real clicks on the pager, logs URL + first tile + current page after each
  2. import { launchBrowser, sleep } from './cdp.mjs';
  3. const BASE = process.argv[2] || 'https://tracker.worldapi.org';
  4. const width = Number(process.argv[3] || 1280);
  5. const b = await launchBrowser({ debugPortRange: (process.env.REPRO_CHROME || '8736-8739').split('-').map(Number) });
  6. const p = await b.newPage();
  7. if (width < 600) await p.send('Emulation.setDeviceMetricsOverride', { width, height: 800, deviceScaleFactor: 2, mobile: true });
  8. await p.goto(BASE + '/movies');
  9. await sleep(2500);
  10. 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 })`);
  11. console.log('start', await state());
  12. for (const step of ['2', '3', 'Next', 'Previous', '10', 'BACK', 'FORWARD']) {
  13. if (step === 'BACK') await p.evaluate('history.back()');
  14. else if (step === 'FORWARD') await p.evaluate('history.forward()');
  15. else {
  16. 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; })()`);
  17. if (!ok) { console.log(step, 'NO BUTTON'); continue; }
  18. await p.click('[data-t38]');
  19. }
  20. await sleep(2500);
  21. console.log(step.padEnd(8), await state());
  22. }
  23. console.log('problems', JSON.stringify(p.problems().slice(0, 5)));
  24. await b.close();

Branches

Latest commits

  • f29e2502log: RV39 gate fixmre
  • ad529ac1log: m572 verdictmre
  • 1b37d404RV39 on hold: hybriel#308mre
  • f9127c68Revert "Merge branch 'rv39'"mre
  • cd39f3d3log: hybriel#308mre
  • 51341d6elog: RV39 deploy startedmre
  • c9e29e06Merge branch 'rv39'mre
  • 0f8d1fdclog: RV39 report, browser 387/2mre
  • 50249b0bRV39: reportmre
  • 10ed9581compose: HL_GC_STATS=1mre
  • 955da19bRV39: re-vendor Hybriel set day39 (source 51e921d7, bin 6b481aa7)mre
  • 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