create-pmos 0.691.0 → 0.693.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +20 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/adler-moments-test.js +3 -35
- package/workspace/adler-seasons-test.js +1 -1
- package/workspace/briefing-premium-adddoc-test.js +1 -1
- package/workspace/briefing-premium-board-test.js +1 -1
- package/workspace/briefing-premium-doc-edit-test.js +1 -1
- package/workspace/briefing-premium-work-test.js +2 -2
- package/workspace/changelog.json +19 -0
- package/workspace/chat-asks-test.js +1 -1
- package/workspace/core-docs-workflow-test.js +1 -1
- package/workspace/ev-everywhere-test.js +3 -14
- package/workspace/guide/cli.md +3 -1
- package/workspace/guide/home.md +1 -1
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/settings-and-switches.md +0 -1
- package/workspace/impact-screens-test.js +2 -47
- package/workspace/ini-workflow-test.js +1 -1
- package/workspace/lib/board-premium.js +10 -2
- package/workspace/lib/initiative-cli.js +31 -4
- package/workspace/lib/initiative-origin.js +131 -0
- package/workspace/lib/initiative-writer.js +35 -2
- package/workspace/lib/routes-boards.js +4 -1
- package/workspace/live-pill-round-test.js +6 -18
- package/workspace/milestone-suggest-test.js +4 -28
- package/workspace/news-viewers-test.js +3 -29
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +2 -2
- package/workspace/premium-briefing-depth-test.js +4 -4
- package/workspace/premium-chat-attach-test.js +3 -2
- package/workspace/premium-chat-chart-tab-test.js +8 -7
- package/workspace/premium-chat-context-test.js +3 -1
- package/workspace/premium-chat-goal-view-test.js +3 -1
- package/workspace/premium-chat-line-test.js +8 -6
- package/workspace/premium-chat-report-tab-test.js +13 -5
- package/workspace/premium-chat-term-test.js +2 -2
- package/workspace/premium-chat-viewer-test.js +10 -16
- package/workspace/premium-core-doc-issue-test.js +7 -2
- package/workspace/premium-discuss-landing-test.js +9 -5
- package/workspace/premium-html-viewer-test.js +7 -3
- package/workspace/premium-link-suggest-test.js +6 -10
- package/workspace/premium-phone-card-test.js +2 -2
- package/workspace/premium-viewer-download-test.js +1 -1
- package/workspace/premium-viewer-flicker-test.js +1 -1
- package/workspace/premium-viewer-share-test.js +2 -2
- package/workspace/premium-viewer-test.js +1 -1
- package/workspace/premium-vw-cal-test.js +1 -1
- package/workspace/premium-vw-copy-test.js +3 -3
- package/workspace/premium-vw-doc-test.js +1 -1
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-work-depth-test.js +2 -2
- package/workspace/program-charter-test.js +1 -12
- package/workspace/program-leave-test.js +2 -2
- package/workspace/program-order-test.js +3 -65
- package/workspace/project-onboard-flow-test.js +5 -5
- package/workspace/public/pm/bd-work.js +24 -5
- package/workspace/public/pm/cozy-home.css +0 -6
- package/workspace/public/pm/cozy-panels.js +2 -6
- package/workspace/public/pm/cozy-popup.css +1 -0
- package/workspace/public/pm/cozy-popup.js +15 -2
- package/workspace/public/pm/cozy-today-page.css +1 -1
- package/workspace/public/pm/cozy-today.css +0 -14
- package/workspace/public/pm/cozy-viewer.js +14 -38
- package/workspace/public/pm/goal-chat.js +2 -2
- package/workspace/public/pm/home-app.js +8 -67
- package/workspace/public/pm/home-chat.js +1 -1
- package/workspace/public/pm/home-ses-name.js +3 -2
- package/workspace/public/pm/home-today.js +4 -18
- package/workspace/public/premium-intelligence.html +1 -1
- package/workspace/public/premium-viewer.html +1 -1
- package/workspace/public/premium-workflows.html +1 -1
- package/workspace/ready-dash-ui-test.js +1 -1
- package/workspace/rename-test.js +2 -2
- package/workspace/server.js +11 -12
- package/workspace/session-names-test.js +34 -56
- package/workspace/sort-order-test.js +2 -71
- package/workspace/split-merge-ui-test.js +1 -1
- package/workspace/stage-card-tasks-test.js +1 -1
- package/workspace/stage-card-test.js +1 -1
- package/workspace/task-card-test.js +1 -1
- package/workspace/task-press-test.js +1 -1
- package/workspace/task-views-test.js +1 -1
- package/workspace/test-lists/adler-seasons-art.json +3 -6
- package/workspace/test-lists/batch18-asks.json +1 -1
- package/workspace/test-lists/briefing-premium.json +1 -11
- package/workspace/test-lists/premium-agreed-viewer.json +1 -1
- package/workspace/test-lists/who-raised-each-idea.json +5 -0
- package/workspace/test-run.js +0 -2
- package/workspace/test-timings.json +0 -4
- package/workspace/tk-tasks-test.js +3 -17
- package/workspace/viewer-trail-test.js +2 -2
- package/workspace/workflows-setup-test.js +4 -2
- package/workspace/adler-seasons-art-test.js +0 -116
- package/workspace/briefing-premium-initiative-test.js +0 -289
- package/workspace/briefing-premium-products-test.js +0 -209
- package/workspace/briefing-premium-sources-test.js +0 -250
- package/workspace/briefing-premium-test.js +0 -282
- package/workspace/home-other-product-test.js +0 -197
- package/workspace/home-pill-test.js +0 -138
- package/workspace/home-railcard-test.js +0 -196
- package/workspace/home-rows-test.js +0 -389
- package/workspace/panels-test.js +0 -454
- package/workspace/public/premium.html +0 -48
- package/workspace/test-lists/batch18-panels.json +0 -9
- package/workspace/test-lists/home-railcard.json +0 -9
- package/workspace/test-lists/home-sessions-pill.json +0 -6
- package/workspace/test-lists/viewer-home-rows.json +0 -9
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
/* briefing-premium-sources-test.js — mail, Jira and Confluence on the premium Briefing (initiative briefing-premium-sources; planning/prd/briefing-premium-sources-prd.md S1 to S11).
|
|
4
|
-
* The real server with one product repository and a made-up morning brief written to <state>/briefs/<today>.json. Nothing here touches the PM's real briefs.
|
|
5
|
-
* S1/S8 no brief for today: the header says so S2/S5 the rows, each tagged Across products (the brief names no included initiative)
|
|
6
|
-
* S3 the dialog opens an https link and records nothing S7 the digests in Today S9 the writes refuse a source key; the agent answers
|
|
7
|
-
* S11 the source row and the digest are drawn in the Agreed design's tokens at 1280 and 390 px, light and dark; no sideways scroll
|
|
8
|
-
* (re-pointed by premium-agreed-design: rows are Home's Needs-you rows; by premium-uncovered-features: the digests are in New for you and
|
|
9
|
-
* the read lines in Sources; by feedback batch 16 item 5: New for you opens from Your day's fold, and Sources is Settings › Connectors)
|
|
10
|
-
* Every wait polls the page; no fixed sleep stands in for a state. */
|
|
11
|
-
const fs = require('fs');
|
|
12
|
-
const os = require('os');
|
|
13
|
-
const path = require('path');
|
|
14
|
-
const { spawn, spawnSync } = require('child_process');
|
|
15
|
-
const { findBrowser } = require('./lib/find-browser');
|
|
16
|
-
const T = require('./test-run').configure({ name: 'briefing-premium-sources' });
|
|
17
|
-
|
|
18
|
-
const BASE = T.BASE;
|
|
19
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
20
|
-
/* premium-agreed-design: the Briefing's ranked list, its dialog, its Today timeline and its cards are gone. A source row is a Needs-you row on
|
|
21
|
-
* Home (its hint leads with the product, then the source and sender, then the prepared line) and opens in the Viewer.
|
|
22
|
-
* premium-uncovered-features: Around you is gone. Today's digests are in New for you, and the read lines and the background line are in
|
|
23
|
-
* Sources; both open from the place menu (cozy-nav.js). */
|
|
24
|
-
/* feedback batch 16 item 5: New for you is a fold of Your day (its digests row opens the whole list), and Sources is Settings › Connectors. */
|
|
25
|
-
const moreItem = async (pg, label, sel) => {
|
|
26
|
-
if (await pg.isVisible('#czViewer')) { await pg.keyboard.press('Escape'); }
|
|
27
|
-
if (label === 'Sources') {
|
|
28
|
-
if (await pg.isVisible('#czFab')) await pg.click('#czFab'); await pg.click('#czMenu [data-cz-settings]'); await pg.waitForSelector('#evSettings:not([hidden])');
|
|
29
|
-
if (!(await pg.$('#evSettings [data-ev-sec="connectors"][aria-current="page"]'))) await pg.click('#evSettings [data-ev-sec="connectors"]');
|
|
30
|
-
await pg.waitForSelector('#evSettings ' + sel, { timeout: 15000 });
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
await pg.click('#hmList [data-hm-day]'); await pg.waitForSelector('#czViewer [data-yd="news-all"]', { timeout: 15000 });
|
|
34
|
-
await pg.click('#czViewer [data-yd="news-all"] >> nth=-1');
|
|
35
|
-
await pg.waitForSelector('#czViewer ' + sel, { timeout: 15000 });
|
|
36
|
-
};
|
|
37
|
-
const srcRowsOf = (pg) => pg.$$eval('#hmList .hm-r[data-id^="n:src:"]', (els) => els.map((e) => ({ key: e.dataset.id.slice(2), title: e.querySelector('.hm-rt b').textContent, line2: (e.querySelector('.hm-rt em') || {}).textContent || (e.querySelector('.hm-rm') || { title: '' }).title || '' }))); // Home A + C (HvAC): a row is one line; the second line is the row's title (its tooltip)
|
|
38
|
-
const allNeeds = async (pg) => { for (let i = 0; i < 20; i++) { const t = await pg.textContent('#hmList [data-hm-allneeds]').catch(() => null); if (t === null || !/Show$/.test(t.trim())) return; await pg.click('#hmList [data-hm-allneeds]', { timeout: 2000 }).catch(() => {}); await sleep(150); } };
|
|
39
|
-
const until = async (fn, ms = 15000, step = 150) => { const t0 = Date.now(); for (;;) { let v = null; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
40
|
-
const results = [];
|
|
41
|
-
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 300) : ''}`); };
|
|
42
|
-
let srv = null; let browser = null;
|
|
43
|
-
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'pmos-bps-'));
|
|
44
|
-
const finish = async (code) => {
|
|
45
|
-
if (browser) await browser.close().catch(() => {});
|
|
46
|
-
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
47
|
-
T.killTmux();
|
|
48
|
-
try { fs.rmSync(tmp, { recursive: true, force: true }); } catch { /* left for the OS */ }
|
|
49
|
-
const bad = results.filter((x) => !x.cond).length;
|
|
50
|
-
console.log(`\n${results.length - bad}/${results.length} briefing-premium-sources assertions passed`);
|
|
51
|
-
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
52
|
-
};
|
|
53
|
-
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
54
|
-
|
|
55
|
-
const pad = (n) => String(n).padStart(2, '0');
|
|
56
|
-
const TODAY = (() => { const d = new Date(); return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`; })();
|
|
57
|
-
const item = (id, o = {}) => ({ id, title: 'Item ' + id, why_now: 'Why ' + id, evidence: '', source: 'mail', initiative_id: null, owner: 'pm', effort: 'minutes', confidence: 0.9, worth_asking: false, kind: 'you', ...o });
|
|
58
|
-
const BRIEF = {
|
|
59
|
-
date: TODAY, generated_at: new Date(Date.now() - 60000).toISOString(), sources: { mail: 'read', jira: 'read', confluence: 'read', slack: 'read' }, calendar: [],
|
|
60
|
-
priorities: [
|
|
61
|
-
item('aaaaaaaaaaa1', { title: 'Confirm the Thursday review', who: 'Anna Lee', verb: 'reply', todo: 'Confirm Thursday', link: 'https://mail.example/t/1', ask: 'Can you confirm?' }),
|
|
62
|
-
item('aaaaaaaaaaa2', { title: 'Sign off the vendor terms', source: 'confluence', who: 'Budi Santoso', verb: 'sign-off', link: 'https://wiki.example/p/2' }),
|
|
63
|
-
item('aaaaaaaaaaa3', { title: 'Look at the failing ticket', source: 'jira', who: 'Chen', verb: 'review', todo: 'Check the repro', link: 'https://jira.example/browse/AB-3' }),
|
|
64
|
-
],
|
|
65
|
-
worth_asking: [item('bbbbbbbbbbb1', { title: 'A thread that may be for you', who: 'Dewi', confidence: 0.3, worth_asking: true })],
|
|
66
|
-
digests: [{ source: 'slack', name: '#launch', link: 'https://slack.example/c/1', decisions: ['Ship on Friday'], open: ['Who owns QA'], goals: [] }],
|
|
67
|
-
places: [], resolved: [],
|
|
68
|
-
};
|
|
69
|
-
const sh = (cwd, args) => spawnSync('git', args, { cwd, encoding: 'utf8' });
|
|
70
|
-
|
|
71
|
-
(async () => {
|
|
72
|
-
const exe = findBrowser();
|
|
73
|
-
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the briefing-premium-sources suite cannot run'); return finish(1); }
|
|
74
|
-
let chromium;
|
|
75
|
-
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed — the briefing-premium-sources suite cannot run'); return finish(1); }
|
|
76
|
-
const fakeBin = path.join(tmp, 'bin'); fs.mkdirSync(fakeBin);
|
|
77
|
-
fs.writeFileSync(path.join(fakeBin, 'claude'), '#!/bin/sh\nsleep 30\n', { mode: 0o755 });
|
|
78
|
-
const root = path.join(tmp, 'idpf-repo');
|
|
79
|
-
fs.mkdirSync(root, { recursive: true }); fs.writeFileSync(path.join(root, 'AGENTS.md'), '# a\n');
|
|
80
|
-
sh(root, ['init', '-q', '-b', 'main']); sh(root, ['config', 'user.email', 't@t']); sh(root, ['config', 'user.name', 't']); sh(root, ['add', '-A']); sh(root, ['commit', '-q', '-m', 'initial']);
|
|
81
|
-
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PATH: fakeBin + path.delimiter + process.env.PATH }) });
|
|
82
|
-
await T.waitForServer(BASE);
|
|
83
|
-
const json = async (m, p, b, h) => { const res = await fetch(BASE + p, { method: m, headers: { 'content-type': 'application/json', ...(h || {}) }, body: b ? JSON.stringify(b) : undefined }); let j = null; try { j = await res.json(); } catch { j = null; } return { status: res.status, body: j }; };
|
|
84
|
-
const added = await json('POST', '/api/workspaces', { root, name: 'IDPF', focus: false }, await T.pressHeaders(BASE));
|
|
85
|
-
ok('S0 the product is registered', !!(added.body && added.body.workspace));
|
|
86
|
-
const model = async () => { const r = await json('GET', '/api/briefing-premium'); return r.status === 200 && r.body.model && !r.body.model.pending ? r.body : null; };
|
|
87
|
-
const m0 = await until(model, 90000);
|
|
88
|
-
ok('S1 with no brief for today there are no source rows and the header says so', m0 && !m0.model.list.rows.some((r) => r.kind === 'source') && /no morning brief for today/.test(m0.model.header.text), m0 && m0.model.header.text);
|
|
89
|
-
|
|
90
|
-
// the brief is written where the workspace reads it: <state>/briefs/<today>.json
|
|
91
|
-
fs.mkdirSync(path.join(T.STATE_DIR, 'briefs'), { recursive: true });
|
|
92
|
-
fs.writeFileSync(path.join(T.STATE_DIR, 'briefs', TODAY + '.json'), JSON.stringify(BRIEF));
|
|
93
|
-
const m1 = (await json('GET', '/api/briefing-premium')).body.model;
|
|
94
|
-
const srcRows = m1.list.rows.filter((r) => r.kind === 'source');
|
|
95
|
-
ok('S2 four rows come from the brief: three priorities and one worth asking, in the brief\'s order', srcRows.length === 4 && srcRows[0].title === 'Confirm the Thursday review' && srcRows[3].title === 'A thread that may be for you', JSON.stringify(srcRows.map((r) => r.title)));
|
|
96
|
-
ok('S5 every row reads Across products, because the brief names no initiative of an included product', srcRows.every((r) => r.product === 'Across products'));
|
|
97
|
-
ok('S8 the header no longer says there is no brief', !/no morning brief/.test(m1.header.text), m1.header.text);
|
|
98
|
-
|
|
99
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
100
|
-
{ /* this suite checks the records-only rows: the console's Needs you read (premium-brief.js), which replaces them when it answers, is off */
|
|
101
|
-
const nc = browser.newContext.bind(browser);
|
|
102
|
-
browser.newContext = async (...args) => { const c = await nc(...args); await c.route('**/api/brief-page*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'off in this suite' }) })); return c; };
|
|
103
|
-
}
|
|
104
|
-
const open = async ({ w = 1280, h = 900, theme = 'light' } = {}) => {
|
|
105
|
-
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
106
|
-
const page = await ctx.newPage(); const errors = [];
|
|
107
|
-
page.on('pageerror', (e) => errors.push(String(e.message || e)));
|
|
108
|
-
// the greeting is a morning card (the evening shows the day's recap instead): the page reads a fixed morning clock
|
|
109
|
-
const am = new Date(); am.setHours(10, 0, 0, 0); await page.clock.setFixedTime(am);
|
|
110
|
-
await page.goto(BASE + '/premium.html?theme=' + theme, { waitUntil: 'domcontentloaded' });
|
|
111
|
-
// the list is drawn: on a phone "Not in an initiative" starts folded (Home A + C, HvAC), so its folded line stands for its rows there
|
|
112
|
-
await page.waitForSelector(w > 760 ? '#hmList .hm-r[data-id^="n:src:"]' : '#hmList .hv-lh', { state: 'attached', timeout: 60000 });
|
|
113
|
-
return { ctx, page, errors };
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
{
|
|
117
|
-
const { ctx, page, errors } = await open();
|
|
118
|
-
await allNeeds(page);
|
|
119
|
-
const rows = await srcRowsOf(page);
|
|
120
|
-
ok('S2 the first row is its title, with the product, the source and sender · the verb and the prepared line as its detail', rows[0] && rows[0].title === 'Confirm the Thursday review' && rows[0].line2 === 'Across products · Mail · Anna Lee · Reply: Confirm Thursday', JSON.stringify(rows[0]));
|
|
121
|
-
ok('S2 a row with a verb and no prepared line shows the verb alone', rows[1] && /Confluence · Budi Santoso · Sign off$/.test(rows[1].line2), JSON.stringify(rows[1]));
|
|
122
|
-
// premium-uncovered-features (canvas HmMyWork): no Needs you group; the greeting counts the next steps that are yours, the source rows among them
|
|
123
|
-
// chief-of-staff delete list: no "N are yours" line; the source rows are still among the next steps
|
|
124
|
-
const allRows = await page.$$eval('#hmList .hm-r[data-id^="n:"]', (els) => els.length);
|
|
125
|
-
ok('S6 the four source rows are among the next steps of the list', rows.length === 4 && allRows >= 4, String(allRows));
|
|
126
|
-
await page.click(`#hmList [data-hm-sel="n:${rows[0].key}"]`);
|
|
127
|
-
await page.waitForSelector('#czViewer #srcLink');
|
|
128
|
-
const link = await page.$eval('#czViewer #srcLink', (a) => ({ href: a.href, target: a.target, rel: a.rel, h: Math.round(a.getBoundingClientRect().height) }));
|
|
129
|
-
ok('S3 the Viewer opens the item\'s https link in a new tab', link.href === 'https://mail.example/t/1' && link.target === '_blank' && /noopener/.test(link.rel), JSON.stringify(link));
|
|
130
|
-
ok('S2 the row\'s why now is in its Viewer card', /Why now:\s*Why aaaaaaaaaaa1/.test(await page.textContent('#czViewer')), await page.textContent('#czViewer'));
|
|
131
|
-
ok('S3 the card offers nothing that records or sends', (await page.$('#czViewer [data-hv-rec]')) === null && (await page.$('#czViewer [data-hv-later], #czViewer [data-hv-until]')) === null && (await page.$('#czViewer [data-hv-opt]')) === null);
|
|
132
|
-
ok('S11 the link is the shell\'s primary: at least 40 px high on a desk (44 on a phone or a touch screen, cozy-vw-shell.css)', link.h >= 40, String(link.h));
|
|
133
|
-
await page.keyboard.press('Escape');
|
|
134
|
-
await moreItem(page, 'New for you', '#aroundDig');
|
|
135
|
-
const dig = await page.$eval('#czViewer #aroundDig', (e) => ({ h: e.querySelector('.ev-lbl').textContent, t: e.textContent, href: (e.querySelector('a.srcLink') || {}).href || '' }));
|
|
136
|
-
ok('S7 New for you lists Digests with their count', dig.h === 'Digests 1', dig.h);
|
|
137
|
-
ok('S7 the digest holds its lines and its link', /Decision: Ship on Friday/.test(dig.t) && /Open: Who owns QA/.test(dig.t) && dig.href === 'https://slack.example/c/1', JSON.stringify(dig).slice(0, 300));
|
|
138
|
-
ok('no page error', errors.length === 0, errors.join(' | '));
|
|
139
|
-
await ctx.close();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
{ /* harness-health: the background line at the top of Settings › Connectors (was Sources), and the chip's dot takes its level */
|
|
143
|
-
const api = (await json('GET', '/api/sources')).body;
|
|
144
|
-
const h = api && api.health;
|
|
145
|
-
ok('H1 GET /api/sources carries the background health: a level, a line and the issues', h && ['ok', 'warn', 'bad'].includes(h.level) && typeof h.line === 'string' && h.line.length > 10 && Array.isArray(h.issues), JSON.stringify(h));
|
|
146
|
-
const shot = process.env.PMOS_SHOT_DIR || '';
|
|
147
|
-
for (const theme of ['light', 'dark']) {
|
|
148
|
-
const { ctx, page, errors } = await open({ theme, w: 1280, h: 844 }); // Connectors are in the computer's Settings: a phone's Settings is one screen (phone design, Ph2_more)
|
|
149
|
-
// premium-agreed-design (shared foundation): the design draws no Sources chip, so there is no dot on the page; the level is still read (GET /api/sources)
|
|
150
|
-
const dot = await page.evaluate(() => (document.querySelector('#srcDot, #srcChip') ? 'drawn' : 'none'));
|
|
151
|
-
await moreItem(page, 'Sources', '.ev-reads');
|
|
152
|
-
// batch 28 item 1 (canvas CnA): one list, trouble first. The background issues are rows of the list (trouble rows, the amber dot);
|
|
153
|
-
// all well is silence: no background line, no Today/Needs you footer, no count on the Connectors tab
|
|
154
|
-
let list = null;
|
|
155
|
-
for (let k = 0; k < 25 && !(list && list.w > 0); k++) {
|
|
156
|
-
if (k) await page.waitForTimeout(200);
|
|
157
|
-
list = await page.evaluate(() => { const r = document.querySelector('#evSettings .ev-reads'); const rows = [...document.querySelectorAll('#evSettings .ev-reads .ev-fr')];
|
|
158
|
-
return r ? { w: Math.round(r.getBoundingClientRect().width), sw: document.documentElement.scrollWidth, rows: rows.length, trouble: rows.filter((x) => x.classList.contains('ev-fr-t')).length,
|
|
159
|
-
firstQuiet: rows.findIndex((x) => !x.classList.contains('ev-fr-t')), lastTrouble: rows.map((x) => x.classList.contains('ev-fr-t')).lastIndexOf(true),
|
|
160
|
-
line: !!document.querySelector('#evSettings #srcHealth'), footer: !!document.querySelector('#evSettings [data-reads]'), count: !!document.querySelector('#evSettings [data-ev-sec="connectors"] .ev-k') } : null; });
|
|
161
|
-
}
|
|
162
|
-
if (theme === 'light') {
|
|
163
|
-
ok('H2 Settings › Connectors: background issues are trouble rows, before every quiet row; all well draws no background line', list && !list.line && (h.level === 'ok' ? true : list.trouble >= 1) && (list.lastTrouble < 0 || list.firstQuiet < 0 || list.lastTrouble < list.firstQuiet), JSON.stringify(list));
|
|
164
|
-
ok('H5 the Today/Needs you footer and the tab count are gone (CnA)', list && !list.footer && !list.count, JSON.stringify(list));
|
|
165
|
-
ok('H3 no Sources chip and no dot are drawn on the page (premium-agreed-design)', dot === 'none', dot);
|
|
166
|
-
if (shot) await page.screenshot({ path: path.join(shot, 'cards-reads-light.png'), fullPage: true });
|
|
167
|
-
} else ok('H4 in dark the list fits: no sideways scroll', list && list.sw <= 1280 && list.w > 0, JSON.stringify(list));
|
|
168
|
-
if (shot) { await sleep(1200); await page.screenshot({ path: path.join(shot, 'sources-health-' + theme + '.png') }); }
|
|
169
|
-
ok('H no page error (' + theme + ')', errors.length === 0, errors.join(' | '));
|
|
170
|
-
await ctx.close();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
{
|
|
175
|
-
const html = await (await fetch(BASE + '/')).text();
|
|
176
|
-
const nonce = (/<meta name="pmos-nonce" content="([^"]*)"/.exec(html) || [])[1] || '';
|
|
177
|
-
const press = { Origin: BASE, ...(nonce ? { 'x-pmos-nonce': nonce } : {}) };
|
|
178
|
-
const r1 = await json('POST', '/api/briefing-premium/put-off', { key: 'src:aaaaaaaaaaa1', until: 'later' }, press);
|
|
179
|
-
ok('S9 a source row cannot be put off', r1.status === 400, JSON.stringify(r1));
|
|
180
|
-
const r2 = await json('POST', '/api/briefing-premium/decide', { key: 'src:aaaaaaaaaaa1', choice: 'extend', why: 'No.' }, press);
|
|
181
|
-
ok('S9 a source row cannot be decided', r2.status >= 400, JSON.stringify(r2));
|
|
182
|
-
const r3 = await json('POST', '/api/briefing-premium/ask', { key: 'src:aaaaaaaaaaa1', text: 'Why is this on my list?' }, press);
|
|
183
|
-
ok('S9 a message about a source row starts a Claude Code session', r3.status === 200 && r3.body.ok && r3.body.started === true, JSON.stringify(r3));
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/* S11 fidelity: the source row and the digest are drawn in the Agreed design's own type and colours.
|
|
187
|
-
* Re-pointed for premium-agreed-design: the reference was the old mockup (prototype/premium-ux-concept/briefing-artifact.html: Space Grotesk,
|
|
188
|
-
* ember, a numbered rank). The Agreed design replaced that look on purpose, so each property is now pinned to the cozy token the design names
|
|
189
|
-
* (cozy.css, cozy-home.css), resolved in the page itself for the theme under test; the row and the digest still fill their column, and still
|
|
190
|
-
* nothing scrolls sideways. A source row that drifted off the design's tokens fails here as it failed against the mockup. */
|
|
191
|
-
{
|
|
192
|
-
// re-pointed again for the Agreed design's Home: the source row is a Needs-you row of Home's list, and the digest is a row of New for you.
|
|
193
|
-
// Re-pointed for Home A + C (HvAC, HvACDesk): a row is one line, its mark and its title; the subject moved to the row's tooltip and
|
|
194
|
-
// accessible name, and the title is the row title role, 15 px at 600 (feedback batch 26 item 6)
|
|
195
|
-
const ROWS = [['row', '.hm-rm'], ['number', '.hv-d'], ['title', '.hm-rt b']];
|
|
196
|
-
const DIGS = [['event', ''], ['eventTime', '.ev-tx .ev-mut'], ['eventTitle', '.ev-tx b']];
|
|
197
|
-
const SANS = 'var(--cz-sans)';
|
|
198
|
-
/* The design's values, as the tokens name them (a value that starts var( is resolved in the page; anything else is literal) */
|
|
199
|
-
const WANT = {
|
|
200
|
-
row: { fontFamily: SANS, color: 'var(--cz-ink)', backgroundColor: 'transparent' },
|
|
201
|
-
number: { backgroundColor: 'var(--cz-blue)', borderRadius: '50%', width: '8px', height: '8px' }, // the row's dot is blue: it waits on you (HvAC .d)
|
|
202
|
-
title: { fontFamily: SANS, fontSize: 'var(--fs-row)', fontWeight: 'var(--fw-strong)', color: 'var(--cz-ink)' }, // the row title role (batch 26 item 6), desktop and phone
|
|
203
|
-
event: { fontFamily: SANS, color: 'var(--cz-ink)', backgroundColor: 'transparent' }, // a row of New for you's table (cozy-ev.css)
|
|
204
|
-
eventTime: { fontSize: 'var(--fs-meta)', color: 'var(--cz-ink3)' },
|
|
205
|
-
eventTitle: { fontFamily: SANS, fontSize: 'var(--fs-row)', fontWeight: 'var(--fw-strong)', color: 'var(--cz-ink)' },
|
|
206
|
-
};
|
|
207
|
-
const grab = (pg, pairs, base, col) => pg.evaluate(([pairs, want, base, col]) => {
|
|
208
|
-
const o = {};
|
|
209
|
-
const probe = document.createElement('div'); document.body.appendChild(probe);
|
|
210
|
-
const resolve = (k, v) => { if (!/^var\(/.test(v) && v !== 'transparent') return v; probe.removeAttribute('style'); probe.style.position = 'absolute'; probe.style.visibility = 'hidden'; probe.style.setProperty(k.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase()), v); return getComputedStyle(probe)[k]; };
|
|
211
|
-
const root = document.querySelectorAll(base)[base.includes('n:src:') ? 1 : 0];
|
|
212
|
-
for (const [n, s] of pairs) {
|
|
213
|
-
const e = !root ? null : s ? root.querySelector(s) : root;
|
|
214
|
-
if (!e) { o[n] = null; continue; }
|
|
215
|
-
const cs = getComputedStyle(e), v = {};
|
|
216
|
-
for (const [k, w] of Object.entries(want[n])) v[k] = [resolve(k, w), cs[k]];
|
|
217
|
-
o[n] = v;
|
|
218
|
-
}
|
|
219
|
-
probe.remove();
|
|
220
|
-
const c = root && root.closest(col);
|
|
221
|
-
o.fit = [c ? Math.round(c.getBoundingClientRect().width) : null, root ? Math.round(root.getBoundingClientRect().width) : null];
|
|
222
|
-
return o;
|
|
223
|
-
}, [pairs, WANT, base, col]);
|
|
224
|
-
const diff = (c, pairs, slack) => {
|
|
225
|
-
const d = [];
|
|
226
|
-
for (const [n] of pairs) { if (!c[n]) { d.push(n + ' missing'); continue; } for (const [k, [want, got]] of Object.entries(c[n])) if (want !== got) d.push(`${n}.${k} ${want} | ${got}`); }
|
|
227
|
-
const [col, got] = c.fit; if (col == null || got == null || got < col - slack || got > col + 2) d.push(`width fills ${col} | ${got}`);
|
|
228
|
-
return d;
|
|
229
|
-
};
|
|
230
|
-
for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
|
|
231
|
-
const R = await open({ w, h, theme: th });
|
|
232
|
-
// on a phone the list is the page (canvas HmPhone)
|
|
233
|
-
await allNeeds(R.page);
|
|
234
|
-
// on a phone "Not in an initiative" starts folded (HvAC): open it to reach the source row
|
|
235
|
-
if (w === 390) { const lh = await R.page.$('#hmList .hv-lh[aria-expanded="false"]'); if (lh) await lh.click(); }
|
|
236
|
-
await sleep(500);
|
|
237
|
-
const rowSel = '#hmList .hm-r[data-id^="n:src:"]';
|
|
238
|
-
const diffs = diff(await grab(R.page, ROWS, rowSel, '.hm-pg'), ROWS, 4); // the row fills its group (the group's own inset aside)
|
|
239
|
-
if (w === 390) await R.page.keyboard.press('Escape');
|
|
240
|
-
await moreItem(R.page, 'New for you', '#aroundDig');
|
|
241
|
-
await sleep(300);
|
|
242
|
-
diffs.push(...diff(await grab(R.page, DIGS, '#czViewer #aroundDig .ev-trow', '#aroundDig'), DIGS, 2));
|
|
243
|
-
ok(`S11 the source row and the digest look like the Agreed design's at ${w} px, ${th}`, diffs.length === 0, diffs.join(' ; '));
|
|
244
|
-
const ov = await R.page.evaluate(() => document.documentElement.scrollWidth - innerWidth);
|
|
245
|
-
ok(`S11 no sideways scroll at ${w} px, ${th}`, ov <= 0, String(ov));
|
|
246
|
-
await R.ctx.close();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return finish();
|
|
250
|
-
})().catch((e) => { console.error(e); finish(1); });
|
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
/* briefing-premium-test.js — the premium Briefing, now Home in the Agreed design (initiative briefing-premium, planning/prd/briefing-premium-prd.md
|
|
4
|
-
* R1 to R13; re-pointed by premium-agreed-design: the Briefing, My work, Chat and the initiative page are one Home — a list, a chat and the
|
|
5
|
-
* Viewer — so the old hero, rail, dock, "N of M done" and row dialog are gone by design, and their checks move to what replaced them).
|
|
6
|
-
* Serves the real page from the real server and answers GET /api/briefing-premium with the model lib/briefing-premium.js builds from a
|
|
7
|
-
* fixture (fixtures/briefing-premium-facts.js), so the page is checked against known data.
|
|
8
|
-
* R1 Home is the default page; the console stays at /console.html and nothing on Home links to it; the place menu; Settings and Ctrl K
|
|
9
|
-
* R2 the list head: Today, New with its four choices, and the fold
|
|
10
|
-
* R4 the one list (premium-uncovered-features, canvas HmMyWork): no Needs you group and no Your list; each next step is a row of its
|
|
11
|
-
* group with its tile, title and hint, the greeting counts them; the first row opens its chat and its Viewer
|
|
12
|
-
* R8 on a phone the list is the page (canvas HmPhone) and its greeting counts the same next steps
|
|
13
|
-
* R9 a page that cannot read the repository says so
|
|
14
|
-
* R10 a page where nothing was pressed to record sends only GETs
|
|
15
|
-
* W1-W8 record a decision, put a row off, start an agent; the POST answers are mocked here, the refusals are the real server's
|
|
16
|
-
* R11 floors: 44 px targets on a phone, no sideways scroll at 390 px in both themes, Escape closes the Viewer
|
|
17
|
-
* R12 fidelity to the Agreed design at 1440 and 390 px, light and dark: cozy tokens, the 316 px list, the selected row's lift
|
|
18
|
-
* H4 the program panel's links into Home (initiative program-hierarchy): ?item=pt:<program>:<key> and ?ask=program:<id>
|
|
19
|
-
* Every wait polls the page. */
|
|
20
|
-
const fs = require('fs');
|
|
21
|
-
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
22
|
-
const path = require('path');
|
|
23
|
-
const { spawn } = require('child_process');
|
|
24
|
-
const { findBrowser } = require('./lib/find-browser');
|
|
25
|
-
const T = require('./test-run').configure({ name: 'briefing-premium' });
|
|
26
|
-
const B = require('./lib/briefing-premium.js');
|
|
27
|
-
const F = require('./fixtures/briefing-premium-facts.js');
|
|
28
|
-
|
|
29
|
-
const BASE = T.BASE;
|
|
30
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
31
|
-
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
32
|
-
const results = [];
|
|
33
|
-
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 600) : ''}`); };
|
|
34
|
-
let srv = null; let browser = null;
|
|
35
|
-
const finish = async (code) => {
|
|
36
|
-
if (browser) await browser.close().catch(() => {});
|
|
37
|
-
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
38
|
-
T.killTmux();
|
|
39
|
-
const bad = results.filter((x) => !x.cond).length;
|
|
40
|
-
console.log(`\n${results.length - bad}/${results.length} briefing-premium assertions passed`);
|
|
41
|
-
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
42
|
-
};
|
|
43
|
-
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
44
|
-
const MODEL = B.build(F.facts());
|
|
45
|
-
const NEEDS = '#hmList .hm-r[data-id^="n:"]'; // the next steps: rows of the one list, in their product or under Not in an initiative
|
|
46
|
-
const vw = () => { const v = document.querySelector('#czViewer:not([hidden])'); return v ? { kind: (v.querySelector('.cz-vw-kind') || {}).textContent || '', title: (v.querySelector('#czVwTitle') || {}).textContent || '', text: v.textContent } : null; };
|
|
47
|
-
|
|
48
|
-
(async () => {
|
|
49
|
-
const exe = findBrowser();
|
|
50
|
-
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the briefing-premium suite cannot run'); return finish(1); }
|
|
51
|
-
let chromium;
|
|
52
|
-
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed — the briefing-premium suite cannot run'); return finish(1); }
|
|
53
|
-
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
54
|
-
await T.waitForServer(BASE);
|
|
55
|
-
browser = classicBoard(await chromium.launch({ executablePath: exe }));
|
|
56
|
-
|
|
57
|
-
const open = async ({ w = 1440, h = 900, theme = 'light', model = MODEL, fail = false, mock = true, touch = false, programs = null, qs = '' } = {}) => {
|
|
58
|
-
const ctx = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: theme, hasTouch: touch });
|
|
59
|
-
const page = await ctx.newPage();
|
|
60
|
-
const errors = [], reqs = [], posts = [];
|
|
61
|
-
page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
|
|
62
|
-
page.on('request', (r) => { if (!r.url().startsWith(BASE)) return; const u = new URL(r.url()); reqs.push(r.method() + ' ' + u.pathname); if (r.method() === 'POST') posts.push({ path: u.pathname, body: (() => { try { return JSON.parse(r.postData() || 'null'); } catch { return null; } })(), headers: r.headers() }); });
|
|
63
|
-
const json = (body, status = 200) => (r) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(body) });
|
|
64
|
-
await page.route(/\/api\/briefing-premium(\?.*)?$/, fail ? json({ ok: false, error: 'the repository could not be read' }, 500) : json({ ok: true, state: 'ready', model, as_of: Date.now() }));
|
|
65
|
-
if (fail) await page.route(/\/api\/board-premium(\?.*)?$/, json({ ok: false, error: 'the repository could not be read' }, 500));
|
|
66
|
-
if (programs) await page.route('**/api/programs', json({ ok: true, programs }));
|
|
67
|
-
await page.route('**/api/briefing-premium/thread**', json({ ok: true, turns: [], working: false }));
|
|
68
|
-
if (mock) for (const act of ['decide', 'put-off', 'return', 'start']) await page.route('**/api/briefing-premium/' + act + '*', json({ ok: true, session: 's-new' }));
|
|
69
|
-
if (mock) await page.route('**/api/agent/start*', json({ ok: true, session: 's-new', id: 's-new' })); // Start opens a real agent session: answered here
|
|
70
|
-
// Home's card depends on the hour (the evening shows the day's recap, not the greeting): the page reads a fixed morning clock, so
|
|
71
|
-
// the suite gives the same answer at any time of day
|
|
72
|
-
const am = new Date(); am.setHours(10, 0, 0, 0); await page.clock.setFixedTime(am);
|
|
73
|
-
await page.goto(BASE + '/premium.html?theme=' + theme + qs);
|
|
74
|
-
const up = await until(() => page.evaluate((sel) => document.querySelectorAll(sel).length > 0 || /could not read/.test((document.querySelector('#hmList') || {}).textContent || ''), NEEDS), 20000);
|
|
75
|
-
return { ctx, page, errors, reqs, posts, up };
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
/* R1 */
|
|
79
|
-
const A = await open();
|
|
80
|
-
ok('0 the page draws the list', !!A.up);
|
|
81
|
-
if (!A.up) return finish(1);
|
|
82
|
-
const p = A.page;
|
|
83
|
-
{ const def = await fetch(BASE + '/').then((r) => r.text());
|
|
84
|
-
ok('R1 the premium Home is the default page', /class="cz cz-home( pm-ds)?"/.test(def) && !/id="c3-root"/.test(def));
|
|
85
|
-
const gone = await Promise.all(['/console.html', '/classic.html'].map((u) => fetch(BASE + u, { redirect: 'manual' })));
|
|
86
|
-
ok('R1 /console.html and /classic.html go to Home: the console and the classic page are deleted', gone.every((r) => r.status === 302 && /\/premium\.html$/.test(r.headers.get('location') || '')), gone.map((r) => r.status).join());
|
|
87
|
-
const old = await fetch(BASE + '/c3.html', { redirect: 'manual' }); ok('R1 /c3.html with no query goes to Home', old.status === 302 && /\/premium\.html$/.test(old.headers.get('location') || ''));
|
|
88
|
-
const rail = await p.evaluate(() => ({ gone: !document.querySelector('nav.rail, .rail [data-go], #dlg'), places: [...document.querySelectorAll('#czMenu a')].map((a) => (a.querySelector('span, b') || a).textContent.trim() + '>' + a.getAttribute('href')), cur: (document.querySelector('#czMenu [aria-current="page"]') || {}).textContent || '' }));
|
|
89
|
-
ok('R1 no old rail and no old dialog; the places are Today, Work and Goals (slice 1) and Today is current', rail.gone && /^Today>\/today\.html,Work>\/premium-board\.html,Goals>\/premium-goals\.html(,(Events|Library|Routine)>\/premium-[a-z]+\.html)*$/.test(rail.places.join()) && /Today/.test(rail.cur), JSON.stringify(rail));
|
|
90
|
-
ok('R1 nothing on Home links to the console', await p.evaluate(() => !document.querySelector('a[href*="console"], a[href*="c3.html"], [data-href*="console"]')));
|
|
91
|
-
// premium-uncovered-features (EvSettings): Settings is its own dialog, opened from the place menu
|
|
92
|
-
if (await p.isVisible('#czFab')) await p.click('#czFab'); await p.click('[data-cz-settings]');
|
|
93
|
-
const st = await until(() => p.evaluate(() => { const d = document.querySelector('#evSettings:not([hidden])'); return d ? d.getAttribute('aria-label') + ' ' + ((d.querySelector('h2') || {}).textContent || '') : null; }));
|
|
94
|
-
ok('R1 Settings opens its dialog', !!st && /Settings/.test(st), String(st));
|
|
95
|
-
await p.keyboard.press('Escape');
|
|
96
|
-
ok('R11 Escape closes Settings', !!(await until(() => p.evaluate(() => !document.querySelector('#evSettings:not([hidden])')))));
|
|
97
|
-
await p.route('**/api/sessions', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ sessions: [{ id: 's1', name: 'Fix the footer', state: 'idle', shown: 'quiet' }] }) }));
|
|
98
|
-
await p.keyboard.press('Control+k');
|
|
99
|
-
// premium-uncovered-features (EvSearch): Search is the palette over the page
|
|
100
|
-
ok('SB2 Ctrl K opens Search with the box focused', !!(await until(() => p.evaluate(() => !!document.querySelector('#evSearch:not([hidden]) #evQ') && document.activeElement && document.activeElement.id === 'evQ'))), await p.evaluate(() => JSON.stringify({ sp: !!document.querySelector('#evSearch:not([hidden])'), act: document.activeElement && (document.activeElement.id || document.activeElement.tagName) })));
|
|
101
|
-
await p.keyboard.type('fix');
|
|
102
|
-
ok('SB4 typing finds the session by its name', !!(await until(() => p.evaluate(() => [...document.querySelectorAll('#evRes .ev-mi')].some((b) => /Fix the footer/.test(b.textContent))))));
|
|
103
|
-
await p.keyboard.press('Escape'); await until(() => p.evaluate(() => !document.querySelector('#evSearch:not([hidden])')));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* R2 */
|
|
107
|
-
{ await p.click('[data-hm-new]');
|
|
108
|
-
const nw = await until(() => p.evaluate(() => { const m = document.querySelector('#hmMenu:not([hidden])'); return m ? [...m.querySelectorAll('[role=menuitem], button')].map((b) => b.textContent.trim()).filter(Boolean) : null; }));
|
|
109
|
-
ok('R2 the list head is the greeting (Home A + C, HvAC), and New offers its four kinds, one word each (batch 14 item 10, canvas PmAHome)', await p.evaluate(() => /^Good (morning|afternoon|evening)$/.test(document.querySelector('#hmList .hm-hd [data-hm-day] b').textContent)) && !!nw && nw.length === 4 && /^Task/.test(nw[0]) && /^Chat/.test(nw[1]) && /^Recording/.test(nw[2]) && /^Initiative/.test(nw[3]), JSON.stringify(nw));
|
|
110
|
-
ok('R2 New is headed New and has no sub lines (no "What is it for?")', await p.evaluate(() => { const m = document.querySelector('#hmMenu:not([hidden])'); return !!m && m.querySelector('.hm-ml').textContent === 'New' && !m.querySelector('em'); }));
|
|
111
|
-
await p.keyboard.press('Escape');
|
|
112
|
-
// batch 18 item 15 (TbT1Split) put one icon-only fold back on the list head, after New: it folds the list to the rail
|
|
113
|
-
ok('R2 the list head has one icon-only fold, last, named for a screen reader', await p.evaluate(() => { const f = document.querySelectorAll('#hmList .hm-hd [data-hm-fold]'); return f.length === 1 && !f[0].textContent.trim() && f[0].getAttribute('aria-label') === 'Fold the list to the rail' && !f[0].nextElementSibling; })); }
|
|
114
|
-
|
|
115
|
-
/* R4 */
|
|
116
|
-
{ const L = await p.evaluate((sel) => ({ rows: [...document.querySelectorAll(sel)].map((r) => ({ id: r.dataset.id, t: r.querySelector('.hm-rt b').textContent, h: (r.querySelector('.hm-rm') || {}).title || '', mark: !!r.querySelector('.hv-mk .hv-d, .hv-mk .hv-ck, .hv-mk svg') })), more: (document.querySelector('[data-hm-allneeds]') || {}).textContent || '', sel: (document.querySelector('.hm-r.sel') || {}).dataset ? document.querySelector('.hm-r.sel').dataset.id : null }), NEEDS);
|
|
117
|
-
const G = await p.evaluate(() => ({ groups: [...document.querySelectorAll('#hmList [aria-label]')].map((g) => g.getAttribute('aria-label')), greet: (document.querySelector('#hmList .hv-sub') || {}).textContent || '' }));
|
|
118
|
-
ok('R4 Home has no Needs you group and no Your list; every next step of the model is a row of the one list', !G.groups.includes('Needs you') && !G.groups.includes('Your list') && MODEL.list.rows.every((m) => L.rows.some((r) => r.id === 'n:' + m.key)), JSON.stringify({ G, n: L.rows.length, want: MODEL.list.rows.length }));
|
|
119
|
-
ok('R4 every row is one line: its mark (a dot or a check box) and its title (HvAC)', L.rows.every((r) => r.mark && r.t.length > 3), JSON.stringify(L.rows));
|
|
120
|
-
ok('R4 no "N are yours" line: the count is Your move\'s (chief-of-staff delete list)', !/(\d+) (?:is|are) yours/.test(G.greet), G.greet);
|
|
121
|
-
ok('R4 on a desktop the first next step is selected when Home opens', !!L.sel && L.rows.some((r) => r.id === L.sel), JSON.stringify(L));
|
|
122
|
-
const r0 = L.rows.find((r) => r.id === 'n:waited:reviews') || L.rows[0];
|
|
123
|
-
await p.click(`.hm-r[data-id="${r0.id}"] .hm-rm`); // Settings and Search took the Viewer above; selecting the row again opens its own
|
|
124
|
-
const v0 = await until(() => p.evaluate(vw));
|
|
125
|
-
// the Viewer names the thing the ask is about (batch 18 item 2-A: "5 failed reviews", the initiative's name), not the row's verb
|
|
126
|
-
ok('R4 the selected row opens its Viewer beside its chat', !!v0 && !!v0.title && await p.evaluate((id) => (window.czViewer.current() || {}).id === 'need:' + id.slice(2) && !!document.querySelector('#hmLog'), r0.id), JSON.stringify(v0));
|
|
127
|
-
const selBg = await p.evaluate(() => getComputedStyle(document.querySelector('.hm-r.sel')).backgroundColor);
|
|
128
|
-
ok('R12 the selected row is tinted (HvACDesk .sel)', selBg && !/rgba\(0, 0, 0, 0\)|transparent/.test(selBg), selBg);
|
|
129
|
-
const hd = await p.evaluate(() => { const h = document.querySelector('#hmCh'); return h && !h.hidden ? { t: (h.querySelector('.hm-chb') || {}).textContent || '', mark: !!h.querySelector('.hv-mk .hv-d, .hv-mk .hv-ck'), y: Math.round(h.getBoundingClientRect().top), size: getComputedStyle(h.querySelector('.hm-chb')).fontSize } : null; });
|
|
130
|
-
ok('R12 the chat\'s header line names the open row: its mark and its title, 15 px (the row title role, batch 26 item 6), at the top of the chat card (HvACDesk .ch)', !!hd && hd.t === r0.t && hd.mark && hd.y === 32 && hd.size === '15px', JSON.stringify(hd)); }
|
|
131
|
-
|
|
132
|
-
/* R10 */
|
|
133
|
-
ok('R10 a page where nothing was pressed to record sends no POST', A.posts.filter((x) => /briefing-premium\/(decide|put-off|return|start)/.test(x.path)).length === 0, JSON.stringify(A.posts.map((x) => x.path)));
|
|
134
|
-
|
|
135
|
-
/* W1-W7: record a decision (batch 18 item 2-A, OvA2Decide): the choices, the why and Record are in the Viewer; the chat's pills open it */
|
|
136
|
-
{ const key = 'decision:KC5';
|
|
137
|
-
await p.click(`.hm-r[data-id="n:${key}"] .hm-rm`);
|
|
138
|
-
const v = await until(() => p.evaluate(() => { const x = document.querySelector('#czViewer:not([hidden]) .nv-dec'); return x && x.querySelector('[data-nv-opt]') ? [...x.querySelectorAll('[data-nv-opt]')].map((b) => b.dataset.nvOpt) : null; }));
|
|
139
|
-
ok('W1 the decision opens in the Viewer with its three choices, none picked (no pick is on record)', JSON.stringify(v) === JSON.stringify(['reshape', 'extend', 'retire']) && await p.evaluate(() => !document.querySelector('#czViewer [data-nv-opt][aria-checked="true"]')), JSON.stringify(v));
|
|
140
|
-
ok('W1 with no pick on record the one primary is Weigh it for me, and nothing says to record on a card in the chat', await p.evaluate(() => { const v = document.querySelector('#czViewer'); return (v.querySelector('.czs-pri') || {}).textContent === 'Weigh it for me' && !/card in the chat/.test(v.textContent); }));
|
|
141
|
-
ok('W1 the chat beside it asks a question and its pills are the choices', await p.evaluate(() => /\?/.test(document.querySelector('#hmLog').textContent) && [...document.querySelectorAll('#hmLog button')].some((b) => /Extend the date/.test(b.textContent)) && !document.querySelector('#hmLog .ut-dec')));
|
|
142
|
-
const btn = () => p.evaluate(() => { const b = document.querySelector('#czViewer [data-nv-rec]'); return { dis: b.disabled, t: b.textContent }; });
|
|
143
|
-
const pick = (k) => p.click(`#czViewer [data-nv-opt="${k}"]`);
|
|
144
|
-
ok('W1 before a choice the record button is off', (await btn()).dis);
|
|
145
|
-
await pick('extend');
|
|
146
|
-
const b1 = await btn();
|
|
147
|
-
ok('W1 with a choice and no reason it is still off, and it names the choice', b1.dis && /Record: extend the date/.test(b1.t), JSON.stringify(b1));
|
|
148
|
-
await p.fill('#nvWhy', 'ok');
|
|
149
|
-
ok('W1 a reason under three characters keeps it off', (await btn()).dis);
|
|
150
|
-
await p.fill('#nvWhy', 'The partner needs two more weeks');
|
|
151
|
-
ok('W1 a choice and a reason turn it on', !(await btn()).dis);
|
|
152
|
-
await p.click('#czViewer [data-nv-rec]');
|
|
153
|
-
const post = await until(() => A.posts.find((x) => x.path === '/api/briefing-premium/decide'));
|
|
154
|
-
ok('W6 the press posts the key, the choice and the reason, and no writer field', !!post && post.body.key === key && post.body.choice === 'extend' && post.body.why === 'The partner needs two more weeks' && !('by' in post.body), JSON.stringify(post && post.body));
|
|
155
|
-
ok('W7 a recorded press says where it was recorded', !!(await until(() => p.evaluate(() => /pm-decisions\.md/.test(document.querySelector('#toast').textContent)))));
|
|
156
|
-
/* W3 put off: the clock press in the Viewer's header */
|
|
157
|
-
const k2 = 'decision:premium-ux';
|
|
158
|
-
await p.click(`.hm-r[data-id="n:${k2}"] .hm-rm`);
|
|
159
|
-
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw-p="later"]')));
|
|
160
|
-
ok('W3 Put off is one icon in the Viewer\'s header beside Pin (aria-pressed), and its menu stays shut until pressed', await p.evaluate(() => { const m = document.querySelector('#hmMenu'), pin = document.querySelector('#czViewer [data-cz-vw-p="pin"]'); return (!m || m.hidden) && !!pin && pin.getAttribute('aria-pressed') === 'false' && document.querySelector('#czViewer [data-cz-vw-p="later"]').getAttribute('aria-label') === 'Put off'; }));
|
|
161
|
-
await p.click('#czViewer [data-cz-vw-p="later"]');
|
|
162
|
-
ok('W3 its menu has three live choices', await p.evaluate(() => [...document.querySelectorAll('#hmMenu:not([hidden]) [data-hm-mi] b')].map((b) => b.textContent).join() === 'Later today,Tomorrow,Next week'));
|
|
163
|
-
await p.locator('#hmMenu [data-hm-mi]').filter({ hasText: 'Tomorrow' }).first().click();
|
|
164
|
-
ok('W3 "Tomorrow" posts the key and the time', !!(await until(() => A.posts.find((x) => x.path === '/api/briefing-premium/put-off' && x.body.key === k2 && x.body.until === 'tomorrow'))));
|
|
165
|
-
/* the row's × puts it off until tomorrow */
|
|
166
|
-
const k3 = 'blocked:onboarding-scan';
|
|
167
|
-
await p.click(`.hm-r[data-id="n:${k3}"] .hm-rm`).catch(() => {}); // Home A + C: the × shows on the open row only
|
|
168
|
-
await p.click(`.hm-r[data-id="n:${k3}"] [data-hm-end]`).catch(() => {});
|
|
169
|
-
ok('W3 the row\'s × puts it off until tomorrow', !!(await until(() => A.posts.find((x) => x.path === '/api/briefing-premium/put-off' && x.body.key === k3))));
|
|
170
|
-
/* W8 start (OvA1Start, OvA1After) */
|
|
171
|
-
const k4 = 'blocked:console-3-boards';
|
|
172
|
-
await p.click(`.hm-r[data-id="n:${k4}"] .hm-rm`);
|
|
173
|
-
await until(() => p.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-czs-act="start"]')));
|
|
174
|
-
const s0 = await p.evaluate(() => { const v = document.querySelector('#czViewer'); return { line: (v.querySelector('.czs-line') || {}).textContent || '', offer: (v.querySelector('.nv-offer') || {}).textContent || '', cost: (v.querySelector('.nv-cost') || {}).textContent || '', pri: (v.querySelector('.czs-pri') || {}).textContent || '', own: (v.querySelector('.nv-own') || {}).textContent || '' }; });
|
|
175
|
-
ok('W8 a blocked row says what is missing, offers ✦ what PMOS drafts (batch 25 item 6: a concrete proposal), says what waiting costs, and holds ONE verb', s0.line === 'Blocked: the spec is missing' && /^I can draft the PRD/.test(s0.offer) && /^If it waits: /.test(s0.cost) && s0.pri === 'Draft the PRD' && /Yours to unblock · New feature/.test(s0.own), JSON.stringify(s0));
|
|
176
|
-
await p.click('[data-czs-act="start"]');
|
|
177
|
-
const sp = await until(() => { const l = A.posts.filter((x) => x.path === '/api/agent/start'); return l.length ? l : null; });
|
|
178
|
-
ok('W8 Start posts one agent start for that row', !!sp && sp.length === 1, JSON.stringify(A.posts.map((x) => [x.path, x.body])));
|
|
179
|
-
const s1 = await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); const l = v && v.querySelector('.czs-line'); return l && /^Drafting the PRD/.test(l.textContent) ? { stop: !!v.querySelector('[data-czs-act="stop"][aria-label="Stop the agent"]'), chat: !!v.querySelector('[data-czs-act="talk"]'), pri: !!v.querySelector('.czs-pri') } : null; }));
|
|
180
|
-
ok('W8 after Start the same card says what the agent does now, with Stop and its chat and no other verb (OvA1After)', !!s1 && s1.stop && s1.chat && !s1.pri, JSON.stringify(s1));
|
|
181
|
-
const mint = await T.nonce(BASE);
|
|
182
|
-
const writes = A.posts.filter((x) => /briefing-premium\/(decide|put-off)|\/api\/agent\/start/.test(x.path));
|
|
183
|
-
ok('W5 every press carried the launch nonce the server minted', !!mint && writes.length >= 4 && writes.every((x) => x.headers['x-pmos-nonce'] === mint), String(mint).slice(0, 4) + ' ' + writes.length);
|
|
184
|
-
ok('0 no page error on the write flow', A.errors.length === 0, A.errors.join(' | '));
|
|
185
|
-
}
|
|
186
|
-
await A.ctx.close();
|
|
187
|
-
|
|
188
|
-
/* W6: a refused press keeps the Viewer and the typed reason */
|
|
189
|
-
{ const R = await open({ mock: false });
|
|
190
|
-
await R.page.route('**/api/briefing-premium/decide*', (r) => r.fulfill({ status: 409, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'This decision is already on record.' }) }));
|
|
191
|
-
await R.page.click('.hm-r[data-id="n:decision:KC5"] .hm-rm');
|
|
192
|
-
await until(() => R.page.evaluate(() => !!document.querySelector('#czViewer [data-nv-opt]')));
|
|
193
|
-
await R.page.click('#czViewer [data-nv-opt="retire"]'); await R.page.fill('#nvWhy', 'No longer worth the date'); await R.page.click('#czViewer [data-nv-rec]');
|
|
194
|
-
ok('W6 a refused press shows the server reason, keeps the Viewer and keeps the typed reason', !!(await until(() => R.page.evaluate(() => /already on record/.test((document.querySelector('#nvMsg') || {}).textContent || '') && document.querySelector('#nvWhy').value === 'No longer worth the date'))));
|
|
195
|
-
await R.ctx.close(); }
|
|
196
|
-
|
|
197
|
-
{
|
|
198
|
-
// the real server refuses what it must, with requests that cannot write
|
|
199
|
-
// The browser steps above can leave fetch's pooled socket idle past the server's 5 s keep-alive, so the first
|
|
200
|
-
// GET / can meet a reset socket and T.nonce() answers ''. One plain GET first opens a fresh socket.
|
|
201
|
-
await fetch(BASE + '/').then((r) => r.text()).catch(() => '');
|
|
202
|
-
const hdr = await T.pressHeaders(BASE);
|
|
203
|
-
const send = (h, body, route = 'decide') => fetch(BASE + '/api/briefing-premium/' + route, { method: 'POST', headers: h, body: JSON.stringify(body) }).then(async (r) => ({ s: r.status, j: await r.json().catch(() => ({})) }));
|
|
204
|
-
const good = { key: 'decision:nope', choice: 'kill', why: 'test only' };
|
|
205
|
-
const noN = await send({ 'Content-Type': 'application/json', Origin: BASE }, good);
|
|
206
|
-
const nonce = await T.nonce(BASE);
|
|
207
|
-
ok('W5 a press without the launch nonce is refused', !nonce || noN.s === 403, JSON.stringify(noN));
|
|
208
|
-
const ag = await send({ ...hdr, 'x-pmos-session': 'sess-1' }, good);
|
|
209
|
-
ok('W5 D98: an agent session is not refused as an agent: its press is checked like the PM\'s (an unknown prototype is 404)', ag.s === 404, JSON.stringify(ag));
|
|
210
|
-
const wf = await send(hdr, { ...good, by: 'pm' });
|
|
211
|
-
ok('W5 a body with a writer field is refused with 400', wf.s === 400, JSON.stringify(wf));
|
|
212
|
-
const before = fs.readFileSync(path.join(__dirname, '..', 'pm-decisions.md'), 'utf8');
|
|
213
|
-
const bad = await send(hdr, { key: 'decision:../../x', choice: 'kill', why: 'test only' });
|
|
214
|
-
const none = await send(hdr, { key: 'decision:proto-does-not-exist', choice: 'kill', why: 'test only' });
|
|
215
|
-
const after = fs.readFileSync(path.join(__dirname, '..', 'pm-decisions.md'), 'utf8');
|
|
216
|
-
ok('W6 a bad key and an unknown prototype are refused and pm-decisions.md is unchanged', bad.s === 400 && none.s === 404 && before === after, JSON.stringify([bad, none]));
|
|
217
|
-
const askBad = await send(hdr, { key: '../x', text: 'q' }, 'ask');
|
|
218
|
-
const askAgent = await send({ ...hdr, 'x-pmos-session': 'sess-1' }, { key: '../x', text: 'q' }, 'ask');
|
|
219
|
-
const askNoNonce = await send({ 'Content-Type': 'application/json', Origin: BASE }, { key: 'decision:KC5', text: 'q' }, 'ask');
|
|
220
|
-
const askWriter = await send(hdr, { key: 'decision:KC5', text: 'q', by: 'pm' }, 'ask');
|
|
221
|
-
ok('A7 the ask route refuses a missing nonce (403), a writer field (400) and a bad key (400), for an agent session too (D98: checked, not refused as an agent), and starts nothing', askAgent.s === 400 && (!nonce || askNoNonce.s === 403) && askWriter.s === 400 && askBad.s === 400, JSON.stringify([askAgent, askNoNonce, askWriter, askBad]));
|
|
222
|
-
const thr = await fetch(BASE + '/api/briefing-premium/thread?key=../x').then((r) => r.status);
|
|
223
|
-
const thrGet = await fetch(BASE + '/api/briefing-premium/ask').then((r) => r.status);
|
|
224
|
-
ok('A7 the thread route refuses a bad key and the ask route refuses GET', thr === 400 && thrGet === 405, JSON.stringify([thr, thrGet]));
|
|
225
|
-
const get = await fetch(BASE + '/api/briefing-premium/decide').then((r) => r.status);
|
|
226
|
-
ok('W5 a GET on a recording route is refused', get === 405, String(get));
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
/* R9 */
|
|
231
|
-
{ const E = await open({ fail: true });
|
|
232
|
-
ok('R9 a page that cannot read the repository says so', !!(await until(() => E.page.evaluate(() => /Home could not read the repository/.test(document.querySelector('#hmList').textContent)))));
|
|
233
|
-
await E.ctx.close(); }
|
|
234
|
-
|
|
235
|
-
/* R8, R11, R12 on a phone, both themes */
|
|
236
|
-
for (const theme of ['light', 'dark']) {
|
|
237
|
-
const P = await open({ w: 390, h: 844, theme, touch: true });
|
|
238
|
-
// Home A + C (HvAC, XvAPhDay): the list folds "Not in an initiative" on a phone; every next step is in Your day, which "Good morning" opens
|
|
239
|
-
await until(() => P.page.evaluate(() => { const l = document.querySelector('#hmList'); return l && getComputedStyle(l).display !== 'none' && !!document.querySelector('#hmList .hv-sub'); }));
|
|
240
|
-
const top = await P.page.evaluate(() => (document.querySelector('#hmList .hv-sub') || {}).textContent || '');
|
|
241
|
-
// Your day is an item in the Viewer, full screen on a phone (XvAPhDay): the same rows, split since batch 15 item 3 (design E) into the
|
|
242
|
-
// calls of Your move, Drafted for you and Can wait
|
|
243
|
-
await P.page.click('#hmList [data-hm-day]');
|
|
244
|
-
const rows = await until(() => P.page.evaluate(() => document.querySelectorAll('#czViewer:not([hidden]) .yd [data-id^="n:"]').length));
|
|
245
|
-
await P.page.evaluate(() => window.czViewer.close());
|
|
246
|
-
ok(`R8 (${theme}) on a phone the list is the page, Your day lists every next step, and no "N are yours" line`, rows >= MODEL.list.rows.length && !/(\d+) (?:is|are) yours/.test(top) && await P.page.evaluate(() => document.body.classList.contains('hm-plist')), JSON.stringify({ top, rows }));
|
|
247
|
-
const small = await P.page.evaluate(() => [...document.querySelectorAll('#hmTop button, #hmList .hm-rm, #hmFoot button, #hmFoot label')].filter((b) => b.offsetParent !== null).map((b) => b.getBoundingClientRect()).filter((r) => r.height && r.height < 43.5).length);
|
|
248
|
-
ok(`R11 (${theme}) every control on the phone's top bar, sheet and composer is 44 px`, small === 0, String(small));
|
|
249
|
-
const ov = await P.page.evaluate(() => document.documentElement.scrollWidth - innerWidth);
|
|
250
|
-
ok(`R11 no sideways scroll at 390 px (${theme})`, ov <= 0, String(ov));
|
|
251
|
-
const fs16 = await P.page.evaluate(() => [...document.querySelectorAll('textarea, input:not([type=file])')].filter((e) => e.offsetParent !== null && parseFloat(getComputedStyle(e).fontSize) < 16).length);
|
|
252
|
-
ok(`R11 on a touch phone every text field is at least 16 px, so focus does not zoom the page (${theme})`, fs16 === 0, String(fs16));
|
|
253
|
-
ok(`0 no page error at 390 (${theme})`, P.errors.length === 0, P.errors.join(' | '));
|
|
254
|
-
await P.ctx.close();
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/* H4 the program panel's links into Home: ?item=pt:<program>:<key> selects that program task; ?ask=program:<id> opens the chat with the program as its scope */
|
|
258
|
-
{ const PR = require('./fixtures/program-ascent.js').programs();
|
|
259
|
-
const T1 = await open({ programs: PR, qs: '&item=pt:project-ascent:pt-vendor-form' });
|
|
260
|
-
const s1 = await until(() => T1.page.evaluate(() => { const h = document.querySelector('#hmCh'); return h && !h.hidden && /Sign the CIAM/.test(h.textContent) ? { rows: document.querySelectorAll('#hmList [data-id^="pt:"]').length, head: h.textContent, chip: ((document.querySelector('#hmFoot [data-hm-scope]') || {}).textContent || '') } : null; }));
|
|
261
|
-
// Home lists no tasks (feedback batch 4, item 4): the program's tasks are on its panel; the link still opens that task's chat
|
|
262
|
-
ok('H4 ?item=pt:<program>:<key> opens that program task\'s chat, the program\'s, and Home lists no task row', !!s1 && s1.rows === 0 && /Sign the CIAM vendor order form/.test(s1.head) && /Project Ascent/.test(s1.head) && /In: Project Ascent/.test(s1.chip), JSON.stringify(s1));
|
|
263
|
-
await T1.ctx.close();
|
|
264
|
-
const T2 = await open({ programs: PR, qs: '&ask=program:project-ascent&label=Project%20Ascent' });
|
|
265
|
-
const s2 = await until(() => T2.page.evaluate(() => { const c = document.querySelector('#hmFoot [data-hm-scope]'); return c && /Project Ascent/.test(c.textContent) ? { chip: c.textContent, head: (document.querySelector('#hmCh .hm-chb') || {}).textContent || '', sel: !!document.querySelector('.hm-r.sel') } : null; }));
|
|
266
|
-
ok('H4 ?ask=program:<id> opens the chat with the program as its scope, and selects no row', !!s2 && s2.head === 'Project Ascent' && !s2.sel, JSON.stringify(s2));
|
|
267
|
-
ok('0 no page error on the program links', T1.errors.length === 0 && T2.errors.length === 0, T1.errors.concat(T2.errors).join(' | '));
|
|
268
|
-
await T2.ctx.close();
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/* R12 fidelity at 1440, light and dark */
|
|
272
|
-
for (const theme of ['light', 'dark']) {
|
|
273
|
-
const D = await open({ theme });
|
|
274
|
-
const f = await D.page.evaluate(() => {
|
|
275
|
-
const desk = document.querySelector('#hmDesk'), list = document.querySelector('#hmList'), cs = getComputedStyle(document.querySelector('#hmChat')), r = list.getBoundingClientRect();
|
|
276
|
-
return { inset: Math.round(r.left), radius: cs.borderTopLeftRadius, list: Math.round(list.getBoundingClientRect().width), font: getComputedStyle(document.body).fontFamily, theme: document.documentElement.dataset.theme || '', bg: getComputedStyle(document.body).backgroundColor, rail: !!document.querySelector('nav.rail'), menu: !!document.querySelector('#czMenu, .cz-nav') };
|
|
277
|
-
});
|
|
278
|
-
ok(`R12 Home follows the Home A + C design at 1440 px (HvACDesk), ${theme}: the list after the rail of places (slice 1: the desk at 12 + 72 + 12 px, the list 16 px inside it) and 360 px wide, the chat a card with a 24 px radius, Plus Jakarta Sans, the place menu, no old rail`, f.inset === 112 && f.radius === '24px' && f.list === 360 && /Plus Jakarta Sans/.test(f.font) && f.menu && !f.rail, JSON.stringify(f));
|
|
279
|
-
await D.ctx.close();
|
|
280
|
-
}
|
|
281
|
-
return finish();
|
|
282
|
-
})();
|