create-pmos 0.397.0 → 0.399.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 +25 -25
- package/payload/KIT-VERSION +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +105 -52
- package/workspace/briefing-premium-board-test.js +284 -128
- package/workspace/briefing-premium-calendar-2-test.js +135 -198
- package/workspace/briefing-premium-calendar-3-test.js +143 -418
- package/workspace/briefing-premium-calendar-test.js +85 -196
- package/workspace/briefing-premium-doc-edit-test.js +99 -83
- package/workspace/briefing-premium-initiative-test.js +175 -290
- package/workspace/briefing-premium-insights-test.js +414 -219
- package/workspace/briefing-premium-metrics-test.js +55 -97
- package/workspace/briefing-premium-products-test.js +44 -28
- package/workspace/briefing-premium-sources-test.js +70 -49
- package/workspace/briefing-premium-test.js +155 -648
- package/workspace/briefing-premium-work-test.js +88 -283
- package/workspace/changelog.json +24 -0
- package/workspace/ev-everywhere-test.js +210 -0
- package/workspace/fixtures/board-premium-trail.js +32 -0
- package/workspace/fixtures/premium-viewer-fixtures.js +187 -0
- package/workspace/guide/briefing-premium.md +3 -1
- package/workspace/guide/home.md +68 -0
- package/workspace/guide/index.md +1 -0
- package/workspace/lib/agent-roles.js +71 -0
- package/workspace/lib/board-grill.js +63 -0
- package/workspace/lib/board-premium.js +121 -24
- package/workspace/lib/board-trail.js +223 -0
- package/workspace/lib/home-work-item.js +58 -0
- package/workspace/lib/initiative-layout.js +77 -0
- package/workspace/lib/insights-goals.js +196 -0
- package/workspace/lib/insights-premium.js +64 -15
- package/workspace/lib/insights-records.js +115 -0
- package/workspace/lib/jira-tickets.js +1 -1
- package/workspace/lib/meeting-points.js +52 -0
- package/workspace/lib/news-for-you.js +88 -0
- package/workspace/lib/notes-series.js +29 -6
- package/workspace/lib/report-confirm.js +48 -0
- package/workspace/lib/route-modules.js +12 -0
- package/workspace/lib/routes-board-docs.js +46 -0
- package/workspace/lib/routes-board-grill.js +90 -0
- package/workspace/lib/routes-board-trail.js +33 -0
- package/workspace/lib/routes-home-desk.js +176 -0
- package/workspace/lib/routes-home-review.js +108 -0
- package/workspace/lib/routes-initiative-layout.js +57 -0
- package/workspace/lib/routes-insights-premium.js +16 -4
- package/workspace/lib/routes-insights-records.js +133 -0
- package/workspace/lib/routes-meeting-points.js +37 -0
- package/workspace/lib/routes-news.js +57 -0
- package/workspace/lib/routes-notes.js +3 -1
- package/workspace/lib/routes-report-confirm.js +31 -0
- package/workspace/lib/routes-search.js +38 -0
- package/workspace/lib/routes-viewer.js +108 -0
- package/workspace/lib/search-index.js +176 -0
- package/workspace/lib/transcript-steps.js +123 -0
- package/workspace/lib/viewer-meeting.js +205 -0
- package/workspace/lib/viewer-report.js +89 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +128 -82
- package/workspace/premium-briefing-depth-test.js +104 -90
- package/workspace/premium-chat-attach-test.js +54 -63
- package/workspace/premium-chat-chart-tab-test.js +37 -37
- package/workspace/premium-chat-context-test.js +19 -18
- package/workspace/premium-chat-goal-view-test.js +23 -23
- package/workspace/premium-chat-notes-test.js +26 -31
- package/workspace/premium-chat-report-tab-test.js +46 -28
- package/workspace/premium-chat-term-test.js +16 -16
- package/workspace/premium-chat-viewer-test.js +60 -59
- package/workspace/premium-core-doc-issue-test.js +52 -43
- package/workspace/premium-html-viewer-test.js +14 -17
- package/workspace/premium-phone-card-test.js +10 -3
- package/workspace/premium-phone-room-test.js +41 -35
- package/workspace/premium-report-read-test.js +152 -197
- package/workspace/premium-viewer-download-test.js +19 -22
- package/workspace/premium-viewer-flicker-test.js +11 -16
- package/workspace/premium-viewer-share-test.js +6 -9
- package/workspace/premium-viewer-test.js +41 -60
- package/workspace/premium-vw-backlog-test.js +53 -33
- package/workspace/premium-vw-cal-test.js +97 -128
- package/workspace/premium-vw-copy-test.js +17 -33
- package/workspace/premium-vw-doc-test.js +17 -10
- package/workspace/premium-vw-item-test.js +50 -49
- package/workspace/premium-vw-jira-test.js +53 -27
- package/workspace/premium-vw-meet-test.js +115 -187
- package/workspace/premium-vw-notes-test.js +88 -109
- package/workspace/premium-vw-rec-test.js +71 -194
- package/workspace/premium-vw-slides-test.js +46 -50
- package/workspace/premium-welcome-test.js +3 -2
- package/workspace/premium-work-depth-test.js +61 -53
- package/workspace/public/pm/bd-acts.js +383 -0
- package/workspace/public/pm/bd-asks.js +261 -0
- package/workspace/public/pm/bd-pop.js +59 -0
- package/workspace/public/pm/bd-span.js +222 -82
- package/workspace/public/pm/bd-stages.js +25 -11
- package/workspace/public/pm/bd-views.js +169 -0
- package/workspace/public/pm/c3-doc-sheet.js +1 -1
- package/workspace/public/pm/c3-md.js +3 -395
- package/workspace/public/pm/c3-phone-detail.js +1 -1
- package/workspace/public/pm/c3-phone-model.js +3 -68
- package/workspace/public/pm/chat-term.js +3 -3
- package/workspace/public/pm/cozy-board.css +798 -230
- package/workspace/public/pm/cozy-ev.css +228 -0
- package/workspace/public/pm/cozy-evmodel.js +106 -0
- package/workspace/public/pm/cozy-evui.js +47 -0
- package/workspace/public/pm/cozy-home.css +570 -142
- package/workspace/public/pm/cozy-home.js +5 -3
- package/workspace/public/pm/cozy-insights.css +437 -170
- package/workspace/public/pm/cozy-md.js +396 -0
- package/workspace/public/pm/cozy-nav.js +104 -29
- package/workspace/public/pm/cozy-news.js +140 -0
- package/workspace/public/pm/cozy-placeholder.js +26 -0
- package/workspace/public/pm/cozy-search.js +203 -0
- package/workspace/public/pm/cozy-settings.js +198 -0
- package/workspace/public/pm/cozy-sources.js +89 -0
- package/workspace/public/pm/cozy-today.css +217 -0
- package/workspace/public/pm/cozy-viewer.css +3 -3
- package/workspace/public/pm/cozy-viewer.js +145 -0
- package/workspace/public/pm/cozy-vw-mtg.css +350 -0
- package/workspace/public/pm/cozy-vw-rp.css +152 -0
- package/workspace/public/pm/cozy-vw.css +485 -0
- package/workspace/public/pm/cozy.css +83 -1
- package/workspace/public/pm/home-adddoc.js +48 -0
- package/workspace/public/pm/home-app.js +1179 -0
- package/workspace/public/pm/home-around.js +413 -0
- package/workspace/public/pm/home-chat.js +512 -0
- package/workspace/public/pm/home-data.js +312 -0
- package/workspace/public/pm/home-dictate.js +54 -0
- package/workspace/public/pm/home-draft.js +68 -0
- package/workspace/public/pm/home-ini-model.js +190 -0
- package/workspace/public/pm/home-ini.css +171 -0
- package/workspace/public/pm/home-ini.js +456 -0
- package/workspace/public/pm/home-list.js +276 -0
- package/workspace/public/pm/home-more.js +132 -0
- package/workspace/public/pm/home-phone-card.js +109 -0
- package/workspace/public/pm/home-review.js +104 -0
- package/workspace/public/pm/home-task.js +67 -0
- package/workspace/public/pm/home-today.js +144 -0
- package/workspace/public/pm/home-work.js +547 -0
- package/workspace/public/pm/phone-moment.js +69 -0
- package/workspace/public/pm/pm-work-view.js +1 -1
- package/workspace/public/pm/premium-attach.js +4 -0
- package/workspace/public/pm/premium-board.js +548 -395
- package/workspace/public/pm/premium-chart-tab.js +109 -62
- package/workspace/public/pm/premium-deck.js +3 -3
- package/workspace/public/pm/premium-first.js +23 -21
- package/workspace/public/pm/premium-insights.js +1102 -581
- package/workspace/public/pm/premium-meeting.js +61 -549
- package/workspace/public/pm/premium-mtg-present.js +138 -0
- package/workspace/public/pm/premium-mtg-replay.js +142 -0
- package/workspace/public/pm/premium-notes.js +1 -1
- package/workspace/public/pm/premium-report-frame.css +20 -0
- package/workspace/public/pm/premium-report-read.js +669 -476
- package/workspace/public/pm/premium-report-tab.js +116 -67
- package/workspace/public/pm/premium-shell.js +76 -123
- package/workspace/public/pm/premium-viewer.js +22 -1
- package/workspace/public/pm/premium-vw-cal.js +277 -48
- package/workspace/public/pm/premium-vw-doc.css +6 -0
- package/workspace/public/pm/premium-vw-doc.js +40 -2
- package/workspace/public/pm/premium-vw-file.js +2 -2
- package/workspace/public/pm/premium-vw-meet.js +6 -83
- package/workspace/public/pm/premium-vw-mtg.js +958 -0
- package/workspace/public/pm/premium-vw-notes.js +116 -68
- package/workspace/public/pm/premium-vw-open.js +35 -0
- package/workspace/public/pm/premium-vw-page.js +16 -0
- package/workspace/public/pm/premium-vw-rec.js +11 -218
- package/workspace/public/pm/premium-vw-slides.css +5 -0
- package/workspace/public/pm/premium-vw-slides.js +44 -8
- package/workspace/public/pm/rp-parts.js +269 -0
- package/workspace/public/pm/term-view.js +22 -0
- package/workspace/public/premium-board.html +29 -70
- package/workspace/public/premium-initiative.html +8 -48
- package/workspace/public/premium-insights.html +26 -64
- package/workspace/public/premium-viewer.html +20 -0
- package/workspace/public/premium.html +18 -107
- package/workspace/r/m1.png +0 -0
- package/workspace/r/m2.png +0 -0
- package/workspace/r/m3.png +0 -0
- package/workspace/r/nl.png +0 -0
- package/workspace/server.js +18 -3
- package/workspace/test-files.json +1 -0
- package/workspace/test-lists/home-libs.json +9 -0
- package/workspace/test-lists/initiative-layout.json +9 -0
- package/workspace/test-lists/premium-report-read.json +1 -1
- package/workspace/test-lists/premium-uncovered-meetings.json +9 -0
- package/workspace/test-lists/premium-uncovered-reports.json +9 -0
- package/workspace/test-lists/premium-vw-agreed.json +9 -0
- package/workspace/test-lists/premium-vw-notes.json +1 -1
- package/workspace/test-lists/uf-everywhere.json +15 -0
- package/workspace/test-lists/uf-home.json +9 -0
- package/workspace/test-lists/uncovered-board.json +9 -0
- package/workspace/public/pm/premium-work.js +0 -729
- package/workspace/public/pm/premium.js +0 -1146
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
|
-
/* briefing-premium-calendar-2-test.js — Add and Remove material and Make task in the
|
|
4
|
-
* planning/prd/briefing-premium-calendar-2-prd.md M1 to M7
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
/* briefing-premium-calendar-2-test.js — Add and Remove material and Make task in the meeting card (initiative briefing-premium-calendar, slice 2;
|
|
4
|
+
* planning/prd/briefing-premium-calendar-2-prd.md M1 to M7; re-pointed for premium-agreed-design, area viewer: the meeting opens in the Viewer card,
|
|
5
|
+
* /premium-viewer.html, not in the old Briefing dialog). Serves the real page from the real server; the calendar, the notes, the material and the
|
|
6
|
+
* plan items are answered by stand-ins (fixtures/premium-viewer-fixtures.js), so each press can be read off the request the page sent.
|
|
7
|
+
* The Add material sheet has no design in the Agreed mockup: it is the plain version, marked "Waiting for design".
|
|
8
|
+
* M1 add material · M2 remove · M3 what each press records · M4 make task · M5 honest states · M6 only the named writes · M7 floors
|
|
7
9
|
* Every wait polls the page; no fixed sleep stands in for a state. */
|
|
8
|
-
const fs = require('fs');
|
|
9
10
|
const path = require('path');
|
|
10
11
|
const { spawn } = require('child_process');
|
|
11
12
|
const { findBrowser } = require('./lib/find-browser');
|
|
12
|
-
const CT = require('./lib/premium-console-type'); // the mockup is read with the console's type (PM, 2026-10-19), as premium.css is
|
|
13
|
-
const CT_VENDOR = 'file://' + path.join(__dirname, 'public', 'vendor') + '/';
|
|
14
13
|
const T = require('./test-run').configure({ name: 'briefing-premium-calendar-2' });
|
|
15
|
-
const
|
|
16
|
-
const F = require('./fixtures/briefing-premium-facts.js');
|
|
14
|
+
const F = require('./fixtures/premium-viewer-fixtures.js');
|
|
17
15
|
|
|
18
|
-
const BASE = T.BASE;
|
|
19
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
20
|
-
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
16
|
+
const BASE = T.BASE, until = F.until;
|
|
21
17
|
const results = [];
|
|
22
|
-
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
|
|
18
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 500) : ''}`); };
|
|
23
19
|
let srv = null; let browser = null;
|
|
24
20
|
const finish = async (code) => {
|
|
25
21
|
if (browser) await browser.close().catch(() => {});
|
|
@@ -31,33 +27,7 @@ const finish = async (code) => {
|
|
|
31
27
|
};
|
|
32
28
|
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
33
29
|
|
|
34
|
-
const
|
|
35
|
-
const dayKey = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
36
|
-
const iso = (d) => { const off = -d.getTimezoneOffset(), a = Math.abs(off); return `${dayKey(d)}T${pad(d.getHours())}:${pad(d.getMinutes())}:00${off >= 0 ? '+' : '-'}${pad(Math.floor(a / 60))}:${pad(a % 60)}`; };
|
|
37
|
-
const NOW = new Date();
|
|
38
|
-
const at = (h, m, plus = 0) => { const d = new Date(NOW.getFullYear(), NOW.getMonth(), NOW.getDate() + plus, h, m, 0, 0); return d; };
|
|
39
|
-
const monday = () => { const d = new Date(NOW.getFullYear(), NOW.getMonth(), NOW.getDate()); d.setDate(d.getDate() - ((d.getDay() + 6) % 7)); return d; };
|
|
40
|
-
const weekAnswer = () => {
|
|
41
|
-
const m = monday(), cells = [];
|
|
42
|
-
for (let i = 0; i < 7; i++) { const d = new Date(m.getFullYear(), m.getMonth(), m.getDate() + i); cells.push({ key: dayKey(d), start: dayKey(d), end: dayKey(d), events: [] }); }
|
|
43
|
-
const put = (d, e) => cells.find((c) => c.key === dayKey(d)).events.push(e);
|
|
44
|
-
put(at(9, 30), { id: 'ev-checkout', at: iso(at(9, 30)), end: iso(at(10, 15)), title: 'Checkout sync', attendees: ['Priya', 'Dara'] });
|
|
45
|
-
put(at(14, 0), { id: 'ev-sprint', at: iso(at(14, 0)), end: iso(at(15, 0)), title: 'Sprint planning', attendees: ['Dara', 'Priya', 'Sam'], series: 'sprint-planning' });
|
|
46
|
-
const other = at(9, 30, NOW.getDay() === 0 ? -1 : 1); // a day other than today, still in the week unless it runs off the end
|
|
47
|
-
if (cells.some((c) => c.key === dayKey(other))) put(other, { id: 'ev-standup', at: iso(other), end: iso(new Date(other.getTime() + 30 * 60000)), title: 'Standup', attendees: [] });
|
|
48
|
-
return { ok: true, view: 'week', range: { start: cells[0].key, end: cells[6].key }, cells, events_source: 'calendar-memory', today: dayKey(NOW),
|
|
49
|
-
context: { 'ev-sprint': { phase: 'upcoming', level: { kind: 'board', ws: 'w1', id: 'idpf', name: 'IDPF', why: 'you linked it to the board', by: 'pm' } } },
|
|
50
|
-
link_boards: [{ ws: 'w1', id: 'idpf', name: 'IDPF' }, { ws: 'w1', id: 'pay', name: 'Payments' }], gantt: [{ id: 'premium-ux', title: 'Premium UX' }] };
|
|
51
|
-
};
|
|
52
|
-
const REPLAY0 = { ok: true, note: { id: 'n1', title: 'Sprint planning notes' }, meeting: { title: 'Sprint planning', attendees: ['Dara', 'Priya', 'Sam'] }, audio: { url: '/x', ms: 1500000 }, length_ms: 1500000, lines: [{}],
|
|
53
|
-
keys: [{ k: 'decision', text: 'Plan the sprint with eight people', state: 'draft' }, { k: 'action', text: 'Sam confirms the data fix owner', owner: 'Sam', due: 'Tue', state: 'owner' }, { k: 'question', text: 'Does a release eat the capacity?', state: 'open' }] };
|
|
54
|
-
const MATERIAL = { ok: true, key: 'k', items: [{ id: 'm1', kind: 'doc', ref: 'r', title: 'Capacity sheet', scope: 'series' }, { id: 'm2', kind: 'link', url: 'https://x.example', title: 'Roadmap', scope: 'meeting' }] };
|
|
55
|
-
const MOCKUP = fs.readFileSync(path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'briefing-artifact.html'), 'utf8');
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const REPLAY = Object.assign({}, REPLAY0, { note: { id: 'n1', title: 'Sprint planning notes', ws: 'w1', initiative: { id: 'premium-ux', title: 'Premium UX', ws: 'w1' } } });
|
|
59
|
-
const REPLAY_NOINI = Object.assign({}, REPLAY0, { note: { id: 'n1', title: 'Sprint planning notes' } });
|
|
60
|
-
const SUGGEST = { ok: true, suggested: [{ kind: 'pmos-doc', ref: 'planning/prd/premium-ux-prd.md', title: 'Premium UX PRD', meta: 'document', ws: 'w1' }], found: [{ kind: 'report', ref: 'planning/reports/q3.md', title: 'Q3 report', meta: 'report', ws: 'w1' }] };
|
|
30
|
+
const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
|
|
61
31
|
|
|
62
32
|
(async () => {
|
|
63
33
|
const exe = findBrowser();
|
|
@@ -67,172 +37,139 @@ const SUGGEST = { ok: true, suggested: [{ kind: 'pmos-doc', ref: 'planning/prd/p
|
|
|
67
37
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
68
38
|
await T.waitForServer(BASE);
|
|
69
39
|
browser = await chromium.launch({ executablePath: exe });
|
|
40
|
+
const W = F.world();
|
|
41
|
+
const tap = (p, sel) => p.$eval('#czViewer ' + sel, (b) => b.click());
|
|
42
|
+
const text = (p) => p.evaluate(() => (document.querySelector('#czViewer') || {}).innerText || '');
|
|
43
|
+
const posted = (S, pth) => S.posts.filter((x) => x.path === pth);
|
|
44
|
+
const ALL = [];
|
|
70
45
|
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
await page.
|
|
95
|
-
|
|
96
|
-
if (writeStatus !== 200) return json(r, { ok: false, error: 'a page press is required' }, writeStatus);
|
|
97
|
-
if (b.op === 'add') S.items.push(Object.assign({ id: 'n' + S.items.length, from: 'you', scope: b.scope }, b.item));
|
|
98
|
-
else S.items = S.items.filter((i) => (i.ref || i.url) !== (b.item.ref || b.item.url));
|
|
99
|
-
return json(r, { ok: true, items: S.items });
|
|
100
|
-
});
|
|
101
|
-
await page.route('**/api/plan-items*', (r) => {
|
|
102
|
-
const req = r.request();
|
|
103
|
-
if (req.method() === 'POST') { const b = JSON.parse(req.postData() || '{}'); S.planPosts.push(b); return planStatus === 200 ? json(r, { ok: true, written: [{ item: 'item-9' }] }) : json(r, { ok: false, error: 'a page press is required' }, planStatus); }
|
|
104
|
-
return json(r, { ok: true, stages });
|
|
105
|
-
});
|
|
106
|
-
await page.route('**/api/calendar-links', (r) => json(r, { ok: true }));
|
|
107
|
-
await page.goto(BASE + '/premium.html?theme=' + theme);
|
|
108
|
-
S.up = await until(() => page.evaluate(() => document.querySelectorAll('#rank .rr').length > 0 && document.querySelectorAll('#tl .ev').length > 0), 20000);
|
|
109
|
-
await until(() => page.evaluate(() => document.querySelectorAll('#wkStrip [data-day]').length === 5)); // the card's day strip: today is picked, so the row is a Today row
|
|
110
|
-
await page.evaluate(() => { const r = [...document.querySelectorAll('#tl .ev')].find((e) => e.querySelector('b').textContent === 'Sprint planning'); r.id = 'rowSprint'; r.click(); });
|
|
111
|
-
S.dlg = await until(() => page.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !!document.querySelector('#mmAdd') && /Roadmap|No material/.test(document.querySelector('#oMain').textContent)));
|
|
112
|
-
// the detail shows Notes first and open when the meeting has notes: material is in Prep and material, Make task in Notes and next steps
|
|
113
|
-
if (S.dlg && stage) { await page.evaluate((k) => { const d = document.querySelector(`#oMain .vm-body[data-part="${k}"]`); if (d && !d.open) d.querySelector('summary').click(); }, stage); S.dlg = await until(() => page.evaluate((k) => document.querySelector(`#oMain .vm-body[data-part="${k}"]`).open, stage)); }
|
|
114
|
-
return Object.assign(S, { ctx, page });
|
|
46
|
+
/* the material of "Rail review": what is linked is kept per test, so Remove and Undo can be read back from the list */
|
|
47
|
+
const material = (X, o = {}) => {
|
|
48
|
+
X.mat = [{ kind: 'pmos-doc', title: 'Rail PRD', ref: 'planning/prd/rail.md', from: 'you', scope: 'series' }, { kind: 'link', title: 'Figma: report panel', url: 'https://x.example/f', topic: 'The report panel', scope: 'meeting' }];
|
|
49
|
+
X.sugg = [];
|
|
50
|
+
return Promise.all([
|
|
51
|
+
X.page.route('**/api/meeting-focus?*', async (r) => { const res = await r.fetch().catch(() => null); let b = {}; try { b = res ? await res.json() : {}; } catch { b = {}; } return json(r, { ...b, ok: true, material: X.mat }); }),
|
|
52
|
+
X.page.route('**/api/meeting-material/suggest*', (r) => { const qq = new URL(r.request().url()).searchParams.get('q') || ''; X.sugg.push(qq); return json(r, { ok: true, suggested: [{ kind: 'pmos-doc', title: 'Rail brief', ref: 'planning/briefs/rail.md', meta: 'Brief · Oct 20' }], found: qq.length >= 2 ? [{ kind: 'report', title: 'Partner review', ref: 'reports/partner-review/2026-10-12.md', meta: 'Report · Oct 12' }] : [] }); }),
|
|
53
|
+
X.page.route('**/api/meeting-material?*', (r) => json(r, { ok: true, key: 'k', items: X.mat, topics: o.noTopics ? [] : [{ id: 't1', text: 'Rail placement' }, { id: 't2', text: 'Phone layout' }] })),
|
|
54
|
+
X.page.route('**/api/meeting-material', (r) => {
|
|
55
|
+
const b = JSON.parse(r.request().postData() || '{}'); X.S.posts.push({ path: '/api/meeting-material', body: b });
|
|
56
|
+
if (X.refuse) return json(r, { ok: false, error: X.refuse }, 409);
|
|
57
|
+
const same = (m) => (b.item.url ? m.url === b.item.url : m.ref === b.item.ref) && (m.scope || 'meeting') === b.scope;
|
|
58
|
+
if (b.op === 'remove') X.mat = X.mat.filter((m) => !same(m));
|
|
59
|
+
else X.mat = X.mat.concat([{ ...b.item, scope: b.scope, from: 'you', ...(b.topic ? { topic: b.topic } : {}) }]);
|
|
60
|
+
return json(r, { ok: true, items: X.mat });
|
|
61
|
+
}),
|
|
62
|
+
]);
|
|
63
|
+
};
|
|
64
|
+
const openRail = async (o = {}) => {
|
|
65
|
+
const X = await F.open(browser, BASE, '/premium-viewer.html?open=calendar', { scene: 'prep', noLive: true, ...o });
|
|
66
|
+
ALL.push(X);
|
|
67
|
+
await material(X, o);
|
|
68
|
+
await X.page.goto(BASE + '/premium-viewer.html?open=meeting&event=ev-rail&date=' + F.dayKey(W.RAIL));
|
|
69
|
+
X.up = await until(() => X.page.evaluate(() => !!document.querySelector('#czViewer [data-a="addmat"]')), 15000);
|
|
70
|
+
return X;
|
|
115
71
|
};
|
|
116
|
-
const text = (p) => p.evaluate(() => document.querySelector('#oMain').textContent);
|
|
117
72
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (!A.up || !A.dlg) return finish(1);
|
|
73
|
+
/* M1 add material */
|
|
74
|
+
const A = await openRail();
|
|
121
75
|
const p = A.page;
|
|
76
|
+
ok('M1 a calendar meeting opens in the Viewer card with + Add material in Prep', A.up, (await text(p)).slice(0, 300) + ' ERR ' + A.errors.join('|'));
|
|
77
|
+
if (!A.up) return finish(1);
|
|
78
|
+
ok('M2 the material is listed with the scope it was linked at', await until(async () => /Rail PRD/.test(await text(p)) && /every meeting of the series/.test(await text(p)) && /For The report panel/.test(await text(p))), (await text(p)).slice(0, 600));
|
|
79
|
+
await tap(p, '[data-a="addmat"]');
|
|
80
|
+
// premium-uncovered-features (meetings, MtMaterial): Add material is a popover under the list; each linked row keeps its own Remove
|
|
81
|
+
ok('M1 Add material opens its popover with Find in PMOS and Paste a link, under the linked rows and their Remove', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vzm-pop[aria-label="Add material"]') && !!document.querySelector('#czViewer [data-a="matq"]') && !!document.querySelector('#czViewer [data-a="matlink"]') && document.querySelectorAll('#czViewer [data-a="matrm"]').length === 2 && !document.querySelector('#czViewer [data-cz-placeholder]'))));
|
|
82
|
+
ok('M1 the sheet says the invite is not changed', /The invite in your calendar is not changed/.test(await text(p)));
|
|
83
|
+
ok('M1 Suggested asks for the level of this meeting and shows what it returned', await until(async () => A.sugg.includes('') && /Rail brief/.test(await text(p))), JSON.stringify(A.sugg));
|
|
84
|
+
await p.fill('#czViewer [data-a="matq"]', 'p');
|
|
85
|
+
await p.waitForTimeout(400); // the search waits 220 ms after typing stops; a one-letter search must not ask
|
|
86
|
+
ok('M1 a one-letter search asks for nothing', !A.sugg.includes('p'), JSON.stringify(A.sugg));
|
|
87
|
+
await p.fill('#czViewer [data-a="matq"]', 'partner');
|
|
88
|
+
ok('M1 Find in PMOS shows what the search returned', await until(async () => A.sugg.includes('partner') && /Partner review/.test(await text(p))), JSON.stringify(A.sugg));
|
|
89
|
+
await p.fill('#czViewer [data-a="matlink"]', 'http://x.example/plain');
|
|
90
|
+
await p.press('#czViewer [data-a="matlink"]', 'Enter');
|
|
91
|
+
ok('M1 an address that is not https says so and is not added', await until(async () => /Only an https link can be added/.test(await text(p))) && posted(A.S, '/api/meeting-material').length === 0);
|
|
92
|
+
ok('M3 the sheet offers a topic of the meeting', await until(() => p.evaluate(() => { const s = document.querySelector('#czViewer [data-a="mattopic"]'); return s && [...s.options].map((o) => o.textContent).join('|') === 'For the whole meeting|For Rail placement|For Phone layout'; })));
|
|
93
|
+
await p.selectOption('#czViewer [data-a="mattopic"]', 'Rail placement');
|
|
94
|
+
await p.check('#czViewer [data-a="matser"]');
|
|
95
|
+
await p.click('#czViewer [data-a="matadd"]');
|
|
96
|
+
const add = await until(() => posted(A.S, '/api/meeting-material')[0]);
|
|
97
|
+
ok('M1 Add posts one line to /api/meeting-material for the series, with the topic', add && add.body.op === 'add' && add.body.scope === 'series' && add.body.topic === 'Rail placement' && add.body.event.id === 'ev-rail' && add.body.item.ref === 'reports/partner-review/2026-10-12.md', JSON.stringify(add && add.body));
|
|
98
|
+
ok('M3 the list is read again and shows the new row, and the status says what was added', await until(async () => /Partner review/.test(await text(p)) && /Added “Partner review” for every meeting of the series\./.test(await text(p)) && !(await p.$('#czViewer .vzm-pop'))), (await text(p)).slice(0, 500));
|
|
122
99
|
|
|
123
|
-
/*
|
|
124
|
-
|
|
125
|
-
await p.click('#
|
|
126
|
-
const
|
|
127
|
-
ok('
|
|
128
|
-
ok('
|
|
129
|
-
|
|
130
|
-
await
|
|
131
|
-
|
|
132
|
-
ok('
|
|
133
|
-
await p.fill('#mmFind', 'q');
|
|
134
|
-
ok('M1 a one-letter search shows nothing', await until(() => p.evaluate(() => document.querySelector('#mmFound').textContent === '')));
|
|
135
|
-
await p.fill('#mmLinkIn', 'not a link');
|
|
136
|
-
ok('M1 an address that is not https says so and cannot be picked', await p.evaluate(() => /Paste an https address/.test(document.querySelector('#mmPaste').textContent) && !document.querySelector('#mmPaste [data-pick]')));
|
|
137
|
-
ok('M1 no Add button shows before something is picked', await p.evaluate(() => !document.querySelector('#mmDo')));
|
|
138
|
-
await p.click('#mmSug [data-pick]');
|
|
139
|
-
const opt = await p.evaluate(() => ({ line: document.querySelector('#mmLine').textContent, pressed: [...document.querySelectorAll('[data-scope]')].map((b) => b.dataset.scope + ':' + b.getAttribute('aria-pressed')).join(), picked: document.querySelector('#mmSug .mtg-on') && document.querySelector('#mmSug .mtg-on').textContent }));
|
|
140
|
-
ok('M3 picking says what Add records, before the press', /Adds “Premium UX PRD” to this meeting\. The calendar is not written\./.test(opt.line) && opt.picked === 'Picked' && /meeting:true,series:false/.test(opt.pressed), JSON.stringify(opt));
|
|
141
|
-
await p.click('[data-scope=series]');
|
|
142
|
-
ok('M3 the line follows the scope', await p.evaluate(() => /to every meeting in the series\./.test(document.querySelector('#mmLine').textContent)));
|
|
143
|
-
await p.click('#mmCancel');
|
|
144
|
-
ok('M1 Cancel returns to the meeting and focus returns to Add material', await p.evaluate(() => !document.querySelector('.mtg-sheet') && document.activeElement && document.activeElement.id === 'mmAdd') && A.matPosts.length === 0);
|
|
145
|
-
|
|
146
|
-
/* M1 add */
|
|
147
|
-
await p.click('#mmAdd'); await until(() => p.evaluate(() => /Premium UX PRD/.test(document.querySelector('#mmSug').textContent)));
|
|
148
|
-
await p.click('#mmSug [data-pick]'); await p.click('[data-scope=series]'); await p.click('#mmDo');
|
|
149
|
-
await until(() => A.matPosts.length === 1);
|
|
150
|
-
ok('M1 Add posts one line to /api/meeting-material for the series', A.matPosts.length === 1 && A.matPosts[0].op === 'add' && A.matPosts[0].scope === 'series' && A.matPosts[0].item.ref === 'planning/prd/premium-ux-prd.md' && A.matPosts[0].event.series === 'sprint-planning' && A.matPosts[0].event.id === 'ev-sprint', JSON.stringify(A.matPosts));
|
|
151
|
-
const after = await until(() => p.evaluate(() => /Premium UX PRD/.test(document.querySelector('#oMain').textContent) && !document.querySelector('.mtg-sheet') ? { text: document.querySelector('#oMain').textContent, focus: document.activeElement && document.activeElement.id } : null));
|
|
152
|
-
ok('M3 the list is read again from the route and shows the new row, and the status says what was added', after && /Premium UX PRD/.test(after.text) && /for every meeting of this series/.test(after.text) && /Added “Premium UX PRD” to every meeting in the series\./.test(after.text) && after.focus === 'mmAdd', JSON.stringify(after));
|
|
153
|
-
|
|
154
|
-
/* M2 remove and undo */
|
|
155
|
-
const nRm = A.matPosts.length;
|
|
156
|
-
await p.click('.mtg-rm[aria-label="Remove Roadmap"]');
|
|
157
|
-
await until(() => A.matPosts.length === nRm + 1);
|
|
158
|
-
const rm = A.matPosts[nRm];
|
|
159
|
-
ok('M2 Remove posts the url at the scope the row was added', rm.op === 'remove' && rm.scope === 'meeting' && rm.item.url === 'https://x.example/road', JSON.stringify(rm));
|
|
160
|
-
const gone = await until(() => p.evaluate(() => /Removed “Roadmap” from this meeting\. The document itself is not changed\./.test(document.querySelector('#mtgStatus').textContent) && !/for this meeting.*Roadmap/.test(document.querySelector('#oMain').textContent) && !!document.querySelector('#mtgUndo')));
|
|
161
|
-
ok('M2 the row leaves after the list is read again, and the status offers Undo', gone);
|
|
162
|
-
await p.click('#mtgUndo');
|
|
163
|
-
await until(() => A.matPosts.length === nRm + 2);
|
|
164
|
-
ok('M2 Undo adds the same item back at the same scope', A.matPosts[nRm + 1].op === 'add' && A.matPosts[nRm + 1].scope === 'meeting' && A.matPosts[nRm + 1].item.url === 'https://x.example/road', JSON.stringify(A.matPosts[nRm + 1]));
|
|
165
|
-
ok('M2 the row is back and the status says so', await until(() => p.evaluate(() => /Put back\./.test(document.querySelector('#mtgStatus').textContent) && /Roadmap/.test(document.querySelector('#oMain').textContent))));
|
|
166
|
-
ok('M6 nothing else was written by the material work', A.planPosts.length === 0 && ![...A.reqs].some((r) => /POST \/api\/(notes|meeting-focus|calendar-links)/.test(r)));
|
|
167
|
-
ok('M6 no page error so far', A.errors.length === 0, JSON.stringify(A.errors));
|
|
100
|
+
/* M2 remove, then Undo */
|
|
101
|
+
await until(() => p.evaluate(() => document.querySelectorAll('#czViewer [data-a="matrm"]').length === 3));
|
|
102
|
+
await p.click('#czViewer [data-a="matrm"][aria-label="Remove Rail PRD"]');
|
|
103
|
+
const rm = await until(() => posted(A.S, '/api/meeting-material').find((x) => x.body.op === 'remove'));
|
|
104
|
+
ok('M2 Remove posts the item at the scope it was added', rm && rm.body.scope === 'series' && rm.body.item.ref === 'planning/prd/rail.md', JSON.stringify(rm && rm.body));
|
|
105
|
+
ok('M2 the row leaves after the list is read again, and the status offers Undo', await until(async () => !/Rail PRD/.test((await text(p)).replace(/Removed “Rail PRD”\./, '')) && !!(await p.$('#czViewer [data-a="msgundo"]'))), (await text(p)).slice(0, 500));
|
|
106
|
+
await tap(p, '[data-a="msgundo"]');
|
|
107
|
+
const back = await until(() => posted(A.S, '/api/meeting-material').filter((x) => x.body.op === 'add')[1]);
|
|
108
|
+
ok('M2 Undo adds the same item back at the same scope', back && back.body.scope === 'series' && back.body.item.ref === 'planning/prd/rail.md', JSON.stringify(back && back.body));
|
|
109
|
+
ok('M2 the row is back and the status says so', await until(async () => /It is back/.test(await text(p)) && /Rail PRD/.test(await text(p))));
|
|
168
110
|
|
|
169
|
-
/* M5
|
|
170
|
-
|
|
171
|
-
await
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
await
|
|
176
|
-
await
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
ok('M5
|
|
111
|
+
/* M5 refused writes */
|
|
112
|
+
A.refuse = 'the material store is busy';
|
|
113
|
+
await until(() => p.evaluate(() => document.querySelectorAll('#czViewer [data-a="matrm"]').length > 0));
|
|
114
|
+
const n0 = A.mat.length;
|
|
115
|
+
await p.click('#czViewer [data-a="matrm"]');
|
|
116
|
+
ok('M5 a refused Remove shows the reason, and the row stays', await until(async () => /Not removed: the material store is busy/.test(await text(p))) && await p.evaluate((n) => document.querySelectorAll('#czViewer [data-a="matrm"]').length === n, n0));
|
|
117
|
+
await tap(p, '[data-a="addmat"]');
|
|
118
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-a="matlink"]')));
|
|
119
|
+
await p.fill('#czViewer [data-a="matlink"]', 'https://x.example/notes');
|
|
120
|
+
await p.press('#czViewer [data-a="matlink"]', 'Enter');
|
|
121
|
+
ok('M5 a refused Add shows the reason, keeps the popover and what was typed', await until(async () => /Not added: the material store is busy/.test(await text(p)) && (await p.inputValue('#czViewer [data-a="matlink"]')) === 'https://x.example/notes'));
|
|
122
|
+
A.refuse = '';
|
|
123
|
+
await p.press('#czViewer [data-a="matlink"]', 'Enter');
|
|
124
|
+
ok('M5 it can be pressed again', await until(() => A.mat.some((m) => m.url === 'https://x.example/notes')) && A.mat.length === n0 + 1);
|
|
125
|
+
const mats = [...new Set(A.S.posts.map((x) => x.path))];
|
|
126
|
+
ok('M6 the material work wrote only to /api/meeting-material', mats.join() === '/api/meeting-material', mats.join());
|
|
127
|
+
ok('M6 no page error so far', A.errors.length === 0, A.errors.join(' | '));
|
|
128
|
+
await A.ctx.close();
|
|
180
129
|
|
|
181
|
-
/* M4 make task */
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
await
|
|
186
|
-
await
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
ok('M4
|
|
191
|
-
await
|
|
192
|
-
await
|
|
193
|
-
|
|
194
|
-
ok('M4
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
130
|
+
/* M4 make task, on the note of "Viewer sync" */
|
|
131
|
+
const B = await F.open(browser, BASE, '/premium-viewer.html?open=meeting¬e=n1', { noLive: true });
|
|
132
|
+
ALL.push(B);
|
|
133
|
+
const q = B.page;
|
|
134
|
+
await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-a="maketask"]')), 15000);
|
|
135
|
+
ok('M4 each next step has Make task, and decisions and questions have none', await q.evaluate(() => document.querySelectorAll('#czViewer [data-a="maketask"]').length === 3));
|
|
136
|
+
await tap(q, '[data-a="maketask"][data-i="0"]');
|
|
137
|
+
const pl = await until(() => posted(B.S, '/api/plan-items')[0]);
|
|
138
|
+
const ev = pl && pl.body.events && pl.body.events[0];
|
|
139
|
+
ok('M4 Make task posts one planned event in the first stage with the owner', ev && ev.ev === 'planned' && ev.initiative === 'viewer' && ev.stage === 'st1' && ev.owner === 'person:Ana' && ev.title === 'Add a print view for documents' && pl.body.ws === 'w1', JSON.stringify(pl && pl.body));
|
|
140
|
+
ok('M4 the step says where it went (MtAfter: Task made · added to Viewer, under Intake), with Undo', await until(async () => /Task made · added to Viewer, under Intake/.test(await text(q)) && !!(await q.$('#czViewer [data-a="madeundo"][data-i="0"]'))));
|
|
141
|
+
await tap(q, '[data-a="madeundo"][data-i="0"]');
|
|
142
|
+
const wd = await until(() => posted(B.S, '/api/plan-items')[1]);
|
|
143
|
+
ok('M4 Undo withdraws the item', wd && wd.body.events[0].ev === 'withdrawn' && wd.body.events[0].item === 'item-9', JSON.stringify(wd && wd.body));
|
|
144
|
+
ok('M4 after Undo the step can be made a task again', await until(async () => /The task is withdrawn/.test(await text(q)) && !!(await q.$('#czViewer [data-a="maketask"][data-i="0"]'))));
|
|
145
|
+
/* an initiative with no stage; a refused write */
|
|
146
|
+
await q.route('**/api/plan-items*', (r) => (r.request().method() === 'POST' ? (B.S.posts.push({ path: '/api/plan-items', body: JSON.parse(r.request().postData() || '{}') }), json(r, { ok: false, error: 'the plan is locked' }, 409)) : json(r, { ok: true, stages: B.noStage ? [] : [{ id: 'st1', label: 'Intake' }] })));
|
|
147
|
+
B.noStage = true;
|
|
148
|
+
const before = posted(B.S, '/api/plan-items').length;
|
|
149
|
+
await tap(q, '[data-a="maketask"][data-i="1"]');
|
|
150
|
+
ok('M4 an initiative with no stage says so and writes nothing', await until(async () => /The initiative has no stage to put the step in/.test(await text(q))) && posted(B.S, '/api/plan-items').length === before);
|
|
151
|
+
B.noStage = false;
|
|
152
|
+
await tap(q, '[data-a="maketask"][data-i="1"]');
|
|
153
|
+
ok('M5 a refused Make task shows the reason and the step stays open', await until(async () => /The task was not made: the plan is locked/.test(await text(q))) && !!(await q.$('#czViewer [data-a="maketask"][data-i="1"]')));
|
|
154
|
+
await B.ctx.close();
|
|
204
155
|
|
|
205
|
-
/*
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
156
|
+
/* M4 a note with no initiative */
|
|
157
|
+
const C = await F.open(browser, BASE, '/premium-viewer.html?open=meeting¬e=n1', { noLive: true, init: () => {} });
|
|
158
|
+
ALL.push(C);
|
|
159
|
+
await C.page.route('**/api/notes/one*', (r) => json(r, { ok: true, note: { ...W.NOTE, initiative: null, series: null }, place: null }));
|
|
160
|
+
await C.page.reload();
|
|
161
|
+
await until(() => C.page.evaluate(() => !!document.querySelector('#czViewer [data-a="maketask"]')), 15000);
|
|
162
|
+
await tap(C.page, '[data-a="maketask"][data-i="0"]');
|
|
163
|
+
ok('M4 with no initiative the press says to link one and writes nothing', await until(async () => /link the meeting to an initiative first/i.test(await text(C.page))) && posted(C.S, '/api/plan-items').length === 0);
|
|
164
|
+
await C.ctx.close();
|
|
211
165
|
|
|
212
|
-
/* M7 floors
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
await P.ctx.close();
|
|
221
|
-
}
|
|
222
|
-
const css = (page, sel) => page.evaluate((s) => { const e = document.querySelector(s); if (!e) return null; const c = getComputedStyle(e); return ['fontWeight', 'borderRadius'].map((k) => c[k]).join('|'); }, sel);
|
|
223
|
-
const mk = await browser.newContext({ viewport: { width: 1280, height: 900 } }); const mp = await mk.newPage();
|
|
224
|
-
await mp.setContent(MOCKUP); await CT.applyToPage(mp, CT_VENDOR); await mp.waitForTimeout(500);
|
|
225
|
-
const ctaM = await mp.evaluate(() => { const b = document.createElement('button'); b.className = 'cta'; document.body.appendChild(b); const c = getComputedStyle(b); return c.fontWeight + '|' + c.borderRadius; });
|
|
226
|
-
const addM = await mp.evaluate(() => { const b = document.createElement('button'); b.className = 'addb'; document.body.appendChild(b); const c = getComputedStyle(b); return c.fontWeight + '|' + c.borderRadius; }), F1 = await open(), addB = await css(F1.page, '#mmAdd');
|
|
227
|
-
await F1.page.click('#mmAdd'); await until(() => F1.page.evaluate(() => /Premium UX PRD/.test(document.querySelector('#mmSug').textContent))); await F1.page.click('#mmSug [data-pick]');
|
|
228
|
-
const doB = await css(F1.page, '#mmDo');
|
|
229
|
-
// re-pointed for premium-agreed-design: the Agreed design's dialog CTA is a pill at weight 800 (cozy-viewer.css .cz .dlg .cta), not the mockup's 600;
|
|
230
|
-
// the add button keeps the mockup's pill and weight
|
|
231
|
-
ok('M7 fidelity: the buttons keep the pill radius, the add button the mockup\'s weight and the CTA the Agreed design\'s', ctaM && addB && addB === addM && doB === '800|' + ctaM.split('|')[1] && /^999/.test(ctaM.split('|')[1]), ctaM + ' / ' + addM + ' vs ' + addB + ' / ' + doB);
|
|
232
|
-
const labM = await mp.evaluate(() => { const e = document.querySelector('.label'); return e ? getComputedStyle(e).fontSize + '|' + getComputedStyle(e).textTransform : null; });
|
|
233
|
-
const labP = await F1.page.evaluate(() => { const e = document.querySelector('.mtg-sec .label'); return e ? getComputedStyle(e).fontSize + '|' + getComputedStyle(e).textTransform : null; });
|
|
234
|
-
// re-pointed for premium-agreed-design: the Agreed design's labels keep the mockup's 12 px but drop its uppercase (cozy-viewer.css .cz .dlg .label)
|
|
235
|
-
ok('M7 fidelity: a sheet section label keeps the mockup\'s size in the Agreed design\'s sentence case', labM && labP && labP.split('|')[0] === labM.split('|')[0] && labP.split('|')[1] === 'none', labM + ' vs ' + labP);
|
|
236
|
-
await mk.close();
|
|
166
|
+
/* M7 floors */
|
|
167
|
+
const D = await openRail({ w: 390, h: 844 });
|
|
168
|
+
await tap(D.page, '[data-a="addmat"]');
|
|
169
|
+
await until(() => D.page.evaluate(() => !!document.querySelector('#czViewer [data-a="matlink"]')));
|
|
170
|
+
const fl = await D.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth }));
|
|
171
|
+
ok('M7 at 390 px the popover has no sideways scroll', fl.over <= 0, JSON.stringify(fl));
|
|
172
|
+
await D.ctx.close();
|
|
173
|
+
ok('M6 no page error in any run', ALL.every((x) => x.errors.length === 0), JSON.stringify(ALL.map((x) => x.errors).filter((e) => e.length)));
|
|
237
174
|
return finish();
|
|
238
175
|
})().catch((e) => { console.error(e); finish(1); });
|