layouts
All repositories: gitoria
2.5 KB
// tests/e2e-md-showcase.mjs — mission 010: tests/md-showcase.mjs in lisbeth's real Chrome, ONE existing page tab (picked fresh from /json),// real keys only, never /json/new, never the clipboard. Run under the lock:// 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// (needs ssh -L 9223 to lisbeth and a reverse -R <port> from lisbeth to the app). The tab is left at about:blank.import { writeFileSync, mkdirSync } from 'node:fs';import { join } from 'node:path';import { Page, sleep, launchBrowser } from './cdp.mjs';import { mdShowcase } from './md-showcase.mjs';const BASE = process.env.MDK_BASE, SHOTS = process.env.MDK_SHOTS, TAG = process.env.MDK_TAG || 'run';if (SHOTS) mkdirSync(SHOTS, { recursive: true });let passes = 0, failures = 0;const check = (l, ok, d = '') => { console.log(`${ok ? 'ok ' : 'FAIL'} ${l}${ok ? '' : ' — ' + d}`); if (ok) passes++; else failures++; };const tabs = (await (await fetch(process.env.HL_CDP_URL + '/json')).json()).filter(t => t.type === 'page');const tab = tabs.find(t => t.url === 'about:blank') || tabs[0];if (!tab) { console.log('no page tab'); process.exit(2); }console.log('tab', tab.id, tab.url);const browser = await launchBrowser({ debugPortRange: (process.env.LAYOUTS_GATE_CHROME_MD || '8777-8779').split('-').map(Number) });const { sessionId } = await browser.conn.send('Target.attachToTarget', { targetId: tab.id, flatten: true });const page = new Page(browser, tab.id, sessionId); await page._init();try {for (const width of [390, 1280]) {await page.send('Emulation.setDeviceMetricsOverride', { width, height: width === 390 ? 844 : 900, deviceScaleFactor: 1, mobile: width === 390 });await page.goto(BASE + '/components/md-editor');await page.send('Page.bringToFront');await page.waitFor('!!window.__hl && window.__hl.socket && window.__hl.socket.readyState === 1', { timeout: 30000, label: 'hydrated' });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')); };await mdShowcase(page, { check, sleep, label: String(width), shot });}} catch (e) { check('e2e ran', false, String(e && e.stack || e)); }try { await page.send('Emulation.clearDeviceMetricsOverride'); await page.goto('about:blank'); } catch {}browser.conn.close();console.log(`${passes} passed, ${failures} failed`);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