create-pmos 0.401.0 → 0.403.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 -30
- 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/board-programs-test.js +227 -0
- package/workspace/board-shot.js +54 -0
- package/workspace/briefing-premium-adddoc-test.js +28 -22
- package/workspace/briefing-premium-board-test.js +107 -82
- package/workspace/briefing-premium-calendar-2-test.js +23 -10
- package/workspace/briefing-premium-calendar-3-test.js +23 -19
- package/workspace/briefing-premium-calendar-test.js +20 -15
- package/workspace/briefing-premium-initiative-test.js +25 -12
- package/workspace/briefing-premium-insights-test.js +31 -18
- package/workspace/briefing-premium-metrics-test.js +8 -8
- package/workspace/briefing-premium-sources-test.js +15 -10
- package/workspace/briefing-premium-test.js +39 -16
- package/workspace/changelog.json +24 -0
- package/workspace/fixtures/board-premium-facts.js +20 -3
- package/workspace/fixtures/briefing-premium-facts.js +18 -2
- package/workspace/fixtures/premium-viewer-fixtures.js +24 -2
- package/workspace/fixtures/program-ascent.js +101 -0
- package/workspace/guide/home.md +11 -7
- package/workspace/guide/index.md +1 -0
- package/workspace/guide/jira.md +38 -6
- package/workspace/guide/programs.md +37 -0
- package/workspace/home-rows-test.js +184 -0
- package/workspace/lib/briefing-premium-products.js +4 -4
- package/workspace/lib/briefing-premium.js +2 -2
- package/workspace/lib/calendar-layers.js +8 -4
- package/workspace/lib/initiative-layout.js +4 -3
- package/workspace/lib/jira-cli.js +17 -12
- package/workspace/lib/jira-status.js +1 -1
- package/workspace/lib/jira-tickets.js +126 -24
- package/workspace/lib/meeting-files.js +58 -0
- package/workspace/lib/meeting-learn.js +139 -0
- package/workspace/lib/meeting-material.js +12 -5
- package/workspace/lib/notes.js +3 -0
- package/workspace/lib/programs.js +129 -0
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-brief-page.js +8 -1
- package/workspace/lib/routes-briefing-premium.js +1 -1
- package/workspace/lib/routes-calendar-views.js +24 -3
- package/workspace/lib/routes-meeting-material.js +38 -0
- package/workspace/lib/routes-meeting-points.js +23 -3
- package/workspace/lib/routes-programs.js +122 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +31 -25
- package/workspace/premium-chat-context-test.js +1 -1
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-viewer-test.js +1 -1
- package/workspace/premium-core-doc-issue-test.js +13 -7
- package/workspace/premium-discuss-landing-test.js +83 -0
- package/workspace/premium-link-suggest-test.js +103 -0
- package/workspace/premium-report-read-test.js +86 -82
- package/workspace/premium-vw-backlog-test.js +6 -5
- package/workspace/premium-vw-cal-test.js +45 -19
- package/workspace/premium-vw-item-test.js +8 -6
- package/workspace/premium-vw-jira-test.js +3 -2
- package/workspace/premium-vw-meet-test.js +122 -66
- package/workspace/premium-vw-notes-test.js +7 -6
- package/workspace/premium-vw-rec-test.js +14 -13
- package/workspace/premium-vw-slides-test.js +11 -5
- package/workspace/program-panel-test.js +152 -0
- package/workspace/public/pm/bd-acts.js +24 -15
- package/workspace/public/pm/bd-asks.js +111 -30
- package/workspace/public/pm/bd-ini-panel.js +229 -0
- package/workspace/public/pm/bd-pop.js +2 -2
- package/workspace/public/pm/bd-prog-panel.js +436 -0
- package/workspace/public/pm/bd-prog.js +191 -0
- package/workspace/public/pm/bd-span.js +98 -15
- package/workspace/public/pm/bd-views.js +93 -29
- package/workspace/public/pm/cozy-board.css +214 -20
- package/workspace/public/pm/cozy-evui.js +4 -2
- package/workspace/public/pm/cozy-home-rows.css +54 -0
- package/workspace/public/pm/cozy-home.css +35 -0
- package/workspace/public/pm/cozy-insights.css +1 -2
- package/workspace/public/pm/cozy-mtg-present.css +160 -0
- package/workspace/public/pm/cozy-panel.css +155 -0
- package/workspace/public/pm/cozy-rec-pill.css +12 -0
- package/workspace/public/pm/cozy-rec-pill.js +46 -0
- package/workspace/public/pm/cozy-today.css +189 -0
- package/workspace/public/pm/cozy-viewer.js +307 -43
- package/workspace/public/pm/cozy-vw-mtg.css +96 -94
- package/workspace/public/pm/cozy-vw-rp.css +40 -25
- package/workspace/public/pm/cozy-vw-shell.css +127 -0
- package/workspace/public/pm/cozy-xv.css +51 -0
- package/workspace/public/pm/cozy-xv.js +34 -0
- package/workspace/public/pm/home-app.js +192 -72
- package/workspace/public/pm/home-chat.js +17 -4
- package/workspace/public/pm/home-data.js +1 -1
- package/workspace/public/pm/home-day.js +64 -0
- package/workspace/public/pm/home-ini-model.js +1 -1
- package/workspace/public/pm/home-ini.js +197 -54
- package/workspace/public/pm/home-list.js +100 -27
- package/workspace/public/pm/home-mentions.js +187 -0
- package/workspace/public/pm/home-rec-row.js +67 -0
- package/workspace/public/pm/home-review.js +20 -10
- package/workspace/public/pm/home-task.js +19 -18
- package/workspace/public/pm/home-today.js +137 -59
- package/workspace/public/pm/premium-board.js +294 -288
- package/workspace/public/pm/premium-insights.js +118 -82
- package/workspace/public/pm/premium-mtg-present.js +408 -100
- package/workspace/public/pm/premium-mtg-replay.js +70 -10
- package/workspace/public/pm/premium-report-read.js +118 -63
- package/workspace/public/pm/premium-vw-cal.js +62 -34
- package/workspace/public/pm/premium-vw-mtg.js +348 -192
- package/workspace/public/pm/program-model.js +192 -0
- package/workspace/public/pm/rec-state.js +63 -0
- package/workspace/public/pm/rp-parts.js +33 -8
- package/workspace/public/pm/tk-draft.js +107 -0
- package/workspace/public/pm/tk-model.js +134 -0
- package/workspace/public/pm/tk-send.js +124 -0
- package/workspace/public/pm/tk-tasks.css +120 -0
- package/workspace/public/premium-board.html +4 -2
- package/workspace/server.js +4 -2
- package/workspace/skills/jira-push.skill +3 -3
- package/workspace/test-lists/board-programs.json +9 -0
- package/workspace/test-lists/prd-to-jira.json +6 -0
- package/workspace/test-lists/program-hierarchy.json +11 -0
- package/workspace/test-lists/program-panel.json +9 -0
- package/workspace/test-lists/viewer-home-rows.json +9 -0
- package/workspace/test-lists/viewer-meetings.json +9 -0
- package/workspace/test-lists/viewer-shell-a.json +15 -0
- package/workspace/tk-tasks-test.js +199 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
|
-
/* premium-vw-meet-test.js — the meeting in the Viewer
|
|
4
|
-
*
|
|
3
|
+
/* premium-vw-meet-test.js — the meeting in the Viewer (initiative premium-viewer, R3; re-pointed for premium-agreed-design, premium-uncovered-features
|
|
4
|
+
* and the Viewer kit build, meetings: XvAPrep, XvALive, XvAReplay, XvAReplayEdit, XvAMaterial, XvAMaterialPreview, XvAPresent).
|
|
5
5
|
* Serves the real /premium-viewer.html from the real server; the notes, the calendar, Focus, the replay and the viewer-meeting record are answered
|
|
6
6
|
* by stand-ins (fixtures/premium-viewer-fixtures.js), so each press can be read off the request the page sent. The routes' own behaviour is in
|
|
7
|
-
* their own suites; the pure half is in premium-vw-
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* S1
|
|
7
|
+
* their own suites; the pure half is in premium-vw-agreed.test.js, premium-uncovered-meetings.test.js and viewer-meetings.test.js.
|
|
8
|
+
* Viewer shell A: one summary first (its state line, the words, one quiet meta line, one primary or the icon-only presses), then folds; no tabs.
|
|
9
|
+
* ⋯ in the header holds what is used less (What it is about, the meetings before and after, Copy, New meeting, the source, shots, series, Private).
|
|
10
|
+
* S1 summary first · S2 header and ⋯ · S3 After: replay, folds, Transcript · S4 Make task and Becomes V.4 · S5 a correction and what PMOS learns
|
|
11
|
+
* S6 Before (prep): Record, agenda minutes, material preview and ←, Present and the audience window, Add material, Upload a file
|
|
12
|
+
* S7 During · S8 series membership · S9 writes · S10 no note · S11 floors
|
|
11
13
|
* Every wait polls the page; no fixed sleep stands in for a state. */
|
|
12
14
|
const path = require('path');
|
|
13
15
|
const { spawn } = require('child_process');
|
|
@@ -38,47 +40,47 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
38
40
|
await T.waitForServer(BASE);
|
|
39
41
|
browser = await chromium.launch({ executablePath: exe });
|
|
40
42
|
const body = (p) => p.evaluate(() => (document.querySelector('#czViewer .cz-vw-body') || {}).innerText || '');
|
|
41
|
-
const tabs = (p) => p.evaluate(() => [...document.querySelectorAll('#czViewer .vzm-tabs [data-a="tab"]')].map((x) => x.dataset.k + (x.getAttribute('aria-selected') === 'true' ? '*' : '')).join());
|
|
42
43
|
const press = (p, sel) => p.$eval('#czViewer ' + sel, (b) => b.click());
|
|
44
|
+
const folds = (p) => p.evaluate(() => [...document.querySelectorAll('#czViewer [data-czs-fold]')].map((x) => x.dataset.czsFold + (x.getAttribute('aria-expanded') === 'true' ? '*' : '')).join());
|
|
45
|
+
const unfold = async (p, id) => { if (await p.evaluate((k) => document.querySelector(`#czViewer [data-czs-fold="${k}"]`).getAttribute('aria-expanded') !== 'true', id)) await press(p, `[data-czs-fold="${id}"]`); };
|
|
46
|
+
const sum = (p) => p.evaluate(() => { const s = document.querySelector('#czViewer .czs-sum'); return s ? { line: s.querySelector('.czs-line').innerText, text: (s.querySelector('.czs-p') || {}).innerText || '', meta: (s.querySelector('.czs-meta') || {}).innerText || '', pri: (s.querySelector('[data-czs-act]') || {}).textContent || '' } : null; });
|
|
43
47
|
|
|
44
|
-
/* an ended meeting with notes */
|
|
48
|
+
/* an ended meeting with notes and a recording */
|
|
45
49
|
const A = await F.open(browser, BASE, '/premium-viewer.html?open=meeting¬e=n1');
|
|
46
50
|
const p = A.page;
|
|
47
|
-
const up = await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="notes"]') &&
|
|
48
|
-
ok('0 the meeting opens in the Viewer
|
|
51
|
+
const up = await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="notes"]') && !!document.querySelector('#czViewer .czs-sum')), 15000);
|
|
52
|
+
ok('0 the meeting opens in the Viewer on its own page', up);
|
|
49
53
|
if (!up) return finish(1);
|
|
50
54
|
|
|
51
|
-
/* S1
|
|
52
|
-
|
|
53
|
-
ok('S1
|
|
54
|
-
ok('S1 the
|
|
55
|
+
/* S1 summary first */
|
|
56
|
+
const s1 = await sum(p);
|
|
57
|
+
ok('S1 the summary: "N of M points kept · K to confirm", the overview, and one primary, Confirm K', /^\d+ of \d+ points kept · (\d+) to confirm$/.test(s1.line) && /opens next to the chat/.test(s1.text) && s1.pri === 'Confirm ' + s1.line.match(/(\d+) to confirm/)[1], JSON.stringify(s1));
|
|
58
|
+
ok('S1 the summary is the body\'s first child, before the replay card and the folds', await p.evaluate(() => document.querySelector('#czViewer .cz-vw-body').firstElementChild.classList.contains('czs-sum') && !!document.querySelector('#czViewer .vzp-card .vzp-pl')));
|
|
59
|
+
ok('S1 then the folds: All kept, Next steps, Since the last one, Facts, Prep and material, Transcript; no tabs', (await folds(p)).replace(/\*/g, '') === 'kept,steps,since,facts,prep,tr' && !(await p.$('#czViewer [role="tablist"]')), await folds(p));
|
|
60
|
+
ok('S1 no Detail or Conversation switch, no #dlg; the note was read from GET /api/notes/one', await p.evaluate(() => !document.querySelector('#dlg, #dTabs, .stream')) && A.S.gets.some((g) => g.startsWith('/api/notes/one?id=n1')));
|
|
55
61
|
|
|
56
|
-
/* S2 the
|
|
57
|
-
const
|
|
58
|
-
ok('S2 the
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const menu = await until(() => p.evaluate(() => { const b = [...document.querySelectorAll('#czViewer [role="menu"] [data-a]')]; return b.length ? b.map((x) => x.dataset.a) : null; }));
|
|
62
|
-
ok('S2 ⋯ holds Copy as Markdown, New meeting, What Record and Focus do', menu && menu.join() === 'm-copy,m-fresh,m-why', JSON.stringify(menu));
|
|
63
|
-
ok('S2 each menu item has a sub-line', await p.evaluate(() => [...document.querySelectorAll('#czViewer [role="menu"] [data-a]')].every((b) => b.innerText.split('\n').length >= 2)));
|
|
62
|
+
/* S2 the header and ⋯ */
|
|
63
|
+
const hd = await p.evaluate(() => ({ kind: document.querySelector('#czViewer .cz-vw-kind').textContent, title: document.querySelector('#czViewer .cz-vw-title').textContent, about: document.querySelector('#czViewer .czs-sum [data-a="m-about"]').textContent }));
|
|
64
|
+
ok('S2 the header: Meeting notes, the title with its day and time; the meta line: About Viewer, 31 min, the people, 4 of 4 in the series', hd.kind === 'Meeting notes' && /^Viewer sync · today \d{2}:\d{2}$/.test(hd.title) && /Viewer/.test(hd.about) && /31 min/.test(s1.meta) && /Ana, Dita, Wawan/.test(s1.meta) && /4 of 4 in the series/.test(s1.meta), JSON.stringify([hd, s1.meta]));
|
|
65
|
+
const m1 = await F.more(p);
|
|
66
|
+
ok('S2 ⋯ holds Change what it is about, the meeting before, Copy as Markdown, New meeting, What Record and Focus do, Not part of this series', m1 && m1.slice(0, 6).join('|') === 'Change what it is about|The meeting before · Thu 15 Oct|Copy as Markdown|New meeting|What Record and Focus do|Not part of this series', JSON.stringify(m1));
|
|
64
67
|
await p.context().grantPermissions(['clipboard-read', 'clipboard-write']).catch(() => {});
|
|
65
|
-
await
|
|
68
|
+
await F.more(p, 'Copy as Markdown');
|
|
66
69
|
const clip = await until(() => p.evaluate(() => navigator.clipboard.readText().catch(() => '')));
|
|
67
70
|
ok('S2 Copy as Markdown copies the notes', /^# Viewer sync/.test(clip || '') && /Diffs can be approved/.test(clip || ''), String(clip).slice(0, 200));
|
|
68
71
|
|
|
69
72
|
/* S3 After */
|
|
73
|
+
await unfold(p, 'since'); await unfold(p, 'facts');
|
|
70
74
|
const after = await body(p);
|
|
71
|
-
ok('S3
|
|
72
|
-
ok('S3
|
|
73
|
-
await press(p, '[data-a="
|
|
74
|
-
ok('S3 the Replay tab has the screen thumbnails, with no Waiting for design marker', await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzp-th').length === 3 && !document.querySelector('#czViewer [data-cz-placeholder]'))));
|
|
75
|
-
await press(p, '.vzp-th[data-a="seekto"]');
|
|
75
|
+
ok('S3 Since the last one and Facts mentioned, Matches and Not checked', /Raised again/.test(after) && /Matches/.test(after) && /Not checked/.test(after), after.slice(0, 600));
|
|
76
|
+
ok('S3 the replay card has the screen thumbnails, with no Waiting for design marker', await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzp-card .vzp-th').length > 0 && !document.querySelector('#czViewer [data-cz-placeholder]'))));
|
|
77
|
+
await press(p, '.vzp-card .vzp-th[data-a="seekto"]');
|
|
76
78
|
ok('S3 a thumbnail moves the replay to its time', await until(() => p.evaluate(() => /^03:10/.test((document.querySelector('#czViewer [data-clk="pos"]') || {}).textContent || ''))), await p.evaluate(() => (document.querySelector('#czViewer [data-clk="pos"]') || {}).textContent));
|
|
77
|
-
await
|
|
78
|
-
ok('S3 the Transcript
|
|
79
|
-
await press(p, '[data-a="tab"][data-k="notes"]');
|
|
79
|
+
await unfold(p, 'tr');
|
|
80
|
+
ok('S3 the Transcript fold shows the lines, Dita named', await until(async () => /The Viewer sits beside the chat now/.test(await body(p)) && /Dita/.test(await body(p))));
|
|
80
81
|
|
|
81
82
|
/* S4 Make task: a work-item becomes V.4 Drafted in PMOS */
|
|
83
|
+
await unfold(p, 'steps');
|
|
82
84
|
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-a="makewi"][data-i="0"]')));
|
|
83
85
|
ok('S4 each step offers Make task and an icon-only work-item press', await p.evaluate(() => !!document.querySelector('#czViewer [data-a="maketask"][data-i="0"]') && !document.querySelector('#czViewer [data-a="makewi"][data-i="0"]').textContent.trim()));
|
|
84
86
|
await press(p, '[data-a="makewi"][data-i="0"]');
|
|
@@ -87,66 +89,120 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
87
89
|
await press(p, '[data-a="maketask"][data-i="1"]');
|
|
88
90
|
ok('S4 Make task writes one plan item for the step', await until(() => A.S.posts.some((x) => x.path === '/api/plan-items' && JSON.stringify(x.body).includes('Move saved views'))));
|
|
89
91
|
|
|
90
|
-
/*
|
|
91
|
-
await
|
|
92
|
-
|
|
93
|
-
await
|
|
94
|
-
|
|
92
|
+
/* S5 a correction, and what PMOS learns (XvAReplayEdit) */
|
|
93
|
+
await unfold(p, 'kept');
|
|
94
|
+
const pid = await p.evaluate(() => { const b = document.querySelector('#czViewer [data-czs-id="kept"] [data-a="pedit"]'); if (b) b.click(); return b && b.dataset.id; });
|
|
95
|
+
ok('S5 tapping a kept point opens the editor in place: the kinds, the words, what PMOS will remember', !!pid && await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vzp-ed [data-a="etext"]') && document.querySelectorAll('#czViewer .vzp-ed [data-a="ekind"]').length === 3 && document.querySelector('#czViewer .vzp-ed [data-a="esave"]').disabled)), pid);
|
|
96
|
+
const kNow = await p.evaluate(() => document.querySelector('#czViewer .vzp-ed [data-a="ekind"][aria-checked="true"]').dataset.k);
|
|
97
|
+
const kNew = kNow === 'question' ? 'action' : 'question';
|
|
98
|
+
await press(p, `.vzp-ed [data-a="ekind"][data-k="${kNew}"]`);
|
|
99
|
+
ok('S5 a changed kind strikes the old reading, says what PMOS will remember, offers Only fix this one, and Save', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vzp-ed .vzp-was s') && /I will remember this\./.test(document.querySelector('#czViewer .vzp-learn').textContent) && !!document.querySelector('#czViewer .vzp-ed [data-a="elearn"]') && !document.querySelector('#czViewer .vzp-ed [data-a="esave"]').disabled)));
|
|
100
|
+
await press(p, '.vzp-ed [data-a="esave"]');
|
|
101
|
+
const ed = await until(() => A.S.posts.find((x) => x.path === '/api/meeting-points/edit'));
|
|
102
|
+
ok('S5 Save posts the correction with its original and learn on', ed && ed.body.note === 'n1' && ed.body.id === pid && ed.body.kind === kNew && ed.body.orig && ed.body.learn !== false, JSON.stringify(ed && ed.body));
|
|
103
|
+
ok('S5 the page says Fixed and what it will remember, with Undo', await until(async () => /Fixed\./.test(await body(p)) && !!(await p.$('#czViewer .vz-msg [data-a="msgundo"]'))), (await body(p)).slice(0, 300));
|
|
104
|
+
await press(p, '.vz-msg [data-a="msgundo"]');
|
|
105
|
+
ok('S5 Undo forgets the lesson (POST /api/meeting-points/forget)', await until(() => A.S.posts.some((x) => x.path === '/api/meeting-points/forget' && x.body.lesson === 'l0123456789')), JSON.stringify(A.S.posts.map((x) => x.path)));
|
|
106
|
+
await press(p, '.czs-sum [data-czs-act="confirmall"]');
|
|
107
|
+
ok('S5 Confirm in the summary confirms what is left to confirm', await until(() => A.S.posts.some((x) => x.path === '/api/meeting-points' && x.body.verdict === 'confirmed' && x.body.ids.length > 0)), JSON.stringify(A.S.posts.filter((x) => x.path === '/api/meeting-points')));
|
|
108
|
+
|
|
109
|
+
/* S8 series membership */
|
|
110
|
+
await F.more(p, 'Not part of this series');
|
|
111
|
+
ok('S8 ⋯ Not part of this series posts key off', await until(() => A.S.posts.some((x) => x.path === '/api/notes/series-member' && x.body.key === 'off')));
|
|
95
112
|
|
|
96
113
|
/* S9 writes: only the presses */
|
|
97
|
-
const allowed = ['/api/viewer-meeting/work-item', '/api/plan-items', '/api/notes/series-member'];
|
|
114
|
+
const allowed = ['/api/viewer-meeting/work-item', '/api/plan-items', '/api/notes/series-member', '/api/meeting-points/edit', '/api/meeting-points/forget', '/api/meeting-points'];
|
|
98
115
|
ok('S9 the page wrote only what was pressed', A.S.posts.every((x) => allowed.includes(x.path)), JSON.stringify(A.S.posts.map((x) => x.path)));
|
|
99
116
|
ok('S9 no page error', A.errors.length === 0, A.errors.join(' | '));
|
|
100
117
|
await A.ctx.close();
|
|
101
118
|
|
|
102
|
-
/*
|
|
119
|
+
/* S6 Before: a meeting to come, no note */
|
|
103
120
|
const B = await F.open(browser, BASE, '/premium-viewer.html?open=meeting&event=ev-rail&date=' + F.dayKey(F.world().RAIL), { scene: 'prep' });
|
|
104
121
|
const q = B.page;
|
|
105
|
-
const prepUp = await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="prep"]')), 15000);
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
ok('
|
|
109
|
-
|
|
122
|
+
const prepUp = await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="prep"]') && !!document.querySelector('#czViewer .czs-sum')), 15000);
|
|
123
|
+
const s6 = await sum(q);
|
|
124
|
+
ok('S6 a meeting to come: "Starts in about 30 min", its purpose, About · people · N of M ready, and an icon-only Record', prepUp && /^Starts in (29|30|31) min$/.test(s6.line) && /Agree the rail/.test(s6.text) && /ready/.test(s6.meta) && await q.evaluate(() => { const b = document.querySelector('#czViewer .czs-sum [data-a="record"]'); return !!b && !b.textContent.trim(); }), JSON.stringify(s6));
|
|
125
|
+
ok('S6 the folds: Agenda open, What matters today, To be ready, Material', /^agenda\*,matters,ready,mat/.test(await folds(q)), await folds(q));
|
|
126
|
+
await unfold(q, 'matters');
|
|
127
|
+
ok('S6 What matters today and Agenda with minutes', /The SSO spike/.test(await body(q)) && /10 min/.test(await body(q)), (await body(q)).slice(0, 500));
|
|
110
128
|
await q.$eval('#czViewer [data-a="min"][data-i="1"]', (b) => b.click());
|
|
111
129
|
await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-a="minin"]')));
|
|
112
130
|
await q.fill('#czViewer [data-a="minin"]', '15'); await q.press('#czViewer [data-a="minin"]', 'Enter');
|
|
113
|
-
ok('
|
|
131
|
+
ok('S6 changing a topic\'s minutes posts them to /api/viewer-meeting/agenda', await until(() => B.S.posts.some((x) => x.path === '/api/viewer-meeting/agenda' && x.body.min === 15)), JSON.stringify(B.S.posts));
|
|
132
|
+
await unfold(q, 'mat');
|
|
133
|
+
const mrows = await q.evaluate(() => [...document.querySelectorAll('#czViewer .vzm-mats [data-a="mat"]')].map((b) => b.innerText.replace(/\n/g, ' · ')));
|
|
134
|
+
ok('S6 each material row says its kind and how it opens; Present is an icon on what can be presented', mrows.length === 3 && /Release deck · PMOS deck/.test(mrows[0]) && /Website · opens live · for The report panel/.test(mrows[2]) && await q.evaluate(() => [...document.querySelectorAll('#czViewer .vzm-mats [data-a="present"]')].every((b) => !b.textContent.trim())), JSON.stringify(mrows));
|
|
135
|
+
/* the preview: only you see it, ← comes back */
|
|
136
|
+
await press(q, '.vzm-mats [data-a="mat"][data-i="0"]');
|
|
137
|
+
ok('S6 a material row opens its preview in the Viewer, only for you, with ← back', await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vzx-pv') && /only you see this\. The meeting does not\./.test(document.querySelector('#czViewer .vzx-pvl').textContent) && !!document.querySelector('#czViewer [data-cz-vw="back"]'))), (await body(q)).slice(0, 300));
|
|
138
|
+
ok('S6 the preview\'s ⋯ holds Remove from this meeting', await until(async () => { const r = await F.more(q); return r && r.some((x) => /^Remove from this meeting/.test(x)); }));
|
|
139
|
+
await q.$eval('#czViewer [data-cz-vw="back"]', (b) => b.click());
|
|
140
|
+
ok('S6 ← comes back to the meeting', await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="prep"]') && !document.querySelector('#czViewer .vzx-pv'))));
|
|
141
|
+
/* Present: the audience window opens with the press, the presenter fills the page */
|
|
142
|
+
await unfold(q, 'mat');
|
|
143
|
+
const popP = q.context().waitForEvent('page', { timeout: 8000 }).catch(() => null);
|
|
144
|
+
await press(q, '.vzm-mats [data-a="present"][data-i="0"]');
|
|
145
|
+
const aud = await popP;
|
|
146
|
+
ok('S6 Present opens the audience window in the same press', !!aud);
|
|
147
|
+
ok('S6 the presenter: Stop is an icon (Esc), and the share spot names the call app\'s Share', await until(() => q.evaluate(() => { const s = document.querySelector('.vzx [data-x="end"]'); return !!s && !s.textContent.trim() && /Esc/.test(s.getAttribute('aria-label')) && /Share/.test(document.querySelector('.vzx [data-x="share"]').textContent); })), 10000);
|
|
148
|
+
if (aud) ok('S6 the audience window shows the stage only', await until(() => aud.evaluate(() => !!document.querySelector('.vzx-aud') && !document.querySelector('[data-x="end"]')).catch(() => false), 8000));
|
|
149
|
+
await q.keyboard.press('Escape');
|
|
150
|
+
ok('S6 Esc stops presenting and the meeting is back', await until(() => q.evaluate(() => !document.querySelector('.vzx') && !!document.querySelector('#czViewer .vz-mtg'))));
|
|
151
|
+
/* Add material: find, paste a link, or upload a file */
|
|
114
152
|
await q.$eval('#czViewer [data-a="addmat"]', (b) => b.click());
|
|
115
|
-
ok('
|
|
153
|
+
ok('S6 Add material opens its popover under the list: Upload a file, Paste a link, Find in PMOS', await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vzm-anc[data-pop="mat"] .vzm-pop [data-a="matq"]') && !!document.querySelector('#czViewer .vzm-pop input[type="file"][data-a="matfile"]') && !!document.querySelector('#czViewer .vzm-pop [data-a="matlink"]') && !document.querySelector('#czViewer [data-cz-placeholder]'))));
|
|
154
|
+
// the card draws again as the presenter closes: a file picked on an input that was replaced meanwhile is still sent (its own change handler)
|
|
155
|
+
await q.setInputFiles('#czViewer .vzm-pop input[type="file"][data-a="matfile"]', { name: 'Board shot.png', mimeType: 'image/png', buffer: Buffer.from('\x89PNG....') });
|
|
156
|
+
ok('S6 Upload a file sends the bytes, then adds the kept file to the meeting', await until(() => B.S.posts.some((x) => x.path === '/api/meeting-material/file' && x.body.name === 'Board shot.png' && x.body.size > 0) && B.S.posts.some((x) => x.path === '/api/meeting-material' && x.body.item && x.body.item.kind === 'file' && /Board-shot\.png$/.test(x.body.item.ref))), JSON.stringify(B.S.posts.slice(-3)));
|
|
157
|
+
ok('S6 no page error', B.errors.length === 0, B.errors.join(' | '));
|
|
116
158
|
await B.ctx.close();
|
|
117
159
|
|
|
118
|
-
/*
|
|
160
|
+
/* S7 During: a note that records */
|
|
119
161
|
const C = await F.open(browser, BASE, '/premium-viewer.html?open=meeting¬e=n2', { init: () => { window.__premiumHolding = { id: 'n2' }; } });
|
|
120
162
|
const r = C.page;
|
|
121
|
-
const liveUp = await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="live"]')), 15000);
|
|
122
|
-
|
|
163
|
+
const liveUp = await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="live"]') && !!document.querySelector('#czViewer .czs-sum')), 15000);
|
|
164
|
+
const s7 = await sum(r);
|
|
165
|
+
ok('S7 a recording note: "Recording · mm:ss", Now on the topic, the source, and the icon-only Stop, Highlight and Pause', liveUp && /^Recording · \d{2}:\d{2}$/.test(s7.line) && /^Now on: The Issue button, topic 2 of 3\./.test(s7.text) && /Zoom app · microphone and meeting/.test(s7.meta)
|
|
166
|
+
&& await r.evaluate(() => ['stop', 'hl', 'pause'].every((k) => { const b = document.querySelector(`#czViewer .czs-sum [data-a="${k}"]`); return b && !b.textContent.trim(); })), JSON.stringify(s7));
|
|
167
|
+
ok('S7 the folds: Your notes and Material open, Caught so far, Highlights, Agenda, Transcript', (await folds(r)) === 'mine*,caught,mat*,hl,agenda,tr', await folds(r));
|
|
168
|
+
await unfold(r, 'caught'); await unfold(r, 'hl');
|
|
123
169
|
const lv = await body(r);
|
|
124
|
-
ok('
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
170
|
+
ok('S7 Caught so far and Highlights', /1 decision/.test(lv) && /2 next steps/.test(lv) && /Issue is the blue button/.test(lv), lv.slice(0, 600));
|
|
171
|
+
const m7 = await F.more(r);
|
|
172
|
+
ok('S7 ⋯ holds Listen to another app, Pause screen shots, and Make this note private last', m7 && m7.includes('Listen to another app') && m7.includes('Pause screen shots') && m7[m7.length - 1] === 'Make this note private', JSON.stringify(m7));
|
|
173
|
+
await F.more(r, 'Pause screen shots');
|
|
174
|
+
ok('S7 ⋯ Pause screen shots posts shots paused for the note', await until(() => C.S.posts.some((x) => x.path === '/api/viewer-meeting/capture' && x.body.id === 'n2' && x.body.shots === 'paused')));
|
|
175
|
+
await F.more(r, 'Listen to another app');
|
|
176
|
+
await until(() => r.evaluate(() => !!document.querySelector('#czViewer [data-a="app"][data-id="meet"]')));
|
|
129
177
|
await r.$eval('#czViewer [data-a="app"][data-id="meet"]', (b) => b.click());
|
|
130
|
-
ok('
|
|
178
|
+
ok('S7 picking where the meeting is posts the app', await until(() => C.S.posts.some((x) => x.path === '/api/viewer-meeting/capture' && x.body.app === 'meet')));
|
|
179
|
+
await unfold(r, 'tr');
|
|
131
180
|
await r.$eval('#czViewer .vz-who', (b) => b.click());
|
|
132
181
|
await until(() => r.evaluate(() => !!document.querySelector('#czViewer [data-a="namein"]')));
|
|
133
182
|
await r.fill('#czViewer [data-a="namein"]', 'Ana Lima'); await r.$eval('#czViewer [data-a="nameok"]', (b) => b.click());
|
|
134
|
-
ok('
|
|
183
|
+
ok('S7 naming a speaker in the Transcript posts the name for the line\'s source', await until(() => C.S.posts.some((x) => x.path === '/api/notes/speaker' && x.body.name === 'Ana Lima' && x.body.id === 'n2')), JSON.stringify(C.S.posts.slice(-2)));
|
|
184
|
+
ok('S7 no page error', C.errors.length === 0, C.errors.join(' | '));
|
|
135
185
|
await C.ctx.close();
|
|
136
186
|
|
|
137
|
-
/*
|
|
187
|
+
/* S10 a note that is not there */
|
|
138
188
|
const D = await F.open(browser, BASE, '/premium-viewer.html?open=meeting¬e=nope');
|
|
139
|
-
ok('
|
|
189
|
+
ok('S10 a note that is not there says so, and the card still opens', await until(() => D.page.evaluate(() => !!document.querySelector('#czViewer') && /Untitled note|could not|not/.test(document.querySelector('#czViewer').innerText))));
|
|
140
190
|
await D.ctx.close();
|
|
141
191
|
|
|
142
|
-
/*
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
192
|
+
/* S11 floors: a phone (XvAPhMeet), and no old layout */
|
|
193
|
+
// the meeting's own presses: the summary's (the shell's primary button is the shell's) and the folds; a press may keep its drawn size and take a 44 px hit area from ::before
|
|
194
|
+
const HITS = () => { window.hits = () => [...document.querySelectorAll('#czViewer .czs-sum button:not(.czs-pri), #czViewer [data-czs-fold]')].filter((b) => { if (!b.getClientRects().length) return false; const pb = getComputedStyle(b, '::before'), hit = pb.content !== 'none' && pb.position === 'absolute' ? parseFloat(pb.height) || 0 : 0; return Math.max(b.getBoundingClientRect().height, hit) < 44; }).map((b) => (b.dataset.a || b.dataset.czsFold || b.className) + ':' + Math.round(b.getBoundingClientRect().height)); };
|
|
195
|
+
for (const [u, o] of [['/premium-viewer.html?open=meeting¬e=n1', {}], ['/premium-viewer.html?open=meeting¬e=n2', { init: () => { window.__premiumHolding = { id: 'n2' }; } }]]) {
|
|
196
|
+
const E = await F.open(browser, BASE, u, { w: 390, h: 844, ...o });
|
|
197
|
+
await E.page.evaluate(HITS);
|
|
198
|
+
await until(() => E.page.evaluate(() => !!document.querySelector('#czViewer .vz-mtg') && !!document.querySelector('#czViewer .czs-sum')), 15000);
|
|
199
|
+
const fl = await until(async () => { const v = await E.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, full: (() => { const r = document.querySelector('#czViewer').getBoundingClientRect(); return r.left === 0 && Math.round(r.width) === innerWidth; })(),
|
|
200
|
+
c3: [...document.querySelectorAll('script[src],link[href]')].some((x) => /c3-/.test(x.src || x.href)), old: !!document.querySelector('#czViewer #dTabs, #czViewer .stream'),
|
|
201
|
+
small: hits() })); return v.small.length === 0 ? v : null; }, 8000)
|
|
202
|
+
|| await E.page.evaluate(() => ({ small: hits() }));
|
|
203
|
+
ok(`S11 on a phone (${/n2/.test(u) ? 'live' : 'notes'}) the card is the whole screen, no sideways scroll, no Detail/Conversation tabs, the summary's presses and the folds at least 44 px`, fl.over <= 0 && fl.full && !fl.old && fl.small.length === 0, JSON.stringify(fl));
|
|
204
|
+
ok(`S11 no c3 file is loaded and no page error on the phone (${/n2/.test(u) ? 'live' : 'notes'})`, !fl.c3 && E.errors.length === 0, E.errors.join(' | '));
|
|
205
|
+
await E.ctx.close();
|
|
206
|
+
}
|
|
151
207
|
finish();
|
|
152
208
|
})();
|
|
@@ -50,8 +50,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
50
50
|
/* N1 open */
|
|
51
51
|
const A = await open('/premium-viewer.html?open=notes');
|
|
52
52
|
const p = A.page;
|
|
53
|
-
ok('N1 ?open=notes opens the Viewer card on its Notes side', await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzc-grp').length > 0 && document.querySelector('#czViewer .vzc-
|
|
54
|
-
ok('N1 the card has the Calendar
|
|
53
|
+
ok('N1 ?open=notes opens the Viewer card on its Notes side', await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzc-grp').length > 0 && document.querySelector('#czViewer .vzc-seg [data-c="tab"][data-k="notes"]').getAttribute('aria-selected') === 'true'), 15000), (await text(p)).slice(0, 300));
|
|
54
|
+
ok('N1 the card has the Calendar | Notes switch, the search and the kind chips, and no tabs strip or conversation', await p.evaluate(() => !!document.querySelector('#czViewer [data-c="tab"][data-k="cal"]') && !!document.querySelector('#czViewer [data-c="q"]') && document.querySelectorAll('#czViewer [data-c="filter"]').length === 4 && !document.querySelector('#vTabs, #dlg, .stream')));
|
|
55
55
|
|
|
56
56
|
/* N2 groups */
|
|
57
57
|
const g = await groups(p);
|
|
@@ -83,9 +83,10 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
83
83
|
await tap(p, '[data-c="ser"][data-k="viewer-sync"]');
|
|
84
84
|
ok('N3 pressing the series card unfolds its notes, newest first', await until(async () => (await ids(p)).slice(0, 2).join() === 'n1,n0'), JSON.stringify(await ids(p)));
|
|
85
85
|
await tap(p, '[data-c="note"][data-id="n1"]');
|
|
86
|
-
ok('N5 a note of the series opens and says
|
|
87
|
-
await
|
|
88
|
-
|
|
86
|
+
ok('N5 a note of the series opens and its summary says 4 of 4 in the series', await until(async () => /4 of 4/.test(await text(p))) && A.S.gets.some((x) => /notes\/one\?id=n1/.test(x)), (await text(p)).slice(0, 300));
|
|
87
|
+
ok('N5 ⋯ holds the meeting before, and no meeting after the last one', await until(async () => { const r = await F.more(p); return r && r.some((x) => /^The meeting before/.test(x)) && !r.some((x) => /^The meeting after/.test(x)); }));
|
|
88
|
+
await F.more(p, 'The meeting before');
|
|
89
|
+
ok('N5 paging (⋯ The meeting before) reads the meeting before into the same card', await until(() => A.S.gets.some((x) => /notes\/one\?id=n0/.test(x))) && await p.evaluate(() => document.querySelectorAll('#czViewer .vz-mtg').length === 1));
|
|
89
90
|
|
|
90
91
|
/* N6 Change what it is about */
|
|
91
92
|
await p.evaluate(() => window.czViews.openNotes({}));
|
|
@@ -125,7 +126,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
125
126
|
for (const th of ['light', 'dark']) {
|
|
126
127
|
const P = await open('/premium-viewer.html?open=notes&theme=' + th, { w: 390, h: 844 });
|
|
127
128
|
await until(() => P.page.evaluate(() => document.querySelectorAll('#czViewer .vzc-grp').length > 0), 15000);
|
|
128
|
-
const fl = () => P.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, small: [...document.querySelectorAll('#czViewer .vzc-nr, #czViewer .vzc-
|
|
129
|
+
const fl = () => P.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, small: [...document.querySelectorAll('#czViewer .vzc-nr, #czViewer .vzc-seg button, #czViewer [data-c="filter"]')].filter((b) => { if (!b.getClientRects().length) return false; const pb = getComputedStyle(b, '::before'), hit = pb.content !== 'none' && pb.position === 'absolute' ? parseFloat(pb.height) || 0 : 0; return Math.max(b.getBoundingClientRect().height, hit) < 44; }).length })); // a press may keep its drawn size (the Agreed mockup's segment and New note) and take a 44 px hit area from ::before
|
|
129
130
|
// the Meetings stylesheet loads after the list is drawn: measure once it applies, and fail if it never does
|
|
130
131
|
const f0 = await until(async () => { const v = await fl(); return v.small === 0 ? v : null; }, 8000) || await fl();
|
|
131
132
|
if (shotDir) await P.page.screenshot({ path: path.join(shotDir, `list-390-${th}.png`) });
|
|
@@ -42,28 +42,28 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
42
42
|
/* R1 Record: a meeting on now with no note */
|
|
43
43
|
const A = await F.open(browser, BASE, '/premium-viewer.html?open=meeting&event=ev-live&date=' + F.dayKey(W.LIVE), { noLive: true });
|
|
44
44
|
const p = A.page;
|
|
45
|
-
ok('R1 a meeting on now with no note shows Record in its
|
|
45
|
+
ok('R1 a meeting on now with no note shows Record in its summary, an icon only', await until(() => p.evaluate(() => { const b = document.querySelector('#czViewer .czs-sum [data-a="record"]'); return !!b && b.getAttribute('aria-label') === 'Record' && !b.textContent.trim(); }), 15000));
|
|
46
46
|
await tap(p, '[data-a="record"]');
|
|
47
47
|
ok('R1 Record asks first: tell everyone, then start', await until(async () => /Tell everyone first/.test(await text(p)) && !!(await p.$('#czViewer [data-a="recgo"]'))));
|
|
48
48
|
ok('R1 nothing is made before the second press', posted(A.S, '/api/notes/new').length === 0);
|
|
49
49
|
await tap(p, '[data-a="recgo"]');
|
|
50
50
|
ok('R1 I told them, start makes the note and starts the recorder', await until(() => posted(A.S, '/api/notes/new').length === 1 && posted(A.S, '/api/notes/record').length === 1), JSON.stringify(A.S.posts.map((x) => x.path)));
|
|
51
|
-
ok('R1 the card turns live: Recording, with Stop', await until(async () => (await p.textContent('#czViewer .
|
|
51
|
+
ok('R1 the card turns live: Recording · mm:ss, with Stop', await until(async () => /^Recording · \d{2}:\d{2}$/.test(await p.textContent('#czViewer .czs-sum .czs-line')) && !!(await p.$('#czViewer .czs-sum [data-a="stop"]')), 12000));
|
|
52
52
|
|
|
53
53
|
/* R2 Highlight */
|
|
54
|
-
await tap(p, '.
|
|
54
|
+
await tap(p, '.czs-sum [data-a="hl"]');
|
|
55
55
|
ok('R2 Highlight starts the recorder\'s highlight', await until(() => p.evaluate(() => window.__premiumRecorder._hl === 1)));
|
|
56
56
|
|
|
57
57
|
/* R3 the live notes */
|
|
58
58
|
await p.fill('#czViewer [data-a="mine"]', 'Ask about the dates');
|
|
59
59
|
ok('R3 what you type is saved to the note', await until(() => posted(A.S, '/api/notes/save').some((x) => x.body.body === 'Ask about the dates')), JSON.stringify(posted(A.S, '/api/notes/save')));
|
|
60
|
-
await tap(p, '.
|
|
60
|
+
await tap(p, '.czs-sum [data-a="pause"]');
|
|
61
61
|
ok('R3 Pause pauses the recorder (POST /api/notes/pause)', await until(() => posted(A.S, '/api/notes/pause').length === 1));
|
|
62
|
-
ok('R3 a paused note offers Resume in its recording line, with no Waiting for design marker', await until(async () => !!(await p.$('#czViewer .
|
|
63
|
-
await tap(p, '.
|
|
62
|
+
ok('R3 a paused note offers Resume in its recording line, with no Waiting for design marker', await until(async () => !!(await p.$('#czViewer .czs-sum [data-a="resume"]')) && !(await p.$('#czViewer [data-cz-placeholder]'))));
|
|
63
|
+
await tap(p, '.czs-sum [data-a="resume"]');
|
|
64
64
|
ok('R3 Resume records again', await until(() => posted(A.S, '/api/notes/record').length === 2));
|
|
65
|
-
await until(async () => !!(await p.$('#czViewer .
|
|
66
|
-
await tap(p, '.
|
|
65
|
+
await until(async () => !!(await p.$('#czViewer .czs-sum [data-a="stop"]')));
|
|
66
|
+
await tap(p, '.czs-sum [data-a="stop"]');
|
|
67
67
|
ok('R3 Stop asks first', await until(async () => /Stop for good/.test(await text(p))));
|
|
68
68
|
await tap(p, '[data-a="stopgo"]');
|
|
69
69
|
ok('R3 Stop and write the notes stops the recorder', await until(() => posted(A.S, '/api/notes/stop').length === 1));
|
|
@@ -73,15 +73,16 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
73
73
|
/* R3 Private on a recording note */
|
|
74
74
|
const B = await F.open(browser, BASE, '/premium-viewer.html?open=meeting¬e=n2', { init: () => { window.__premiumHolding = { id: 'n2' }; } });
|
|
75
75
|
const q = B.page;
|
|
76
|
-
await until(() => q.evaluate(() => !!document.querySelector('#czViewer
|
|
77
|
-
await
|
|
76
|
+
await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-mtg')), 15000);
|
|
77
|
+
ok('R3 Make this note private is in ⋯, last, as the one red row', await until(async () => { const r = await F.more(q); return r && r[r.length - 1] === 'Make this note private'; }));
|
|
78
|
+
await F.more(q, 'Make this note private');
|
|
78
79
|
ok('R3 Private asks first', await until(async () => /Make this note private/.test(await text(q))));
|
|
79
80
|
await tap(q, '[data-a="privgo"]');
|
|
80
81
|
ok('R3 Make it private posts private: true', await until(() => posted(B.S, '/api/notes/private').some((x) => x.body.id === 'n2' && x.body.private === true)));
|
|
81
82
|
|
|
82
83
|
/* R4 Focus */
|
|
83
|
-
await
|
|
84
|
-
ok('R4 Focus is
|
|
84
|
+
if (await q.evaluate(() => document.querySelector('#czViewer [data-czs-fold="agenda"]').getAttribute('aria-expanded') !== 'true')) await tap(q, '[data-czs-fold="agenda"]');
|
|
85
|
+
ok('R4 Focus is the live card\'s Agenda fold, with the topics and no Waiting for design marker', await until(async () => !(await q.$('#czViewer [data-cz-placeholder]')) && /The Issue button/.test(await text(q))), (await text(q)).slice(0, 300));
|
|
85
86
|
await B.ctx.close();
|
|
86
87
|
|
|
87
88
|
/* R5 New note: an untitled note recorded at once */
|
|
@@ -96,7 +97,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
96
97
|
|
|
97
98
|
/* R6 floors */
|
|
98
99
|
const D = await F.open(browser, BASE, '/premium-viewer.html?open=meeting¬e=n2', { w: 390, h: 844, init: () => { window.__premiumHolding = { id: 'n2' }; } });
|
|
99
|
-
await until(() => D.page.evaluate(() => !!document.querySelector('#czViewer .
|
|
100
|
+
await until(() => D.page.evaluate(() => !!document.querySelector('#czViewer .czs-sum [data-a="stop"]')), 15000);
|
|
100
101
|
const fl = await D.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, chip: !!document.querySelector('#recChip, #recCtl') }));
|
|
101
102
|
ok('R6 on a phone the live card has no sideways scroll, and no old round mic or record chip is drawn', fl.over <= 0 && !fl.chip, JSON.stringify(fl));
|
|
102
103
|
await D.ctx.close();
|
|
@@ -80,14 +80,18 @@ const disk = () => fs.readFileSync(path.join(dir, pNew), 'utf8');
|
|
|
80
80
|
await p.goto(BASE + '/premium-viewer.html?open=report&path=' + encodeURIComponent(RDraft.draftPath(dir, CAD, slot)));
|
|
81
81
|
return until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-rp0 .vz-slide')));
|
|
82
82
|
};
|
|
83
|
+
/* shell A's ⋯ (cozy-viewer.js): Edit sits there, with the rest of what the report can do besides its one primary */
|
|
84
|
+
const pick = (pg, l) => pg.evaluate(async (lab) => { document.querySelector('#czViewer [data-cz-vw="more"]').click(); await new Promise((r) => setTimeout(r, 60)); const b = [...document.querySelectorAll('#czViewer .cz-vw-menu [role="menuitem"]')].find((x) => x.querySelector('span').textContent === lab); if (b) b.click(); return !!b; }, l);
|
|
85
|
+
const menuOf = (pg) => pg.evaluate(async () => { document.querySelector('#czViewer [data-cz-vw="more"]').click(); await new Promise((r) => setTimeout(r, 60)); const L = [...document.querySelectorAll('#czViewer .cz-vw-menu [role="menuitem"] > span:first-of-type')].map((x) => x.textContent); document.querySelector('#czViewer [data-cz-vw="more"]').click(); return L; });
|
|
83
86
|
const openEditor = async () => {
|
|
84
|
-
await
|
|
87
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]')));
|
|
88
|
+
await pick(p, 'Edit');
|
|
85
89
|
return until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-vz-ed] .sl .sl-stage .sl-cv')));
|
|
86
90
|
};
|
|
87
91
|
|
|
88
92
|
/* O: opening */
|
|
89
93
|
ok('O1 a draft report opens in the Viewer card', await openReader('2026-10-12'));
|
|
90
|
-
ok('O2 on Slides,
|
|
94
|
+
ok('O2 on Slides, Edit is under ⋯ once, and the card draws no other Edit (XvAReportMore)', await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]'))) && (await menuOf(p)).filter((x) => x === 'Edit').length === 1 && await p.evaluate(() => !document.querySelector('#czViewer .cz-vw-body [data-r="edit"]')));
|
|
91
95
|
ok('O3 Edit mounts the slide editor in the card, with no dialog and no tab; the parts the design does not draw (slide tools, speaker notes) are marked Waiting for design', await openEditor() && await p.evaluate(() => !document.querySelector('#dlg, #vTabs') && !!document.querySelector('#czViewer [data-cz-placeholder="Slide tools"]') && !!document.querySelector('#czViewer [data-cz-placeholder="Speaker notes"]')));
|
|
92
96
|
ok('O3 the panel\'s toolbar drives it: Undo, Redo, Insert, Layout, Theme, Cancel and Save, and the cycle chip says Editing', await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-tb > button')].map((b) => b.dataset.r).join() === 'ed|undo,ed|redo,ins,ed|layout,ed|theme,edcancel,edsave' && /Editing the Oct 12 draft/.test(document.querySelector('#czViewer [data-r="cycm"]').textContent)), await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-tb > button')].map((b) => b.dataset.r).join()));
|
|
93
97
|
let s = await st();
|
|
@@ -227,7 +231,9 @@ const disk = () => fs.readFileSync(path.join(dir, pNew), 'utf8');
|
|
|
227
231
|
|
|
228
232
|
/* I: an issued report */
|
|
229
233
|
await openReader('2026-10-05');
|
|
230
|
-
|
|
234
|
+
await until(() => p.evaluate(() => /^Issued/.test((document.querySelector('#czViewer .czs-line') || {}).textContent || '')));
|
|
235
|
+
const im = await menuOf(p);
|
|
236
|
+
ok('I1 an issued report has no Edit and no Issue: it reads as slides or as a page', !im.includes('Edit') && im.includes('Read as a page') && await p.evaluate(() => !document.querySelector('#czViewer [data-czs-act="issue"], #czViewer [data-r="issue"]')), im.join());
|
|
231
237
|
ok('I3 the issued file is not changed', fs.readFileSync(path.join(dir, pOld), 'utf8') === OLD);
|
|
232
238
|
ok('X no page error', errs.length === 0, errs.join(' | '));
|
|
233
239
|
await ctx.close();
|
|
@@ -238,8 +244,8 @@ const disk = () => fs.readFileSync(path.join(dir, pNew), 'utf8');
|
|
|
238
244
|
q.on('pageerror', (e) => e2.push(String(e)));
|
|
239
245
|
await q.goto(BASE + '/premium-viewer.html?theme=dark&open=report&path=' + encodeURIComponent(pNew));
|
|
240
246
|
await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-rp0 .vz-slide')));
|
|
241
|
-
await q
|
|
242
|
-
await q
|
|
247
|
+
await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]')));
|
|
248
|
+
await pick(q, 'Edit'); // Edit sits under ⋯ at every width
|
|
243
249
|
await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-vz-ed] .sl .sl-stage .sl-cv')));
|
|
244
250
|
await sleep(300);
|
|
245
251
|
const m = await q.evaluate((v) => {
|