create-pmos 0.397.0 → 0.398.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 +13 -13
- 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 +101 -52
- package/workspace/briefing-premium-board-test.js +252 -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 +86 -196
- package/workspace/briefing-premium-doc-edit-test.js +95 -83
- package/workspace/briefing-premium-initiative-test.js +159 -296
- package/workspace/briefing-premium-insights-test.js +337 -219
- package/workspace/briefing-premium-metrics-test.js +53 -97
- package/workspace/briefing-premium-products-test.js +40 -27
- package/workspace/briefing-premium-sources-test.js +66 -48
- package/workspace/briefing-premium-test.js +150 -647
- package/workspace/briefing-premium-work-test.js +88 -283
- package/workspace/changelog.json +12 -0
- package/workspace/fixtures/board-premium-trail.js +32 -0
- package/workspace/fixtures/premium-viewer-fixtures.js +182 -0
- package/workspace/guide/briefing-premium.md +3 -1
- package/workspace/guide/home.md +47 -0
- package/workspace/guide/index.md +1 -0
- package/workspace/lib/agent-roles.js +71 -0
- package/workspace/lib/board-premium.js +85 -19
- package/workspace/lib/board-trail.js +223 -0
- package/workspace/lib/home-work-item.js +58 -0
- package/workspace/lib/insights-goals.js +196 -0
- package/workspace/lib/insights-premium.js +62 -14
- package/workspace/lib/insights-records.js +101 -0
- package/workspace/lib/jira-tickets.js +1 -1
- package/workspace/lib/route-modules.js +4 -0
- package/workspace/lib/routes-board-trail.js +33 -0
- package/workspace/lib/routes-home-desk.js +176 -0
- package/workspace/lib/routes-insights-premium.js +12 -3
- package/workspace/lib/routes-insights-records.js +129 -0
- package/workspace/lib/routes-notes.js +1 -0
- package/workspace/lib/routes-viewer.js +108 -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 +85 -75
- package/workspace/premium-briefing-depth-test.js +66 -53
- package/workspace/premium-chat-attach-test.js +54 -63
- package/workspace/premium-chat-chart-tab-test.js +35 -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 +32 -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 +50 -43
- package/workspace/premium-html-viewer-test.js +14 -17
- package/workspace/premium-phone-card-test.js +7 -2
- package/workspace/premium-phone-room-test.js +41 -35
- package/workspace/premium-report-read-test.js +115 -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 +82 -128
- package/workspace/premium-vw-copy-test.js +17 -33
- package/workspace/premium-vw-doc-test.js +11 -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 +118 -187
- package/workspace/premium-vw-notes-test.js +85 -108
- package/workspace/premium-vw-rec-test.js +72 -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 +305 -0
- package/workspace/public/pm/bd-span.js +186 -82
- package/workspace/public/pm/bd-stages.js +25 -11
- 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 +497 -230
- 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 +296 -167
- package/workspace/public/pm/cozy-md.js +396 -0
- package/workspace/public/pm/cozy-nav.js +17 -6
- package/workspace/public/pm/cozy-placeholder.js +26 -0
- package/workspace/public/pm/cozy-viewer.css +3 -3
- package/workspace/public/pm/cozy-viewer.js +144 -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 +905 -0
- package/workspace/public/pm/home-around.js +515 -0
- package/workspace/public/pm/home-chat.js +459 -0
- package/workspace/public/pm/home-data.js +312 -0
- package/workspace/public/pm/home-draft.js +68 -0
- package/workspace/public/pm/home-more.js +249 -0
- package/workspace/public/pm/home-phone-card.js +109 -0
- package/workspace/public/pm/home-work.js +519 -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 +423 -394
- package/workspace/public/pm/premium-chart-tab.js +110 -62
- package/workspace/public/pm/premium-deck.js +3 -3
- package/workspace/public/pm/premium-first.js +25 -21
- package/workspace/public/pm/premium-insights.js +792 -568
- package/workspace/public/pm/premium-meeting.js +61 -549
- 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 +509 -480
- package/workspace/public/pm/premium-report-tab.js +87 -63
- package/workspace/public/pm/premium-shell.js +72 -119
- package/workspace/public/pm/premium-viewer.js +22 -1
- package/workspace/public/pm/premium-vw-cal.js +187 -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 +731 -0
- package/workspace/public/pm/premium-vw-notes.js +56 -69
- 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/term-view.js +22 -0
- package/workspace/public/premium-board.html +28 -70
- package/workspace/public/premium-initiative.html +8 -48
- package/workspace/public/premium-insights.html +22 -60
- package/workspace/public/premium-viewer.html +20 -0
- package/workspace/public/premium.html +16 -107
- 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/premium-report-read.json +1 -1
- package/workspace/test-lists/premium-vw-agreed.json +9 -0
- package/workspace/test-lists/premium-vw-notes.json +1 -1
- package/workspace/public/pm/premium-work.js +0 -729
- package/workspace/public/pm/premium.js +0 -1146
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
|
-
/* briefing-premium-calendar-3-test.js — recording,
|
|
4
|
-
* planning/prd/briefing-premium-calendar-3-prd.md R1 to
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
3
|
+
/* briefing-premium-calendar-3-test.js — recording, Focus and Replay in the meeting card (initiative briefing-premium-calendar, slice 3;
|
|
4
|
+
* planning/prd/briefing-premium-calendar-3-prd.md R1 to R12; re-pointed for premium-agreed-design, area viewer: the meeting opens in the Viewer
|
|
5
|
+
* card, /premium-viewer.html, not in the old Briefing dialog; there is no floating record chip). Serves the real page from the real server; the
|
|
6
|
+
* calendar, the notes, Focus and the replay are answered by stand-ins (fixtures/premium-viewer-fixtures.js), and the recorder is a stand-in that
|
|
7
|
+
* makes the same requests the console's recorder makes (record, pause, stop) and opens no microphone.
|
|
8
|
+
* Focus and the full Replay view have no design in the Agreed mockup: they are the plain versions, marked "Waiting for design". The topic of an
|
|
9
|
+
* added item (R8) is in briefing-premium-calendar-2-test.js (M3).
|
|
10
|
+
* R1 record · R2 honest state · R3 no chip · R4 leaving · R5 Focus · R6 honest Focus · R7 Replay · R10 writes · R11 floors · R12 full Replay
|
|
8
11
|
* Every wait polls the page; no fixed sleep stands in for a state. */
|
|
9
|
-
const fs = require('fs');
|
|
10
12
|
const path = require('path');
|
|
11
13
|
const { spawn } = require('child_process');
|
|
12
14
|
const { findBrowser } = require('./lib/find-browser');
|
|
13
|
-
const CT = require('./lib/premium-console-type'); // the mockup is read with the console's type (PM, 2026-10-19), as premium.css is
|
|
14
|
-
const CT_VENDOR = 'file://' + path.join(__dirname, 'public', 'vendor') + '/';
|
|
15
15
|
const T = require('./test-run').configure({ name: 'briefing-premium-calendar-3' });
|
|
16
|
-
const
|
|
17
|
-
const F = require('./fixtures/briefing-premium-facts.js');
|
|
16
|
+
const F = require('./fixtures/premium-viewer-fixtures.js');
|
|
18
17
|
|
|
19
|
-
const BASE = T.BASE;
|
|
20
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
21
|
-
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); } };
|
|
18
|
+
const BASE = T.BASE, until = F.until;
|
|
22
19
|
const results = [];
|
|
23
|
-
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
|
|
20
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 500) : ''}`); };
|
|
24
21
|
let srv = null; let browser = null;
|
|
25
22
|
const finish = async (code) => {
|
|
26
23
|
if (browser) await browser.close().catch(() => {});
|
|
@@ -31,52 +28,7 @@ const finish = async (code) => {
|
|
|
31
28
|
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
32
29
|
};
|
|
33
30
|
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
34
|
-
|
|
35
|
-
const pad = (n) => String(n).padStart(2, '0');
|
|
36
|
-
const dayKey = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
37
|
-
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)}`; };
|
|
38
|
-
const NOW = new Date();
|
|
39
|
-
const midnight = new Date(NOW.getFullYear(), NOW.getMonth(), NOW.getDate());
|
|
40
|
-
const monday = () => { const d = new Date(midnight); d.setDate(d.getDate() - ((d.getDay() + 6) % 7)); return d; };
|
|
41
|
-
/* "Live review" is under way now (it starts at most 10 minutes ago, never before midnight); "Retro" ended long ago when the day allows, so it cannot be recorded. */
|
|
42
|
-
/* START is in whole minutes, as the calendar answer holds them, so the Today row finds its event. */
|
|
43
|
-
const START = new Date(Math.max(midnight.getTime(), Math.floor((NOW.getTime() - 10 * 60000) / 60000) * 60000)), END = new Date(START.getTime() + 60 * 60000);
|
|
44
|
-
const weekAnswer = () => {
|
|
45
|
-
const m = monday(), cells = [];
|
|
46
|
-
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: [] }); }
|
|
47
|
-
const put = (d, e) => cells.find((c) => c.key === dayKey(d)).events.push(e);
|
|
48
|
-
put(START, { id: 'ev-live', at: iso(START), end: iso(END), title: 'Live review', attendees: ['Priya', 'Dara'] });
|
|
49
|
-
const other = new Date(midnight); other.setDate(other.getDate() + (NOW.getDay() === 0 ? -2 : 1)); other.setHours(9, 30, 0, 0);
|
|
50
|
-
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: [] });
|
|
51
|
-
return { ok: true, view: 'week', range: { start: cells[0].key, end: cells[6].key }, cells, events_source: 'calendar-memory', today: dayKey(NOW), context: {}, link_boards: [], gantt: [] };
|
|
52
|
-
};
|
|
53
|
-
const REPLAY = { ok: true, note: { id: 'n1', title: 'Live review notes' }, meeting: { title: 'Live review', attendees: ['Priya', 'Dara'] }, audio: null, length_ms: 300000,
|
|
54
|
-
lines: [{ i: 0, t: 1000, who: 'Dara', text: 'Welcome everyone' }, { i: 1, t: 61000, who: 'Priya', text: 'We plan eight people' }, { i: 2, t: 130000, who: 'Dara', text: 'Next the risks' }],
|
|
55
|
-
keys: [{ k: 'decision', text: 'Plan with eight people', t: 61000, state: 'draft' }, { k: 'action', text: 'Priya confirms the owner', t: null, owner: 'Priya', state: 'owner' }, { k: 'question', text: 'Who signs off?', t: 200000, state: 'open' }],
|
|
56
|
-
topics: [{ id: 'capacity', text: 'Capacity', n: 1 }, { id: 'risks', text: 'Risks', n: 2 }], runs: [{ topic: 'capacity', n: 1, from_ms: 0, to_ms: 100000 }, { topic: 'risks', n: 2, from_ms: 100000, to_ms: 300000 }],
|
|
57
|
-
shots: [{ t: 120000, w: 10, h: 10, why: 'A slide with the plan' }] };
|
|
58
|
-
const FOCUS = () => ({ ok: true, now_ms: Date.now(), date: dayKey(NOW), talk: false, event: { id: 'ev-live', title: 'Live review', at: iso(START), end: iso(END), attendees: ['Priya', 'Dara'] },
|
|
59
|
-
note: { id: 'n1', title: 'Live review', state: 'recording', lines: 3 }, topics: [{ id: 'capacity', text: 'Capacity', state: 'discussed', minutes: 4 }, { id: 'risks', text: 'Risks', state: 'now', minutes: 2 }, { id: 'launch', text: 'Launch date', state: 'notyet', minutes: 0 }],
|
|
60
|
-
current: 'risks', runs: [{ topic: 'capacity', from_min: 0, to_min: 4 }, { topic: 'risks', from_min: 4, to_min: null }], gist: 'The room is weighing the risks to the date.',
|
|
61
|
-
chips: [{ label: 'Premium UX', sub: 'in progress' }], tail: [{ who: 'Dara', text: 'Welcome everyone' }, { who: 'Priya', text: 'We plan eight people' }, { who: 'Dara', text: 'Next the risks' }],
|
|
62
|
-
captured: { decisions: [{ text: 'Plan with eight people' }], actions: [{ text: 'Priya confirms the owner' }], questions: [] }, material: [{ title: 'Capacity sheet', kind: 'doc', topic: 'Capacity' }], notes: [], asks: [], companion: { on: true, running: false, started: false, reason: 'new lines', error: null } });
|
|
63
|
-
const WAV = (() => { const rate = 8000, n = rate * 4, b = Buffer.alloc(44 + n * 2); b.write('RIFF', 0); b.writeUInt32LE(36 + n * 2, 4); b.write('WAVEfmt ', 8); b.writeUInt32LE(16, 16); b.writeUInt16LE(1, 20); b.writeUInt16LE(1, 22); b.writeUInt32LE(rate, 24); b.writeUInt32LE(rate * 2, 28); b.writeUInt16LE(2, 32); b.writeUInt16LE(16, 34); b.write('data', 36); b.writeUInt32LE(n * 2, 40); return b; })();
|
|
64
|
-
const MOCKUP = fs.readFileSync(path.join(__dirname, '..', 'prototype', 'premium-ux-concept', 'briefing-artifact.html'), 'utf8');
|
|
65
|
-
|
|
66
|
-
/* the stand-in recorder: the console's recorder makes these same requests; this one opens no microphone */
|
|
67
|
-
const RECORDER = () => {
|
|
68
|
-
window.__premiumRecorder = {
|
|
69
|
-
_id: null, _started: null, _banner: null,
|
|
70
|
-
async listen(id) {
|
|
71
|
-
const r = await fetch('/api/notes/record', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id }) }).then((x) => x.json());
|
|
72
|
-
if (!r.ok) { this._banner = r.error; return false; }
|
|
73
|
-
this._id = id; this._started = Date.now() - 65000; return true;
|
|
74
|
-
},
|
|
75
|
-
async pause() { await fetch('/api/notes/pause', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id: this._id }) }); this._id = null; },
|
|
76
|
-
async stop(id) { await fetch('/api/notes/stop', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ id }) }); this._id = null; return { discarded: false }; },
|
|
77
|
-
listening() { return this._id; }, started() { return this._started; }, banner() { const b = this._banner; this._banner = null; return b; },
|
|
78
|
-
};
|
|
79
|
-
};
|
|
31
|
+
const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
|
|
80
32
|
|
|
81
33
|
(async () => {
|
|
82
34
|
const exe = findBrowser();
|
|
@@ -85,366 +37,139 @@ const RECORDER = () => {
|
|
|
85
37
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
86
38
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
87
39
|
await T.waitForServer(BASE);
|
|
88
|
-
browser = await chromium.launch({ executablePath: exe
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
page.on('request', (r) => { if (r.url().startsWith(BASE)) S.reqs.push(r.method() + ' ' + new URL(r.url()).pathname); });
|
|
101
|
-
const noteBy = (id) => S.notes.find((n) => n.id === id);
|
|
102
|
-
await page.route('**/api/briefing-premium*', (r) => json(r, { ok: true, state: 'ready', model: B.build(facts()), as_of: Date.now() }));
|
|
103
|
-
await page.route('**/api/calendar-views*', (r) => json(r, weekAnswer()));
|
|
104
|
-
await page.route('**/api/meeting-replay*', (r) => json(r, S.replay || replay));
|
|
105
|
-
await page.route('**/api/meeting-material/suggest*', (r) => json(r, { ok: true, suggested: [{ kind: 'link', url: 'https://x.example/road', title: 'Roadmap', meta: 'link' }], found: [] }));
|
|
106
|
-
await page.route('**/api/meeting-material*', (r) => {
|
|
107
|
-
const req = r.request(), u = new URL(req.url());
|
|
108
|
-
if (req.method() === 'POST') { S.matPosts.push(JSON.parse(req.postData() || '{}')); return json(r, { ok: true, items: [] }); }
|
|
109
|
-
return json(r, { ok: true, key: 'k', items: [], ...(u.searchParams.get('topics') ? { topics: topics.map((t, i) => ({ id: 't' + i, text: t })) } : {}) });
|
|
110
|
-
});
|
|
111
|
-
await page.route('**/api/notes/recording*', (r) => r.fulfill({ status: 200, contentType: 'audio/wav', body: WAV }));
|
|
112
|
-
await page.route('**/api/notes/screen*', (r) => r.fulfill({ status: 200, contentType: 'image/png', body: Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==', 'base64') }));
|
|
113
|
-
await page.route('**/api/notes/one*', (r) => json(r, { ok: true, note: { id: 'n1', body: 'text', transcript: [{ text: 'x' }], sessions: [{}] } }));
|
|
114
|
-
await page.route('**/api/notes/new', (r) => {
|
|
115
|
-
const b = JSON.parse(r.request().postData() || '{}'); S.newPosts.push(b);
|
|
116
|
-
if (S.newError) return json(r, { ok: false, error: S.newError }, 409);
|
|
117
|
-
let n = S.notes.find((x) => x.meeting && x.meeting.event_id === b.meeting.event_id);
|
|
118
|
-
if (!n) { n = { id: 'n1', title: b.meeting.title, state: 'idle', updated_at: new Date().toISOString(), meeting: { kind: 'event', event_id: b.meeting.event_id, start: b.meeting.start, title: b.meeting.title } }; S.notes.push(n); }
|
|
119
|
-
return json(r, { ok: true, note: n, reused: false });
|
|
120
|
-
});
|
|
121
|
-
await page.route('**/api/notes/record', (r) => { const b = JSON.parse(r.request().postData() || '{}'); S.recPosts.push(b); if (S.recordError) return json(r, { ok: false, error: S.recordError }, 409); noteBy(b.id).state = 'recording'; return json(r, { ok: true, recorded_from: new Date().toISOString() }); });
|
|
122
|
-
await page.route('**/api/notes/pause', (r) => { const b = JSON.parse(r.request().postData() || '{}'); S.pausePosts.push(b); const n = noteBy(b.id); if (n) { n.state = 'paused'; n.resume_until = new Date(Date.now() + 3600000).toISOString(); } return json(r, { ok: true }); });
|
|
123
|
-
await page.route('**/api/notes/stop', (r) => { const b = JSON.parse(r.request().postData() || '{}'); S.stopPosts.push(b); const n = noteBy(b.id); if (n) n.state = 'ended'; return json(r, { ok: true }); });
|
|
124
|
-
await page.route(/\/api\/notes$/, (r) => json(r, { ok: true, notes: S.notes }));
|
|
125
|
-
await page.route('**/api/meeting-focus/topic', (r) => { S.topicPosts.push(JSON.parse(r.request().postData() || '{}')); return json(r, { ok: true }); });
|
|
126
|
-
await page.route(/\/api\/meeting-focus(\?|$)/, (r) => { if (/[?&]brief=1(&|$)/.test(r.request().url())) S.briefGets++; else S.focusGets++; const a = typeof focus === 'function' ? focus() : focus; return json(r, a, a.ok === false ? 404 : 200); });
|
|
127
|
-
await page.route('**/api/calendar-links', (r) => json(r, { ok: true }));
|
|
128
|
-
S.planPosts = [];
|
|
129
|
-
await page.route('**/api/plan-items*', (r) => { const req = r.request(); if (req.method() === 'POST') { S.planPosts.push(JSON.parse(req.postData() || '{}')); return json(r, { ok: true, written: [{ item: 'i' + S.planPosts.length }] }); } return json(r, { ok: true, stages: [{ id: 's1', label: 'Now' }] }); });
|
|
130
|
-
if (stub) await page.addInitScript(RECORDER);
|
|
131
|
-
await page.addInitScript(() => {
|
|
132
|
-
const f = window.fetch;
|
|
133
|
-
window.fetch = function (u, o) {
|
|
134
|
-
try { if (/\/api\/notes\/pause$/.test(String(u)) && o && o.method === 'POST') { const l = JSON.parse(localStorage.getItem('__pauseIssued') || '[]'); l.push({ body: JSON.parse(o.body || '{}'), keepalive: !!o.keepalive }); localStorage.setItem('__pauseIssued', JSON.stringify(l)); } } catch { /* the note is only for the test */ }
|
|
135
|
-
return f.apply(this, arguments);
|
|
136
|
-
};
|
|
137
|
-
});
|
|
138
|
-
if (audio) S.replay = { ...REPLAY, audio: { url: '/api/notes/recording?id=n1', ms: 4000 }, length_ms: 4000, lines: [{ i: 0, t: 500, who: 'Dara', text: 'Welcome' }, { i: 1, t: 2500, who: 'Priya', text: 'Plan' }], keys: [{ k: 'decision', text: 'Plan', t: 2500, state: 'draft' }], runs: [{ topic: 'capacity', n: 1, from_ms: 0, to_ms: 2000 }, { topic: 'risks', n: 2, from_ms: 2000, to_ms: 4000 }], shots: [] };
|
|
139
|
-
await page.goto(BASE + url + (url.includes('?') ? '&' : '?') + 'theme=' + theme);
|
|
140
|
-
if (url === '/premium.html' && openDialog) {
|
|
141
|
-
S.up = await until(() => page.evaluate(() => document.querySelectorAll('#rank .rr').length > 0), 20000);
|
|
142
|
-
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
|
|
143
|
-
await page.evaluate(() => { const r = [...document.querySelectorAll('#tl .ev')].find((e) => e.querySelector('b').textContent === 'Live review'); r.click(); });
|
|
144
|
-
S.dlg = await until(() => page.evaluate(() => document.querySelector('#dlg').classList.contains('on') && !!document.querySelector('#m3Rec')));
|
|
145
|
-
}
|
|
146
|
-
SESS.push(S); S.url = url;
|
|
147
|
-
return Object.assign(S, { ctx, page });
|
|
148
|
-
};
|
|
149
|
-
const text = (p) => p.evaluate(() => document.querySelector('#oMain').textContent);
|
|
150
|
-
const rec = (p) => p.evaluate(() => document.querySelector('#m3Rec') ? document.querySelector('#m3Rec').textContent : '');
|
|
151
|
-
/* A control in a folded part of the detail is reached by opening that part first, and one in the More menu by opening the menu; an opened part stays
|
|
152
|
-
* open when the meeting's answers land and the detail is drawn again. */
|
|
153
|
-
const reveal = async (p, sel) => { await until(() => p.evaluate(() => document.querySelector('#oMain').dataset.ready === 'meeting')); await p.evaluate((q) => { const b = document.querySelector(q), part = b && b.closest('details.vm-part'), mn = b && b.closest('details.vm-menu'); if (part && !part.open) part.querySelector('summary').click(); if (mn) mn.open = true; }, sel); };
|
|
154
|
-
const press = async (p, act) => { const sel = `#oMain [data-m3="${act}"]`; await reveal(p, sel); await p.click(sel); };
|
|
155
|
-
const chip = (p) => p.evaluate(() => { const c = document.querySelector('#recChip'); return c && !c.hidden ? c.textContent : null; });
|
|
156
|
-
|
|
157
|
-
const A = await open();
|
|
158
|
-
ok('0 the dialog opens on a meeting under way with the Record row', A.up && A.dlg);
|
|
159
|
-
if (!A.up || !A.dlg) return finish(1);
|
|
40
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
41
|
+
const W = F.world();
|
|
42
|
+
const tap = (p, sel) => p.$eval('#czViewer ' + sel, (b) => b.click());
|
|
43
|
+
const text = (p) => p.evaluate(() => (document.querySelector('#czViewer') || {}).innerText || '');
|
|
44
|
+
const notesPosts = (S) => S.posts.filter((x) => x.path.startsWith('/api/notes/')).map((x) => x.path.replace('/api/notes/', ''));
|
|
45
|
+
const chip = (p) => p.evaluate(() => (document.querySelector('#czViewer .vz-chip') || {}).textContent || '');
|
|
46
|
+
const LIVE_URL = '/premium-viewer.html?open=meeting&event=ev-live&date=' + F.dayKey(W.LIVE);
|
|
47
|
+
const ALL = [];
|
|
48
|
+
const open = async (url, o) => { const X = await F.open(browser, BASE, url, { noLive: true, ...o }); ALL.push(X); return X; };
|
|
49
|
+
|
|
50
|
+
/* R1 record */
|
|
51
|
+
const A = await open(LIVE_URL);
|
|
160
52
|
const p = A.page;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
ok('
|
|
167
|
-
|
|
168
|
-
ok('R1
|
|
169
|
-
await
|
|
170
|
-
|
|
171
|
-
await
|
|
172
|
-
ok('R1
|
|
173
|
-
await
|
|
174
|
-
ok('
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
await
|
|
179
|
-
ok('
|
|
180
|
-
|
|
181
|
-
await
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
await
|
|
187
|
-
|
|
188
|
-
await
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
53
|
+
ok('R1 a meeting under way has Record', await until(() => p.evaluate(() => (document.querySelector('#czViewer .vz-pri') || {}).dataset && document.querySelector('#czViewer .vz-pri').dataset.k === 'record'), 15000));
|
|
54
|
+
await tap(p, '[data-a="more"]'); await tap(p, '[data-a="m-why"]');
|
|
55
|
+
ok('R1 More says what Record and Focus do', await until(async () => /stay on this machine|on this machine/i.test(await text(p)) && !!(await p.$('#czViewer .vz-why'))), (await text(p)).slice(0, 400));
|
|
56
|
+
ok('R1 nothing was sent to the notes routes before a press', notesPosts(A.S).length === 0);
|
|
57
|
+
await tap(p, '[data-a="record"]');
|
|
58
|
+
ok('R1 the first press asks for consent in plain words and sends nothing', await until(async () => /Tell everyone first/.test(await text(p))) && notesPosts(A.S).length === 0);
|
|
59
|
+
await tap(p, '[data-a="askno"]');
|
|
60
|
+
ok('R1 Not yet closes the ask and sends nothing', await until(async () => !/Tell everyone first/.test(await text(p))) && notesPosts(A.S).length === 0);
|
|
61
|
+
await p.click('#czViewer [data-a="record"]'); // a real press: the browser asks before leaving only after one
|
|
62
|
+
await tap(p, '[data-a="recgo"]');
|
|
63
|
+
const made = await until(() => A.S.posts.find((x) => x.path === '/api/notes/new'));
|
|
64
|
+
ok('R1 "I told them, start" makes the note for the calendar event, then listens on it', made && JSON.stringify(made.body).includes('ev-live') && await until(() => notesPosts(A.S).join() === 'new,record'), JSON.stringify(made && made.body));
|
|
65
|
+
ok('R2 the card says Recording, with the clock and Stop', await until(async () => (await chip(p)) === 'Recording' && !!(await p.$('#czViewer .vz-pri[data-k="stop"]'))));
|
|
66
|
+
ok('R3 no floating record chip is drawn while it records', !(await p.$('#recChip, #recCtl')));
|
|
67
|
+
|
|
68
|
+
/* R2 pause and resume */
|
|
69
|
+
await tap(p, '.vz-bar [data-a="pause"]');
|
|
70
|
+
ok('R2 Pause pauses through the route and the card says Paused with Resume', await until(async () => (await chip(p)) === 'Paused' && !!(await p.$('#czViewer .vz-pri[data-k="resume"]'))));
|
|
71
|
+
ok('R3 no record chip while it is paused either', !(await p.$('#recChip, #recCtl')));
|
|
72
|
+
await tap(p, '.vz-pri[data-k="resume"]');
|
|
73
|
+
ok('R2 Resume listens again on the same note, without asking for consent twice', await until(() => notesPosts(A.S).join() === 'new,record,pause,record') && !/Tell everyone first/.test(await text(p)));
|
|
74
|
+
|
|
75
|
+
/* R4 leaving while it records */
|
|
76
|
+
await until(async () => (await chip(p)) === 'Recording');
|
|
77
|
+
let dialog = null;
|
|
78
|
+
p.once('dialog', async (d) => { dialog = d.type(); await d.dismiss(); });
|
|
79
|
+
await p.evaluate(() => { location.href = '/premium-viewer.html?open=calendar'; }).catch(() => {});
|
|
80
|
+
ok('R4 leaving the page while it records makes the browser ask first, and staying pauses nothing', await until(() => dialog === 'beforeunload') && notesPosts(A.S).join() === 'new,record,pause,record', String(dialog));
|
|
81
|
+
|
|
82
|
+
/* R1 stop */
|
|
83
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-pri[data-k="stop"]')));
|
|
84
|
+
await tap(p, '.vz-pri[data-k="stop"]');
|
|
85
|
+
ok('R1 Stop asks first', await until(async () => /Stop for good/.test(await text(p))));
|
|
86
|
+
await tap(p, '[data-a="askno"]');
|
|
87
|
+
ok('R1 Not yet on the ask stops nothing', await until(async () => !/Stop for good/.test(await text(p))) && !notesPosts(A.S).includes('stop'));
|
|
88
|
+
await tap(p, '.vz-pri[data-k="stop"]');
|
|
89
|
+
await tap(p, '[data-a="stopgo"]');
|
|
90
|
+
ok('R1 Stop for good ends the meeting through the route, and the card says so', await until(async () => notesPosts(A.S).includes('stop') && /Stopped\. The final notes are written now/.test(await text(p))));
|
|
91
|
+
ok('R10 the notes writes sent were new, record, pause, record, stop and nothing else', notesPosts(A.S).join() === 'new,record,pause,record,stop', notesPosts(A.S).join());
|
|
192
92
|
await A.ctx.close();
|
|
193
93
|
|
|
194
|
-
/*
|
|
195
|
-
const
|
|
196
|
-
await
|
|
197
|
-
|
|
198
|
-
await
|
|
199
|
-
|
|
200
|
-
await
|
|
201
|
-
ok('
|
|
202
|
-
await
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
await
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
await
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
await
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
ok('
|
|
237
|
-
|
|
238
|
-
await
|
|
239
|
-
|
|
240
|
-
await
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
await
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
await
|
|
263
|
-
|
|
264
|
-
ok('
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
await
|
|
269
|
-
|
|
270
|
-
await
|
|
271
|
-
ok('
|
|
272
|
-
await
|
|
273
|
-
|
|
274
|
-
const g1 = Fc.focusGets; await sleep(4200);
|
|
275
|
-
ok('R5 leaving Focus stops the reads', Fc.focusGets === g1, `${g1} -> ${Fc.focusGets}`);
|
|
276
|
-
await Fc.ctx.close();
|
|
277
|
-
const Fe = await open({ focus: () => ({ ok: false, error: 'no such meeting on the calendar' }) });
|
|
278
|
-
await press(Fe.page, 'focus');
|
|
279
|
-
ok('R6 a refused read says why and shows nothing else', await until(() => Fe.page.evaluate(() => /Focus could not read this meeting: no such meeting on the calendar/.test(document.querySelector('#oMain').textContent))) && await Fe.page.evaluate(() => !document.querySelector('#oMain .m3-now') && !document.querySelector('#oMain .m3-tops')));
|
|
280
|
-
await Fe.ctx.close();
|
|
281
|
-
const Fb = await open({ focus: () => ({ ok: true, now_ms: Date.now(), event: { title: 'Live review', at: iso(START), end: iso(END) }, note: null, companion: { on: false } }) });
|
|
282
|
-
await press(Fb.page, 'focus');
|
|
283
|
-
const bt = await until(() => Fb.page.evaluate(() => /Leave focus/.test(document.querySelector('#oMain').textContent) && /companion is off/.test(document.querySelector('#oMain').textContent) ? document.querySelector('#oMain').textContent : ''));
|
|
284
|
-
ok('R6 an answer with nothing in it draws no topic, sentence, chip, line or count, and says the companion is off', /No topic is current yet/.test(bt) && /The meeting has no topics yet/.test(bt) && /The transcript starts when you record/.test(bt) && !/Captured so far/.test(bt) && await Fb.page.evaluate(() => !document.querySelector('#oMain .m3-say') && !document.querySelector('#oMain .m3-chp')), bt.slice(0, 300));
|
|
285
|
-
await Fb.ctx.close();
|
|
286
|
-
|
|
287
|
-
/* R7 Replay, on the page's own clock */
|
|
288
|
-
const Rp = await open();
|
|
289
|
-
const hasBtn = await until(() => Rp.page.evaluate(() => !!document.querySelector('[data-m3="replay"]')));
|
|
290
|
-
ok('R7 the Replay part has a Replay press when a recording is held', hasBtn);
|
|
291
|
-
await press(Rp.page, 'replay');
|
|
292
|
-
const rv = await until(() => Rp.page.evaluate(() => /Key points/.test(document.querySelector('#oMain').textContent) ? document.querySelector('#oMain').textContent : ''));
|
|
293
|
-
ok('R7 Replay shows the topic track, the key points, the transcript and says there is no audio', /0:00 \/ 5:00/.test(rv) && /Plan with eight people/.test(rv) && /We plan eight people/.test(rv) && /No audio is kept/.test(rv) && await Rp.page.evaluate(() => document.querySelectorAll('#oMain .m3-trk button.m3-stc').length === 2 && document.querySelectorAll('#oMain .m3-trk .m3-mk').length === 2), rv.slice(0, 200));
|
|
294
|
-
ok('R7 a key point with no time has no play press', await Rp.page.evaluate(() => { const r = [...document.querySelectorAll('#oMain .m3-kp0')]; return r.length === 1 && /Priya confirms the owner/.test(r[0].textContent) && !r[0].matches('button'); }));
|
|
295
|
-
await Rp.page.click('#oMain .m3-kps button');
|
|
296
|
-
ok('R7 a key point plays from its time and marks the line', await until(() => Rp.page.evaluate(() => /Pause/.test(document.querySelector('#rpPlay').textContent) && /^1:0\d \/ 5:00/.test(document.querySelector('#rpPos').textContent) && !!document.querySelector('#rl1.cur'))), await Rp.page.evaluate(() => document.querySelector('#rpPos').textContent));
|
|
297
|
-
ok('R7 the playhead keeps time on its own clock', await until(() => Rp.page.evaluate(() => /^1:0[2-9] \/ 5:00/.test(document.querySelector('#rpPos').textContent)), 5000));
|
|
298
|
-
await Rp.page.click('#oMain [data-m3="spd"][data-v="2"]'); await Rp.page.click('#oMain [data-m3="seek"][data-t="100000"]');
|
|
299
|
-
ok('R7 a stretch plays from its start and the topic follows the position', await until(() => Rp.page.evaluate(() => /Risks/.test(document.querySelector('#rpTopic').textContent) && !!document.querySelector('.m3-stc.on'))));
|
|
300
|
-
await Rp.page.click('#oMain [data-m3="seek"][data-t="130000"]');
|
|
301
|
-
ok('R7 a shot is shown only from the time it was kept, with its reason', await until(() => Rp.page.evaluate(() => !!document.querySelector('#rpShot img') && /A slide with the plan/.test(document.querySelector('#rpShot').textContent))));
|
|
302
|
-
await Rp.page.click('#oMain [data-m3="back10"]');
|
|
303
|
-
ok('R7 Back 10 s moves the playhead back', await Rp.page.evaluate(() => { const m = /^(\d+):(\d+)/.exec(document.querySelector('#rpPos').textContent); return m && (+m[1] * 60 + +m[2]) < 135; }));
|
|
304
|
-
await Rp.page.click('#oMain [data-m3="play"]');
|
|
305
|
-
ok('R7 Pause stops the playhead', await until(() => Rp.page.evaluate(() => document.querySelector('#rpPlay').textContent === 'Play')));
|
|
306
|
-
const gets = Rp.reqs.filter((r) => /meeting-replay/.test(r)).length;
|
|
307
|
-
await press(Rp.page, 'unreplay');
|
|
308
|
-
ok('R7 Back to the meeting returns to the Detail view and focus lands on Replay', await until(() => Rp.page.evaluate(() => !!document.querySelector('#m3Rec') && document.activeElement && document.activeElement.dataset.m3 === 'replay')));
|
|
309
|
-
await Rp.ctx.close();
|
|
310
|
-
/* R7 Replay, with audio */
|
|
311
|
-
const Ra = await open({ audio: true });
|
|
312
|
-
await press(Ra.page, 'replay');
|
|
313
|
-
await until(() => Ra.page.evaluate(() => /Plays the note’s audio/.test(document.querySelector('#oMain').textContent)));
|
|
314
|
-
await Ra.page.click('#rpPlay');
|
|
315
|
-
ok('R7 with audio the playhead follows the audio element', await until(() => Ra.page.evaluate(() => /^0:0[1-9] \/ 0:04/.test(document.querySelector('#rpPos').textContent)), 6000) && Ra.reqs.some((r) => /GET \/api\/notes\/recording/.test(r)), await Ra.page.evaluate(() => document.querySelector('#rpPos').textContent));
|
|
316
|
-
ok('R7 at the end it stops by itself', await until(() => Ra.page.evaluate(() => document.querySelector('#rpPlay').textContent === 'Play' && /^0:04/.test(document.querySelector('#rpPos').textContent)), 8000), await Ra.page.evaluate(() => document.querySelector('#rpPos').textContent));
|
|
317
|
-
await Ra.ctx.close();
|
|
318
|
-
|
|
319
|
-
/* R12 the rich Replay layout (prototype PR 901): a wide window, the time of day, marker lanes, PMOS notes, filters, key-point columns and Confirm all */
|
|
320
|
-
const RICH = { ...REPLAY, start_ms: new Date(2026, 9, 20, 10, 0, 0).getTime(), note: { id: 'n1', title: 'Live review notes', initiative: { id: 'premium-viewer', ws: 'w1', title: 'Premium viewer' } },
|
|
321
|
-
lines: REPLAY.lines.map((l) => (l.i === 1 ? { ...l, key: { k: 'decision', id: 'd1' } } : l)),
|
|
322
|
-
keys: [{ id: 'd1', k: 'decision', text: 'Plan with eight people', t: 61000, by: 'Priya', state: 'draft' }, { id: 'a1', k: 'action', text: 'Priya confirms the owner', t: 140000, owner: 'Priya', due: '2026-10-24', state: 'draft' }, { id: 'q1', k: 'question', text: 'Who signs off?', t: 200000, state: 'open' }],
|
|
323
|
-
notes: [{ t: 90000, cat: 'insight', body: 'The plan leans on one hire' }], gaps: [{ from_ms: 240000, to_ms: 260000 }] };
|
|
324
|
-
const Rw = await open({ replay: RICH });
|
|
325
|
-
// re-pointed for premium-agreed-design H2: on a desktop Home the docked chat is already full (dockOpen sets it), so Back restores the size and mode the dialog had before Replay
|
|
326
|
-
const preRp = await Rw.page.evaluate(() => { const g = document.getElementById('dlg'); return { full: g.classList.contains('full'), mode: g.dataset.mode || 'split' }; });
|
|
327
|
-
await press(Rw.page, 'replay');
|
|
328
|
-
await until(() => Rw.page.evaluate(() => !!document.querySelector('#rpKeys')));
|
|
329
|
-
ok('R12 Replay opens full width with the conversation panel hidden', await Rw.page.evaluate(() => { const g = document.getElementById('dlg'); return g.classList.contains('full') && g.classList.contains('rpw') && g.dataset.mode === 'detail'; }));
|
|
330
|
-
ok('R12 the header shows the time of day from the recording start', await Rw.page.evaluate(() => document.querySelector('#rpClk').textContent.trim() === '10:00'), await Rw.page.evaluate(() => document.querySelector('#rpClk').textContent));
|
|
331
|
-
ok('R12 the marker lane has one marker per timed key point and PMOS note, and an open question carries the needs-you ring', await Rw.page.evaluate(() => document.querySelectorAll('#oMain .rp-mk').length === 4 && !!document.querySelector('#oMain .rp-mk.question.need') && !!document.querySelector('#oMain .rp-mk.pm') && !!document.querySelector('#oMain .rp-gap')));
|
|
332
|
-
ok('R12 a key-point line is tagged in the conversation', await Rw.page.evaluate(() => !!document.querySelector('#rl1 .rp-kt')));
|
|
333
|
-
ok('R12 the key points sit in three columns with counts', await Rw.page.evaluate(() => { const c = [...document.querySelectorAll('#rpKeys .rp-col')]; return c.length === 3 && c.every((x) => /1/.test(x.querySelector('h4').textContent)); }));
|
|
334
|
-
await Rw.page.click('#oMain .rp-mk.pm');
|
|
335
|
-
ok('R12 a PMOS marker seeks to its note', await until(() => Rw.page.evaluate(() => /^1:30 \/ 5:00/.test(document.querySelector('#rpPos').textContent))), await Rw.page.evaluate(() => document.querySelector('#rpPos').textContent));
|
|
336
|
-
await Rw.page.click('#oMain [data-rp="tab"][data-v="p"]');
|
|
337
|
-
ok('R12 the PMOS tab lists only PMOS notes', await Rw.page.evaluate(() => { const l = document.querySelector('#rpLines'); return /The plan leans on one hire/.test(l.textContent) && !/Welcome everyone/.test(l.textContent); }));
|
|
338
|
-
await Rw.page.click('#oMain [data-rp="tab"][data-v="k"]');
|
|
339
|
-
ok('R12 the Key points tab lists only key-point lines', await Rw.page.evaluate(() => { const l = document.querySelector('#rpLines'); return /We plan eight people/.test(l.textContent) && !/Welcome everyone/.test(l.textContent); }));
|
|
340
|
-
await Rw.page.click('#oMain [data-rp="tab"][data-v="a"]');
|
|
341
|
-
await Rw.page.fill('#rpQ', 'risks');
|
|
342
|
-
ok('R12 the search narrows the conversation', await until(() => Rw.page.evaluate(() => { const l = document.querySelector('#rpLines'); return /Next the risks/.test(l.textContent) && !/Welcome everyone/.test(l.textContent); })));
|
|
343
|
-
await Rw.page.click('#rpKeys [data-rp="confirm"]');
|
|
344
|
-
ok('R12 Confirm all adds each next step to the note\'s initiative and marks it', await until(() => Rw.page.evaluate(() => /task made/.test(document.querySelector('#rpKeys').textContent))) && Rw.planPosts.length === 1 && Rw.planPosts[0].events[0].initiative === 'premium-viewer' && Rw.planPosts[0].events[0].title === 'Priya confirms the owner' && Rw.planPosts[0].events[0].stage === 's1' && Rw.planPosts[0].events[0].due === '2026-10-24', JSON.stringify(Rw.planPosts));
|
|
345
|
-
await press(Rw.page, 'unreplay');
|
|
346
|
-
ok('R12 Back restores the dialog size and the conversation panel', preRp.mode === 'split' && await until(() => Rw.page.evaluate((pre) => { const g = document.getElementById('dlg'); return g.classList.contains('full') === pre.full && !g.classList.contains('rpw') && g.dataset.mode === 'split'; }, preRp)), JSON.stringify(preRp));
|
|
347
|
-
await Rw.ctx.close();
|
|
348
|
-
const Rn = await open();
|
|
349
|
-
await press(Rn.page, 'replay');
|
|
350
|
-
await until(() => Rn.page.evaluate(() => !!document.querySelector('#rpKeys')));
|
|
351
|
-
await Rn.page.click('#rpKeys [data-rp="confirm"]');
|
|
352
|
-
ok('R12 with no initiative linked, Confirm all says so and writes nothing', await until(() => Rn.page.evaluate(() => /Link the note to an initiative first/.test(document.body.textContent))) && Rn.planPosts.length === 0);
|
|
353
|
-
await Rn.ctx.close();
|
|
354
|
-
|
|
355
|
-
/* R13 a long transcript (Wawan, 2026-10-21): each conversation row is as tall as its words, so no line draws over the next, under All and Key points, wide and on a phone */
|
|
356
|
-
const LONG = 'In active development. Okay. So IDP is one. This one I really, really have less kind of, kind of influence because now you are running it automation. I mean, you are running it yourself anyway, right? So I just receiving the information from you.';
|
|
357
|
-
const LR = { ...RICH, lines: Array.from({ length: 14 }, (_, i) => ({ i, t: 5000 + i * 15000, who: i % 3 ? 'You' : 'Dara', text: (i % 2 ? LONG : 'Short line ' + i) + (i % 4 === 1 ? ' ' + LONG : ''), ...(i % 2 ? { key: { k: 'decision', id: 'd1' } } : {}) })),
|
|
358
|
-
shots: Array.from({ length: 19 }, (_, i) => ({ t: 280000 + i * 1000, w: 10, h: 10, why: 'A slide' })) };
|
|
359
|
-
const shotDir13 = process.env.PMOS_SHOTS || '';
|
|
360
|
-
for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
|
|
361
|
-
const P = await open({ w, h, theme: th, replay: LR });
|
|
362
|
-
await press(P.page, 'replay'); await until(() => P.page.evaluate(() => !!document.querySelector('#rpLines .m3-ln')));
|
|
363
|
-
for (const tab of ['a', 'k']) {
|
|
364
|
-
await P.page.click(`#oMain [data-rp="tab"][data-v="${tab}"]`);
|
|
365
|
-
await P.page.click('#rpLines .m3-ln:nth-child(2)');
|
|
366
|
-
const r = await P.page.evaluate(() => {
|
|
367
|
-
const rows = [...document.querySelectorAll('#rpLines .m3-ln')];
|
|
368
|
-
const bad = [];
|
|
369
|
-
rows.forEach((b, i) => {
|
|
370
|
-
const box = b.getBoundingClientRect(), txt = b.querySelector('span').getBoundingClientRect();
|
|
371
|
-
if (txt.bottom > box.bottom + 0.5) bad.push('row ' + i + ' text spills ' + Math.round(txt.bottom - box.bottom) + ' px');
|
|
372
|
-
if (i && box.top < rows[i - 1].getBoundingClientRect().bottom - 0.5) bad.push('row ' + i + ' overlaps the one above');
|
|
373
|
-
});
|
|
374
|
-
return { n: rows.length, bad };
|
|
375
|
-
});
|
|
376
|
-
ok(`R13 at ${w} px (${th}), ${tab === 'a' ? 'All' : 'Key points'}: every row holds its words and none overlaps the next`, r.n > 0 && !r.bad.length, JSON.stringify(r));
|
|
377
|
-
if (tab === 'a') ok(`R13 at ${w} px (${th}) a long spoken line is shown whole, not cut`, await P.page.evaluate((t) => document.querySelector('#rl1').textContent.includes(t), LONG + ' ' + LONG));
|
|
378
|
-
if (shotDir13) await P.page.screenshot({ path: path.join(shotDir13, `replay-long-${tab}-${w}-${th}.png`) });
|
|
379
|
-
}
|
|
380
|
-
await P.ctx.close();
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/* R8 Topic on material */
|
|
384
|
-
const Tp = await open({ topics: ['Capacity', 'Risks'] });
|
|
385
|
-
await reveal(Tp.page, '#mmAdd'); await Tp.page.click('#mmAdd'); await until(() => Tp.page.evaluate(() => /Roadmap/.test(document.querySelector('#mmSug').textContent)));
|
|
386
|
-
await Tp.page.click('#mmSug [data-pick]');
|
|
387
|
-
ok('R8 the sheet offers a Topic choice from the route\'s topics, and the line names the topic when one is chosen', await until(() => Tp.page.evaluate(() => document.querySelectorAll('[data-topic]').length === 3)));
|
|
388
|
-
await Tp.page.click('[data-topic="2"]');
|
|
389
|
-
ok('R8 choosing a topic updates the line before the press', await until(() => Tp.page.evaluate(() => /under the topic “Risks”/.test(document.querySelector('#mmLine').textContent))));
|
|
390
|
-
await Tp.page.click('#mmDo');
|
|
391
|
-
ok('R8 Add posts the topic with the item', await until(() => Tp.matPosts.length === 1) && Tp.matPosts[0].topic === 'Risks', JSON.stringify(Tp.matPosts));
|
|
392
|
-
await Tp.ctx.close();
|
|
393
|
-
const Tn = await open();
|
|
394
|
-
await reveal(Tn.page, '#mmAdd'); await Tn.page.click('#mmAdd'); await until(() => Tn.page.evaluate(() => /Roadmap/.test(document.querySelector('#mmSug').textContent)));
|
|
395
|
-
await Tn.page.click('#mmSug [data-pick]');
|
|
396
|
-
ok('R8 with no topics the Topic choice is not drawn and no topic is sent', await Tn.page.evaluate(() => document.querySelectorAll('[data-topic]').length === 0));
|
|
397
|
-
await Tn.page.click('#mmDo'); await until(() => Tn.matPosts.length === 1);
|
|
398
|
-
ok('R8 an item added with no topic carries none', !('topic' in Tn.matPosts[0]));
|
|
399
|
-
await Tn.ctx.close();
|
|
400
|
-
|
|
401
|
-
/* R10 the guard: the real server refuses these writes from anything but this launch's page */
|
|
402
|
-
for (const [pth, body] of [['/api/notes/new', { meeting: { kind: 'event', title: 'x', start: iso(START) } }], ['/api/notes/record', { id: 'n-nothing' }], ['/api/notes/pause', { id: 'n-nothing' }], ['/api/notes/stop', { id: 'n-nothing' }], ['/api/meeting-focus/topic', { event: 'ev', action: 'set', topic: 'x' }]]) {
|
|
403
|
-
const res = await fetch(BASE + pth, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) });
|
|
404
|
-
ok(`R10 ${pth} without the launch nonce is refused`, res.status === 403, String(res.status));
|
|
405
|
-
}
|
|
406
|
-
ok('R10 no page error on the Briefing in any run', SESS.filter((x) => x.url === '/premium.html').every((x) => x.errors.length === 0), JSON.stringify(SESS.map((x) => x.errors).filter((e) => e.length)));
|
|
407
|
-
|
|
408
|
-
/* R11 floors and fidelity */
|
|
409
|
-
const live = { id: 'n1', title: 'Live review', state: 'recording', updated_at: new Date().toISOString(), meeting: { kind: 'event', event_id: 'ev-live', start: iso(START), title: 'Live review' } };
|
|
410
|
-
const shotDir = process.env.PMOS_SHOTS || '';
|
|
411
|
-
for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
|
|
412
|
-
const P = await open({ w, h, theme: th, notes: [live] });
|
|
413
|
-
await until(async () => /marked recording/.test((await chip(P.page)) || ''));
|
|
414
|
-
const fl = async (label) => P.page.evaluate(() => ({ scroll: document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelector('#oMain').scrollWidth <= document.querySelector('#oMain').clientWidth + 1,
|
|
415
|
-
btn: [...document.querySelectorAll('#dlg [data-m3], #recChip button, #dlg .mtg-b, #dlg .cta')].filter((b) => b.offsetParent).map((b) => Math.min(b.getBoundingClientRect().width, b.getBoundingClientRect().height)) }));
|
|
416
|
-
const settled = async () => (await until(async () => { const r = await fl(); return r.btn.every((n) => n >= 43.5) ? r : null; }, 3000)) || fl();
|
|
417
|
-
const f0 = await settled();
|
|
418
|
-
if (shotDir) await P.page.screenshot({ path: path.join(shotDir, `detail-${w}-${th}.png`) });
|
|
419
|
-
await press(P.page, 'focus'); await until(() => P.page.evaluate(() => /Risks/.test(document.querySelector('#oMain').textContent)));
|
|
420
|
-
await P.page.click('#oMain [data-m3="chg"]');
|
|
421
|
-
const f1 = await settled();
|
|
422
|
-
if (shotDir) await P.page.screenshot({ path: path.join(shotDir, `focus-${w}-${th}.png`) });
|
|
423
|
-
await press(P.page, 'unfocus'); await press(P.page, 'replay'); await until(() => P.page.evaluate(() => /Key points/.test(document.querySelector('#oMain').textContent)));
|
|
424
|
-
await P.page.click('#oMain [data-m3="seek"][data-t="130000"]'); await until(() => P.page.evaluate(() => !!document.querySelector('#rpShot img')));
|
|
425
|
-
const f2 = await settled();
|
|
426
|
-
if (shotDir) await P.page.screenshot({ path: path.join(shotDir, `replay-${w}-${th}.png`) });
|
|
427
|
-
ok(`R11 at ${w} px (${th}) the detail, Focus and Replay have no sideways scroll and every press is at least 44 px`, f0.scroll && f1.scroll && f2.scroll && [f0, f1, f2].every((f) => f.btn.length && f.btn.every((n) => n >= 43.5)), JSON.stringify([f0, f1, f2]).slice(0, 400));
|
|
428
|
-
await P.ctx.close();
|
|
429
|
-
}
|
|
430
|
-
const mk = await browser.newContext({ viewport: { width: 1280, height: 900 } }); const mp = await mk.newPage();
|
|
431
|
-
await mp.setContent(MOCKUP); await CT.applyToPage(mp, CT_VENDOR); await mp.waitForTimeout(500);
|
|
432
|
-
const chipCss = (pg) => pg.evaluate(() => { const c = document.querySelector('.recchip, #recChip'); if (!c) return null; const k = getComputedStyle(c); const b = c.querySelector('button'); const bs = b ? getComputedStyle(b) : null; return [k.position, k.borderRadius, k.fontSize, k.fontWeight, k.display, bs && bs.borderRadius, bs && bs.fontWeight].join('|'); });
|
|
433
|
-
const chipM = await mp.evaluate(() => { const c = document.querySelector('#recChip'); c.hidden = false; c.innerHTML = '<i></i><span>Recording x</span><button>Open</button><button>Stop</button>'; const k = getComputedStyle(c), b = getComputedStyle(c.querySelector('button')); return [k.position, k.borderRadius, k.fontSize, k.fontWeight, k.display, b.borderRadius, b.fontWeight].join('|'); });
|
|
434
|
-
const Fx = await open({ notes: [live] }); await until(async () => /marked recording/.test((await chip(Fx.page)) || ''));
|
|
435
|
-
const chipP = await chipCss(Fx.page);
|
|
436
|
-
ok('R11 fidelity: the chip keeps the mockup\'s position, pill radius, type and button radius', chipM && chipP && chipM === chipP, chipM + ' vs ' + chipP);
|
|
437
|
-
const trkM = await mp.evaluate(() => { const d = document.createElement('div'); d.innerHTML = '<div class="trk2"><button class="stc on">1</button></div>'; document.body.appendChild(d); const c = getComputedStyle(d.querySelector('.stc')); return [c.borderRadius, c.fontWeight, c.fontSize].join('|'); });
|
|
438
|
-
await press(Fx.page, 'focus'); await until(() => Fx.page.evaluate(() => !!document.querySelector('.m3-stc')));
|
|
439
|
-
const trkP = await Fx.page.evaluate(() => { const c = getComputedStyle(document.querySelector('.m3-stc')); return [c.borderRadius, c.fontWeight, c.fontSize].join('|'); });
|
|
440
|
-
ok('R11 fidelity: a topic stretch keeps the mockup\'s radius, weight and size', trkM === trkP, trkM + ' vs ' + trkP);
|
|
441
|
-
const consM = await mp.evaluate(() => { const d = document.createElement('div'); d.innerHTML = '<div class="cons"></div>'; document.body.appendChild(d); const c = getComputedStyle(d.firstChild); return [c.borderRadius, c.display].join('|'); });
|
|
442
|
-
await press(Fx.page, 'unfocus'); await press(Fx.page, 'stop');
|
|
443
|
-
const consP = await Fx.page.evaluate(() => { const c = getComputedStyle(document.querySelector('.m3-cons')); return [c.borderRadius, c.display].join('|'); });
|
|
444
|
-
// re-pointed for premium-agreed-design: the Agreed design's inner radius is cozy-viewer.css's --r-in (16 px), not the mockup's 18 px; the layout is still the mockup's
|
|
445
|
-
const rIn = await Fx.page.evaluate(() => getComputedStyle(document.querySelector('.m3-cons')).getPropertyValue('--r-in').trim());
|
|
446
|
-
ok('R11 fidelity: the ask card keeps the mockup\'s layout and the Agreed design\'s inner radius', !!consP && /px$/.test(rIn) && consP.split('|')[1] === consM.split('|')[1] && consP.split('|')[0] === rIn, consM + ' vs ' + consP + ' (--r-in ' + rIn + ')');
|
|
447
|
-
await Fx.ctx.close(); await mk.close();
|
|
448
|
-
|
|
94
|
+
/* R4 leaving anyway pauses the note */
|
|
95
|
+
const L = await open(LIVE_URL);
|
|
96
|
+
await until(() => L.page.evaluate(() => !!document.querySelector('#czViewer [data-a="record"]')), 15000);
|
|
97
|
+
await L.page.click('#czViewer [data-a="record"]');
|
|
98
|
+
await tap(L.page, '[data-a="recgo"]');
|
|
99
|
+
await until(async () => (await chip(L.page)) === 'Recording');
|
|
100
|
+
await L.page.evaluate(() => dispatchEvent(new PageTransitionEvent('pagehide', { persisted: false }))); // the page leaving: what the browser fires once the PM leaves anyway
|
|
101
|
+
ok('R4 leaving anyway sends the pause for that note', await until(() => L.S.posts.some((x) => x.path === '/api/notes/pause' && x.body.id === 'new1')), notesPosts(L.S).join());
|
|
102
|
+
await L.ctx.close();
|
|
103
|
+
|
|
104
|
+
/* R2 honest state */
|
|
105
|
+
const E = await open(LIVE_URL);
|
|
106
|
+
await E.page.route('**/api/notes/new', (r) => json(r, { ok: false, error: 'the notes folder is read-only' }, 409));
|
|
107
|
+
await until(() => E.page.evaluate(() => !!document.querySelector('#czViewer [data-a="record"]')), 15000);
|
|
108
|
+
await tap(E.page, '[data-a="record"]'); await tap(E.page, '[data-a="recgo"]');
|
|
109
|
+
ok('R2 a refused note shows the server\'s reason', await until(async () => /the notes folder is read-only/.test(await text(E.page))));
|
|
110
|
+
await E.page.unroute('**/api/notes/new');
|
|
111
|
+
await E.page.route(/\/api\/notes\/record$/, (r) => json(r, { ok: false, error: 'the microphone is in use' }, 409));
|
|
112
|
+
await tap(E.page, '[data-a="record"]'); await tap(E.page, '[data-a="recgo"]');
|
|
113
|
+
ok('R2 a refused listen shows the reason and holds nothing', await until(async () => /the microphone is in use/.test(await text(E.page))) && await E.page.evaluate(() => !window.__premiumHolding));
|
|
114
|
+
await E.ctx.close();
|
|
115
|
+
const O = await open(LIVE_URL, { noLive: false });
|
|
116
|
+
await until(() => O.page.evaluate(() => !!document.querySelector('#czViewer .vz-mtg')), 15000);
|
|
117
|
+
const n0 = O.S.posts.length;
|
|
118
|
+
const res = await O.page.evaluate(() => window.__pmRecCore.record({ id: 'ev-rail', title: 'Rail review', at: new Date().toISOString() }));
|
|
119
|
+
ok('R2 only one meeting records at a time: a second says which one records', res && res.ok === false && /Design crit is recording/.test(res.error) && O.S.posts.length === n0, JSON.stringify(res));
|
|
120
|
+
await O.ctx.close();
|
|
121
|
+
|
|
122
|
+
/* R5 Focus */
|
|
123
|
+
const B = await open('/premium-viewer.html?open=meeting¬e=n2', { noLive: false, init: () => { window.__premiumHolding = { id: 'n2' }; } });
|
|
124
|
+
const q = B.page;
|
|
125
|
+
await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-a="more"]')), 15000);
|
|
126
|
+
await tap(q, '[data-a="more"]'); await tap(q, '[data-a="m-focus"]');
|
|
127
|
+
ok('R5 Focus opens its plain view, marked Waiting for design: the state, the topic now, the topics and the counts', await until(async () => { const t = await text(q); return !!(await q.$('#czViewer [data-cz-placeholder="Focus"]')) && /Now\s+The Issue button/.test(t) && /One toolbar row/.test(t) && /Phone layout/.test(t) && /Captured: 1 decisions · 2 next steps · 0 questions/.test(t); }), (await text(q)).slice(0, 600));
|
|
128
|
+
const f0 = B.S.gets.filter((g) => g.startsWith('/api/meeting-focus')).length;
|
|
129
|
+
ok('R5 Focus reads again every 3 seconds while it is open', await until(() => B.S.gets.filter((g) => g.startsWith('/api/meeting-focus')).length >= f0 + 2, 9000));
|
|
130
|
+
await q.$eval('#czViewer [data-f="topic"][data-t="Phone layout"]', (b) => b.click());
|
|
131
|
+
const tp = await until(() => B.S.posts.find((x) => x.path === '/api/meeting-focus/topic'));
|
|
132
|
+
ok('R5 Make it the topic posts one set for that topic on this meeting', tp && tp.body.event === 'ev-live' && tp.body.action === 'set' && tp.body.topic === 'Phone layout', JSON.stringify(B.S.posts) + (await text(q)).slice(0, 300));
|
|
133
|
+
await tap(q, '[data-a="back"]');
|
|
134
|
+
const f1 = B.S.gets.filter((g) => g.startsWith('/api/meeting-focus')).length;
|
|
135
|
+
await q.waitForTimeout(3500); // one Focus period: no read may follow once Focus is left
|
|
136
|
+
ok('R5 leaving Focus stops its reads', B.S.gets.filter((g) => g.startsWith('/api/meeting-focus')).length <= f1 + 1, String(B.S.gets.filter((g) => g.startsWith('/api/meeting-focus')).length - f1));
|
|
137
|
+
/* R6 a refused read */
|
|
138
|
+
await q.route('**/api/meeting-focus?*', (r) => json(r, { ok: false, error: 'the companion is off' }, 503));
|
|
139
|
+
await tap(q, '[data-a="more"]'); await tap(q, '[data-a="m-focus"]');
|
|
140
|
+
ok('R6 a refused read says why and shows nothing else', await until(async () => /Focus could not read this meeting/.test(await text(q)) && !(await q.$('#czViewer [data-f="topic"]'))), (await text(q)).slice(0, 400));
|
|
141
|
+
await B.ctx.close();
|
|
142
|
+
|
|
143
|
+
/* R7 Replay */
|
|
144
|
+
const C = await open('/premium-viewer.html?open=meeting¬e=n1');
|
|
145
|
+
const r = C.page;
|
|
146
|
+
ok('R7 a kept recording has Replay', await until(() => r.evaluate(() => !!document.querySelector('#czViewer [data-a="replay"]')), 15000));
|
|
147
|
+
await tap(r, '[data-a="replay"]');
|
|
148
|
+
ok('R7 Replay opens the notes with the track and plays', await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vz-trk') && document.querySelector('#czViewer [data-a="play"]').dataset.on === 'true')));
|
|
149
|
+
const pos = () => r.evaluate(() => (document.querySelector('#czViewer [data-clk="pos"]') || {}).textContent || '');
|
|
150
|
+
const p0 = await pos();
|
|
151
|
+
ok('R7 the playhead keeps time on its own clock', await until(async () => (await pos()) !== p0 && /^00:0[1-9] of 31:05/.test(await pos()), 5000), await pos());
|
|
152
|
+
await tap(r, '[data-a="play"]');
|
|
153
|
+
const p1 = await pos();
|
|
154
|
+
await r.waitForTimeout(600); // longer than the playhead's 250 ms step: a paused playhead does not move
|
|
155
|
+
ok('R7 Pause stops the playhead', (await pos()) === p1 && await r.evaluate(() => document.querySelector('#czViewer [data-a="play"]').dataset.on === 'false'), p1 + ' / ' + await pos());
|
|
156
|
+
await r.$eval('#czViewer [data-a="seekto"]', (b) => b.click());
|
|
157
|
+
ok('R7 a shot plays from its time, with the topic of that time', await until(async () => /^03:1\d of 31:05 · Viewer beside the chat/.test(await pos())), await pos());
|
|
158
|
+
await tap(r, '[data-a="play"]');
|
|
159
|
+
/* R12 the full Replay view */
|
|
160
|
+
await tap(r, '[data-a="more"]'); // Full replay is in the ⋯ menu: the Agreed mockup's replay well has no row for it
|
|
161
|
+
await tap(r, '[data-a="m-replay"]');
|
|
162
|
+
ok('R12 Full replay opens its plain view, marked Waiting for design, with every line', await until(async () => !!(await r.$('#czViewer [data-cz-placeholder="Full Replay view"]')) && /\d+ lines\. Press a line to play from it\./.test(await text(r)) && /Saved views move in their own work-item\./.test(await text(r))), (await text(r)).slice(0, 300));
|
|
163
|
+
await r.$eval('#czViewer [data-f="at"][data-t="760000"]', (b) => b.click());
|
|
164
|
+
ok('R12 a line plays from its time, back in the card', await until(async () => /^12:[45]\d of 31:05/.test(await pos()) && !(await r.$('#czViewer [data-a="back"]'))), await pos());
|
|
165
|
+
await C.ctx.close();
|
|
166
|
+
|
|
167
|
+
/* R11 floors */
|
|
168
|
+
const D = await open('/premium-viewer.html?open=meeting¬e=n2', { noLive: false, w: 390, h: 844, init: () => { window.__premiumHolding = { id: 'n2' }; } });
|
|
169
|
+
await until(() => D.page.evaluate(() => !!document.querySelector('#czViewer .vz-bar')), 15000);
|
|
170
|
+
const fl = await D.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, chip: !!document.querySelector('#recChip, #recCtl') }));
|
|
171
|
+
ok('R11 at 390 px the live card has no sideways scroll and no floating record chip', fl.over <= 0 && !fl.chip, JSON.stringify(fl));
|
|
172
|
+
await D.ctx.close();
|
|
173
|
+
ok('R10 no page error in any run', ALL.every((x) => x.errors.length === 0), JSON.stringify(ALL.map((x) => x.errors).filter((e) => e.length)));
|
|
449
174
|
return finish();
|
|
450
175
|
})().catch((e) => { console.error(e); finish(1); });
|