gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmain4099e64aMerge branch 'font-segoe-ui' into mainAtlasmain/tests/e2e-md-showcase.mjs

2.5 KB

  1. // tests/e2e-md-showcase.mjs — mission 010: tests/md-showcase.mjs in lisbeth's real Chrome, ONE existing page tab (picked fresh from /json),
  2. // real keys only, never /json/new, never the clipboard. Run under the lock:
  3. // timeout 600 flock /media/STORAGE/claude-scratch/atlas/lisbeth.lock env HL_CDP_URL=http://127.0.0.1:9223 MDK_BASE=http://127.0.0.1:<port> [MDK_SHOTS=dir MDK_TAG=old|new] node tests/e2e-md-showcase.mjs
  4. // (needs ssh -L 9223 to lisbeth and a reverse -R <port> from lisbeth to the app). The tab is left at about:blank.
  5. import { writeFileSync, mkdirSync } from 'node:fs';
  6. import { join } from 'node:path';
  7. import { Page, sleep, launchBrowser } from './cdp.mjs';
  8. import { mdShowcase } from './md-showcase.mjs';
  9. const BASE = process.env.MDK_BASE, SHOTS = process.env.MDK_SHOTS, TAG = process.env.MDK_TAG || 'run';
  10. if (SHOTS) mkdirSync(SHOTS, { recursive: true });
  11. let passes = 0, failures = 0;
  12. const check = (l, ok, d = '') => { console.log(`${ok ? 'ok ' : 'FAIL'} ${l}${ok ? '' : ' — ' + d}`); if (ok) passes++; else failures++; };
  13. const tabs = (await (await fetch(process.env.HL_CDP_URL + '/json')).json()).filter(t => t.type === 'page');
  14. const tab = tabs.find(t => t.url === 'about:blank') || tabs[0];
  15. if (!tab) { console.log('no page tab'); process.exit(2); }
  16. console.log('tab', tab.id, tab.url);
  17. const browser = await launchBrowser({ debugPortRange: (process.env.LAYOUTS_GATE_CHROME_MD || '8777-8779').split('-').map(Number) });
  18. const { sessionId } = await browser.conn.send('Target.attachToTarget', { targetId: tab.id, flatten: true });
  19. const page = new Page(browser, tab.id, sessionId); await page._init();
  20. try {
  21. for (const width of [390, 1280]) {
  22. await page.send('Emulation.setDeviceMetricsOverride', { width, height: width === 390 ? 844 : 900, deviceScaleFactor: 1, mobile: width === 390 });
  23. await page.goto(BASE + '/components/md-editor');
  24. await page.send('Page.bringToFront');
  25. await page.waitFor('!!window.__hl && window.__hl.socket && window.__hl.socket.readyState === 1', { timeout: 30000, label: 'hydrated' });
  26. const shot = async (n) => { if (!SHOTS) return; const { data } = await page.send('Page.captureScreenshot', { format: 'png' }); writeFileSync(join(SHOTS, `${TAG}-${width}-${n}.png`), Buffer.from(data, 'base64')); };
  27. await mdShowcase(page, { check, sleep, label: String(width), shot });
  28. }
  29. } catch (e) { check('e2e ran', false, String(e && e.stack || e)); }
  30. try { await page.send('Emulation.clearDeviceMetricsOverride'); await page.goto('about:blank'); } catch {}
  31. browser.conn.close();
  32. console.log(`${passes} passed, ${failures} failed`);
  33. process.exit(failures ? 1 : 0);

Branches

Latest commits

  • 4099e64aMerge branch 'font-segoe-ui' into mainAtlas
  • e14fb795|||PR Theme font: Segoe UI first (his choice 2026-11-19)Atlas
  • 44071d2cMerge branch 'hl-standard-5' into mainAtlas
  • 5ea64202|||PR Gate: count the new-tab check's console errors tooAtlas
  • 2752ceddMerge branch 'hl-standard-4' into mainAtlas
  • ac552b81|||PR Gate: keyboard (Tab/Enter/Space) and Back/Forward/reload/new-tab checks (HL-STANDARD F5, F21)Atlas
  • 8cddcaa9Merge branch 'hl-standard-2' into mainAtlas
  • 2b480a64|||PR Type the route parameter of main-menu build (HL-STANDARD L10)Atlas
  • ab54a39dMerge branch 'hl-standard' into mainAtlas
  • 04d36fcf|||PR Type function parameters and drop unneeded let (HL-STANDARD L2, L10)Atlas
  • 220c8fa4Merge branch 'readme-audit' into mainAtlas
  • b78fb85a|||PR README matches the codemre
  • 9f351699Preserve comments and nest supported selectors without changing rendered outputmre
  • 97110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre
  • ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
  • 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
  • b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
  • 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
  • ebd00b6cNest caller slot styles in three-panemre
  • 009991efNest caller slot styles in list-firstmre