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
- ebd00b6cNest caller slot styles in three-panemre
- 009991efNest caller slot styles in list-firstmre
- 494d75d4Nest caller slot styles in app-sidebarmre
- e5571680Align all plugin sources with Hybriel day38bmre
- 5d204c46Re-vendor layouts to Hybriel set day38bmre
- 17e0f03eNest html-prefixed theme component overridesmre
- e54e735eFormat plain theme elements with nested rules and bare mediamre
- 547f834eRecord LY7 deployment and live verificationmre
- fa4600b1Link caller-slot style exceptions to hybriel#270mre
- 413b11e1Record corrected LY7 nesting, exact CSS and Chrome proofmre
- b810453etracker-demo: nest child and compound selectors in Stylemre
- 0b5b1d61notes-demo: nest child and compound selectors in Stylemre
- ab22bdc2mail-demo: nest child and compound selectors in Stylemre
- fe2d8de9home: nest child and compound selectors in Stylemre
- e631791buser-menu: nest child and compound selectors in Stylemre
- 69604944three-pane: nest child and compound selectors in Stylemre
- 3e389b83main-menu: nest child and compound selectors in Stylemre
- 05413975list-first: nest child and compound selectors in Stylemre
- c545b642content-first: nest child and compound selectors in Stylemre
- eae2be7aapp-sidebar: nest child selectors and document caller-slot gapmre