create-pmos 0.402.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 +13 -13
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/board-programs-test.js +6 -5
- package/workspace/briefing-premium-adddoc-test.js +28 -22
- package/workspace/briefing-premium-board-test.js +91 -73
- 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 +19 -17
- 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-test.js +4 -3
- package/workspace/changelog.json +12 -0
- package/workspace/fixtures/premium-viewer-fixtures.js +24 -2
- package/workspace/guide/jira.md +38 -6
- package/workspace/home-rows-test.js +184 -0
- 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/routes-brief-page.js +8 -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/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +30 -24
- 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 +46 -23
- 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 +64 -55
- package/workspace/public/pm/bd-acts.js +1 -1
- package/workspace/public/pm/bd-asks.js +22 -7
- 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 +176 -191
- package/workspace/public/pm/cozy-board.css +5 -28
- 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 +9 -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 +11 -34
- 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-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 +122 -58
- package/workspace/public/pm/home-chat.js +11 -2
- 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 +6 -14
- 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 +3 -3
- package/workspace/public/pm/premium-board.js +73 -235
- 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/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 +0 -1
- package/workspace/server.js +4 -2
- package/workspace/skills/jira-push.skill +3 -3
- package/workspace/test-lists/prd-to-jira.json +6 -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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* premium-link-suggest-test.js — a loose chat's guess at its initiative (Viewer kit, frame XvALinkSuggest). A loose session whose title shares
|
|
4
|
+
* words with one initiative's title shows one quiet chip at the chat's top: "Looks like <initiative> · Link it ×". Link it links the session
|
|
5
|
+
* through the real route's contract (POST /api/session/initiative); × hides the chip for that chat and it stays hidden after a reload.
|
|
6
|
+
* L1 the chip names the matching initiative · L2 a chat with no match shows no chip · L3 Link it posts the link · L4 × hides it and it stays
|
|
7
|
+
* hidden · L5 a phone keeps 44 px targets · L6 no page error */
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const { spawn } = require('child_process');
|
|
10
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
11
|
+
const T = require('./test-run').configure({ name: 'premium-link-suggest' });
|
|
12
|
+
const BP = require('./lib/board-premium.js');
|
|
13
|
+
const BF = require('./fixtures/board-premium-facts.js');
|
|
14
|
+
const BRP = require('./lib/briefing-premium.js');
|
|
15
|
+
const BRF = require('./fixtures/briefing-premium-facts.js');
|
|
16
|
+
|
|
17
|
+
const BASE = T.BASE;
|
|
18
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
19
|
+
const until = async (fn, ms = 6000, 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); } };
|
|
20
|
+
const results = [];
|
|
21
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
|
|
22
|
+
let srv = null; let browser = null;
|
|
23
|
+
const finish = async (code) => {
|
|
24
|
+
if (browser) await browser.close().catch(() => {});
|
|
25
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
26
|
+
T.killTmux();
|
|
27
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
28
|
+
console.log(`\n${results.length - bad}/${results.length} premium-link-suggest assertions passed`);
|
|
29
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
30
|
+
};
|
|
31
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
32
|
+
|
|
33
|
+
const BOARD = BP.build(BF.facts());
|
|
34
|
+
const BRIEF = BRP.build(BRF.facts());
|
|
35
|
+
const SESSIONS = [
|
|
36
|
+
{ id: 's-meter', name: 'Fix the usage meter on billing', origin: '', shown: 'quiet' },
|
|
37
|
+
{ id: 's-lunch', name: 'Lunch plans for Friday', origin: '', shown: 'quiet' },
|
|
38
|
+
];
|
|
39
|
+
const json = (r, body, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(body) });
|
|
40
|
+
|
|
41
|
+
(async () => {
|
|
42
|
+
const exe = findBrowser();
|
|
43
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
44
|
+
let chromium;
|
|
45
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
46
|
+
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
47
|
+
await T.waitForServer(BASE);
|
|
48
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
49
|
+
|
|
50
|
+
const errors = [];
|
|
51
|
+
const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } });
|
|
52
|
+
const setup = async (page, posts) => {
|
|
53
|
+
page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
|
|
54
|
+
await page.route(/\/api\/board-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BOARD, as_of: Date.now() }));
|
|
55
|
+
await page.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRIEF, as_of: Date.now() }));
|
|
56
|
+
await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
|
|
57
|
+
await page.route('**/api/sessions', (r) => json(r, { ok: true, sessions: SESSIONS }));
|
|
58
|
+
await page.route('**/api/sessions/conversation**', (r) => json(r, { ok: true, state: 'conv', turn: 'user', messages: [{ role: 'user', text: 'The meter double counts', at: Date.now() - 60000 }] }));
|
|
59
|
+
await page.route('**/api/session/initiative', (r) => { posts.push(JSON.parse(r.request().postData() || '{}')); return json(r, { ok: true }); });
|
|
60
|
+
};
|
|
61
|
+
const openSession = async (page, name) => {
|
|
62
|
+
const row = await until(async () => page.$(`#hmList button:has-text("${name}")`), 10000);
|
|
63
|
+
if (!row) return false;
|
|
64
|
+
await row.click(); await sleep(600); return true;
|
|
65
|
+
};
|
|
66
|
+
const chip = (page) => page.evaluate(() => { const s = document.querySelector('#hmSug'); return s && !s.hidden ? s.textContent.replace(/\s+/g, ' ').trim() : ''; });
|
|
67
|
+
|
|
68
|
+
const posts = [];
|
|
69
|
+
let page = await ctx.newPage(); await setup(page, posts);
|
|
70
|
+
await page.goto(BASE + '/premium.html?theme=light');
|
|
71
|
+
const opened = await openSession(page, 'Fix the usage meter on billing');
|
|
72
|
+
ok('L1 the loose session opens from the list', opened);
|
|
73
|
+
ok('L1 the chip names the matching initiative, once, with Link it', /^Looks like Usage-based billing\s*Link it$/.test(await until(() => chip(page))), await chip(page));
|
|
74
|
+
await openSession(page, 'Lunch plans for Friday');
|
|
75
|
+
ok('L2 a loose chat that matches no initiative shows no chip', (await chip(page)) === '');
|
|
76
|
+
await openSession(page, 'Fix the usage meter on billing');
|
|
77
|
+
await page.click('#hmSug [data-hm-sug="link"]');
|
|
78
|
+
ok('L3 Link it links this session to the guessed initiative', !!(await until(async () => posts.length === 1)) && posts[0].id === 's-meter' && posts[0].initiative === 'usage-billing', JSON.stringify(posts));
|
|
79
|
+
await page.close();
|
|
80
|
+
|
|
81
|
+
page = await ctx.newPage(); await setup(page, posts);
|
|
82
|
+
await page.goto(BASE + '/premium.html?theme=light');
|
|
83
|
+
await openSession(page, 'Fix the usage meter on billing');
|
|
84
|
+
await until(() => chip(page));
|
|
85
|
+
await page.click('#hmSug [data-hm-sug="x"]');
|
|
86
|
+
ok('L4 × hides the chip', (await chip(page)) === '');
|
|
87
|
+
await page.reload(); await openSession(page, 'Fix the usage meter on billing'); await sleep(800);
|
|
88
|
+
ok('L4 a dismissed guess stays hidden for that chat after a reload', (await chip(page)) === '');
|
|
89
|
+
await page.close(); await ctx.close();
|
|
90
|
+
|
|
91
|
+
const pctx = await browser.newContext({ viewport: { width: 390, height: 844 }, hasTouch: true });
|
|
92
|
+
page = await pctx.newPage(); await setup(page, []);
|
|
93
|
+
await page.goto(BASE + '/premium.html?theme=light');
|
|
94
|
+
const loose = await until(async () => page.$('#hmList button:has-text("Not in an initiative")'), 10000); // the phone folds loose chats into one row
|
|
95
|
+
if (loose) { await loose.click(); await sleep(500); }
|
|
96
|
+
const popen = await openSession(page, 'Fix the usage meter on billing');
|
|
97
|
+
if (process.env.LS_DEBUG) { console.log('phone open', popen); await page.screenshot({ path: process.env.LS_DEBUG }); }
|
|
98
|
+
const sz = await until(() => page.evaluate(() => { const b = document.querySelector('#hmSug:not([hidden]) [data-hm-sug="link"]'); if (!b) return null; const r = b.getBoundingClientRect(); return r.width && { w: r.width, h: r.height }; }));
|
|
99
|
+
ok('L5 on a phone the chip shows and Link it is a 44 px target', !!sz && sz.h >= 44 && sz.w >= 44, JSON.stringify(sz));
|
|
100
|
+
await pctx.close();
|
|
101
|
+
ok('L6 no page error', errors.length === 0, errors.join(' | '));
|
|
102
|
+
finish();
|
|
103
|
+
})();
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* one report (one issued); /premium-viewer.html?open=report&path=... opens the cycle in the czViewer card, and the real page presses the real routes:
|
|
6
6
|
* O opening · B the bar · C the cycles · D the deck · G the page · K the Brief · N Present · W download · X print · E edit · I issued
|
|
7
7
|
* P the writes · F floors · S issue · A archive
|
|
8
|
-
* premium-uncovered-features (workstream reports)
|
|
9
|
-
*
|
|
8
|
+
* premium-uncovered-features (workstream reports) drew the parts the Agreed mockup left out (RpBrief, RpStates, RpDoc, RpLive, RpPhone);
|
|
9
|
+
* Viewer shell A (viewer kit, frames XvAReport, XvAReportDoc, XvAReportMore, XvAReportIssue, XvAPhReport) puts them in one summary card with
|
|
10
|
+
* one primary (Issue, Share or Bring back) and the rest under the header's ⋯:
|
|
10
11
|
* L the live page · Y Start the next cycle
|
|
11
12
|
* Set READ_SHOTS=<dir> to save screenshots at 1280 and 390 wide. */
|
|
12
13
|
const fs = require('fs');
|
|
@@ -71,37 +72,43 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
71
72
|
const V = '#czViewer ';
|
|
72
73
|
const tap = (sel) => p.$eval(V + sel, (b) => b.click());
|
|
73
74
|
const has = (sel) => p.$(V + sel).then((x) => !!x);
|
|
74
|
-
const counter = () => p.evaluate(() => (document.querySelector('#czViewer .
|
|
75
|
+
const counter = () => p.evaluate(() => (document.querySelector('#czViewer .rp-strip + .rp-count') || {}).textContent || '');
|
|
75
76
|
const bigTitle = () => p.evaluate(() => { const h = document.querySelector('#czViewer .vz-slide h4'); return h ? h.textContent : (document.querySelector('#czViewer .vz-slide iframe') ? 'frame' : ''); });
|
|
77
|
+
const line = () => p.evaluate(() => (document.querySelector('#czViewer .czs-sum .czs-line') || {}).textContent || '');
|
|
78
|
+
const primary = () => p.evaluate(() => [...document.querySelectorAll('#czViewer .czs-sum .czs-pri')].map((b) => b.dataset.czsAct + ':' + b.textContent).join());
|
|
76
79
|
const chipT = () => p.evaluate(() => (document.querySelector('#czViewer [data-r="cycm"]') || {}).textContent || '');
|
|
77
80
|
const tools = () => p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-tb > button, #czViewer .vz-tb .vz-sg button')].filter((b) => b.getClientRects().length).map((b) => b.dataset.r).join());
|
|
78
|
-
|
|
81
|
+
/* shell A's ⋯ (cozy-viewer.js): the menu it draws from open({ more }) */
|
|
82
|
+
const menu = () => p.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 > *')].map((x) => (x.tagName === 'HR' ? '|' : [...x.querySelectorAll('span')].map((y) => y.textContent).join(' '))); document.querySelector('#czViewer [data-cz-vw="more"]').click(); return L.join(','); });
|
|
83
|
+
const pick = (label) => p.evaluate(async (l) => { 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 === l); if (b) b.click(); return !!b; }, label);
|
|
84
|
+
const ready = () => until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-rp0 .vz-slide, #czViewer .vz-rp0 .rp-pg')));
|
|
79
85
|
const openAt = async (rel) => { await p.goto(BASE + '/premium-viewer.html?open=report&path=' + encodeURIComponent(rel)); return ready(); };
|
|
80
86
|
|
|
81
87
|
/* O: the cycle opens in the Viewer card */
|
|
82
88
|
ok('O1 /premium-viewer.html?open=report opens the cycle in the Viewer card', await openAt(pNew));
|
|
83
|
-
ok('O2 the card has no conversation, no tabs and no old reader', await p.evaluate(() => !document.querySelector('#dlg, .stream, #vTabs, #rdSlide, #rdIn')));
|
|
84
|
-
ok('O3 the header names the report
|
|
85
|
-
await until(() =>
|
|
86
|
-
ok('B1 the
|
|
87
|
-
|
|
88
|
-
ok('B1
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
await tap('[data-r="cycm"]');
|
|
89
|
+
ok('O2 the card has no conversation, no tabs, no chips, no toolbar and no old reader', await p.evaluate(() => !document.querySelector('#dlg, .stream, #vTabs, #rdSlide, #rdIn, #czViewer [role="tablist"], #czViewer .vz-rpc, #czViewer .vz-tb')));
|
|
90
|
+
ok('O3 the header names the report once; the summary card says Draft and its cycle (XvAReport)', await p.evaluate(() => document.querySelector('#czViewer .cz-vw-title').textContent === 'Partner review, 12 Oct') && await until(async () => await line() === 'Draft · Oct 12 cycle'), await line());
|
|
91
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]')));
|
|
92
|
+
ok('B1 the summary card has one primary, Issue', await primary() === 'issue:Issue', await primary());
|
|
93
|
+
const m1 = await until(async () => { const m = await menu(); return /Versions 2 cycles/.test(m) ? m : null; });
|
|
94
|
+
ok('B1 ⋯ holds the rest in the xvMore order: change it, look back, then Discard in red, and never repeats Issue (XvAReportMore)', m1 === 'Share Link or file,Schedule,Edit,Present,Read as a page,Live numbers,|,Download PPTX, PDF…,Versions 2 cycles,Brief,|,Open in full,|,Discard this draft'
|
|
95
|
+
&& await p.evaluate(() => { document.querySelector('#czViewer [data-cz-vw="more"]').click(); const b = [...document.querySelectorAll('#czViewer .cz-vw-menu [role="menuitem"]')].pop(); const red = b.classList.contains('bad'); document.querySelector('#czViewer [data-cz-vw="more"]').click(); return red; }), m1);
|
|
96
|
+
await shot('reader-summary-1280');
|
|
97
|
+
|
|
98
|
+
/* C: Versions lists this report's cycles */
|
|
99
|
+
await pick('Versions');
|
|
95
100
|
const cm = await p.evaluate(() => [...document.querySelectorAll('#czViewer [data-r^="cyc|"]')].map((b) => b.textContent));
|
|
96
101
|
const cg = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-pop-cyc .vz-lab')].map((b) => b.textContent).join());
|
|
97
|
-
ok('C1
|
|
98
|
-
await
|
|
102
|
+
ok('C1 Versions groups the cycles under Draft and Issued (RpStates), with no placeholder', cm.join('|') === 'Oct 12draft|Oct 5issued' && cg === 'Draft,Issued' && !(await has('[data-cz-placeholder]')), JSON.stringify(cm) + ' ' + cg);
|
|
103
|
+
await p.keyboard.press('Escape');
|
|
104
|
+
ok('C1 Escape closes the popover and the Viewer stays open', await until(() => p.evaluate(() => !document.querySelector('#czViewer .vz-pop') && !document.querySelector('#czViewer').hidden)));
|
|
99
105
|
|
|
100
106
|
/* D: the deck */
|
|
101
|
-
ok('D1 the deck has a title slide and one slide per section', await counter() === '1 of 5' && await bigTitle() === 'Partner review, 12 Oct', await counter());
|
|
107
|
+
ok('D1 the deck has a title slide and one slide per section; the counter sits under the strip', await counter() === '1 of 5' && await bigTitle() === 'Partner review, 12 Oct', await counter());
|
|
102
108
|
ok('D1 the title slide carries the first section\'s bold figure as its headline figure (ReportPanel.dc.html), and the thumbnail does not', await p.evaluate(() => { const f = document.querySelector('#czViewer .vz-rp0 .vz-slide .vz-tfig b'); return !!f && f.textContent === '33%' && !document.querySelector('#czViewer .vz-th .vz-tfig'); }), await p.evaluate(() => (document.querySelector('#czViewer .vz-rp0 .vz-slide') || {}).innerHTML));
|
|
103
|
-
const strip = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-th')].map((b) => b.getAttribute('aria-label')));
|
|
104
|
-
ok('D2 the thumbnails list the slides in the document\'s order', strip.join() === 'Slide 1: Title,Slide 2: Headline,Slide 3: Initiatives,Slide 4: Needs your call,Slide 5: Sources'
|
|
109
|
+
const strip = await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-strip .vz-th')].map((b) => b.getAttribute('aria-label')));
|
|
110
|
+
ok('D2 ‹ the thumbnails › list the slides in the document\'s order (XvAReport)', strip.join() === 'Slide 1: Title,Slide 2: Headline,Slide 3: Initiatives,Slide 4: Needs your call,Slide 5: Sources'
|
|
111
|
+
&& await p.evaluate(() => { const s = document.querySelector('#czViewer .rp-strip'); return s.firstElementChild.dataset.r === 'prev' && s.lastElementChild.dataset.r === 'next' && s.firstElementChild.disabled; }), strip.join());
|
|
105
112
|
await tap('[data-r="next"]');
|
|
106
113
|
ok('D3 Next moves to the headline, with its words as written', await counter() === '2 of 5' && await p.evaluate(() => document.querySelector('#czViewer .vz-slide').textContent.includes('Partner activation is 33%, short of its line.') && document.querySelector('#czViewer .vz-slide b').textContent === '33%'));
|
|
107
114
|
await p.focus(V + '.vz-slide'); await p.keyboard.press('ArrowRight');
|
|
@@ -110,132 +117,129 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
110
117
|
ok('D5 a thumbnail goes to its slide', await counter() === '5 of 5' && await bigTitle() === 'Sources' && await p.evaluate(() => document.querySelector('#czViewer [data-r="next"]').disabled));
|
|
111
118
|
await shot('reader-deck-1280');
|
|
112
119
|
|
|
113
|
-
/* G:
|
|
114
|
-
await
|
|
120
|
+
/* G: read as a page (RpDoc, XvAReportDoc) */
|
|
121
|
+
await pick('Read as a page');
|
|
122
|
+
await until(() => has('.rp-pg'));
|
|
115
123
|
const heads = await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-pg h2')].map((h) => h.textContent));
|
|
116
|
-
ok('G1
|
|
117
|
-
ok('G2 the sources are the footnote line
|
|
124
|
+
ok('G1 the page is paper: the title, the headline as In one minute, numbered sections as written', heads.join() === '1 · Initiatives,2 · Needs your call' && await p.evaluate(() => document.querySelector('#czViewer .rp-pg h1').textContent === 'Partner review, 12 Oct' && /33%/.test(document.querySelector('#czViewer .rp-minute').textContent)), heads.join());
|
|
125
|
+
ok('G2 the sources are the footnote line; Page 1 of 1 is said once under the sheets, and no bar over them repeats the state', await p.evaluate(() => /krm-a/.test(document.querySelector('#czViewer .rp-fn').textContent) && document.querySelector('#czViewer .rp-paperwell + [data-rp-page]').textContent === 'Page 1 of 1' && !document.querySelector('#czViewer .rp-paperbar, #czViewer .rp-pno')));
|
|
126
|
+
ok('G2 the header tile is the document\'s while it reads as a page', await p.evaluate(() => /M7 3h7l5 5v13H7z/.test(document.querySelector('#czViewer .cz-vw-tile').innerHTML)));
|
|
127
|
+
ok('G2 ⋯ now offers Read as slides in place of Read as a page', /Present,Read as slides,Live numbers,/.test(await menu()));
|
|
118
128
|
await shot('reader-doc-1280');
|
|
119
|
-
await
|
|
120
|
-
ok('G3 Download offers
|
|
121
|
-
await
|
|
129
|
+
await pick('Download');
|
|
130
|
+
ok('G3 Download offers every file and Print: PDF, Word from report-export', await p.evaluate(() => { const a = document.querySelector('#czViewer .vz-pop-dl [data-r="dl|docx"]'); return !!document.querySelector('#czViewer .vz-pop-dl [data-r="pdf"]') && a && /fmt=docx/.test(a.getAttribute('href')) && !!document.querySelector('#czViewer .vz-pop-dl [data-r="print"]'); }));
|
|
131
|
+
await p.keyboard.press('Escape');
|
|
122
132
|
|
|
123
133
|
/* L: the live page (RpLive): the numbers Insights reads */
|
|
124
|
-
await
|
|
134
|
+
await pick('Live numbers');
|
|
125
135
|
await until(() => has('.rp-live .rp-kps, .rp-live .rp-empty'));
|
|
126
136
|
const lv = await p.evaluate(() => ({ tiles: [...document.querySelectorAll('#czViewer .rp-kp > span:first-child')].map((x) => x.textContent), first: (document.querySelector('#czViewer .rp-kp b') || {}).textContent, pts: document.querySelectorAll('#czViewer .rp-pt').length }));
|
|
127
|
-
ok('L1 Live
|
|
137
|
+
ok('L1 Live numbers: the goal tile with its latest reading, then Goals on track, Shipped and At risk', lv.tiles.join() === 'Partner activation,Goals on track,Shipped,At risk' && lv.first === '33%', JSON.stringify(lv));
|
|
128
138
|
await tap('[data-r="lv|range|q"]');
|
|
129
139
|
ok('L2 the range Q draws the three readings, and a point names its value', await p.evaluate(() => document.querySelectorAll('#czViewer .rp-pt').length === 3) && await p.evaluate(() => /33%/.test(document.querySelectorAll('#czViewer .rp-pt')[2].getAttribute('aria-label'))));
|
|
130
140
|
await tap('[data-r="lv|pt|2"]');
|
|
131
141
|
ok('L3 pressing a point opens its popover with Open in Insights', await p.evaluate(() => /1 Oct · 33%/.test((document.querySelector('#czViewer .rp-pop') || {}).textContent || '')));
|
|
132
142
|
await shot('reader-live-1280');
|
|
133
|
-
await
|
|
143
|
+
await pick('Read as slides');
|
|
134
144
|
|
|
135
145
|
/* B2 the schedule; K the Brief */
|
|
136
|
-
await
|
|
137
|
-
ok('B2 a report with no template
|
|
146
|
+
await pick('Schedule');
|
|
147
|
+
ok('B2 Schedule: a report with no template offers the cadences, the weekdays and the time, and says a template is saved', await p.evaluate(() => document.querySelectorAll('#czViewer [data-r^="scad|"]').length === 4 && document.querySelectorAll('#czViewer [data-r^="sday|"]').length === 5 && !!document.querySelector('#czViewer [data-r="stime"]')) && /saves its sections and look as a template/.test(await p.textContent(V + '.vz-pop')));
|
|
138
148
|
await tap('[data-r="pop|"]');
|
|
139
|
-
await
|
|
149
|
+
await pick('Brief');
|
|
140
150
|
await until(() => has('.rp-brief'));
|
|
141
|
-
const bf = await p.evaluate(() => ({ dt: [...document.querySelectorAll('#czViewer .rp-kv dt')].map((x) => x.textContent).join(), chips: [...document.querySelectorAll('#czViewer .rp-kv .rp-chip')].map((x) => x.textContent).join(), lbl: [...document.querySelectorAll('#czViewer .rp-brief .rp-lbl')].map((x) => x.textContent).join(), text: document.querySelector('#czViewer .rp-brief').textContent,
|
|
142
|
-
ok('K1 Brief (RpBrief): At a glance For, Read by, Goes out, Built from (the sources the report names), Please confirm, Why it looks like this', bf.dt === 'For,Read by,Goes out,Built from' && bf.chips === 'KR metric record krm-a' && bf.lbl === 'At a glance,Please confirm,Why it looks like this' && !bf.
|
|
151
|
+
const bf = await p.evaluate(() => ({ dt: [...document.querySelectorAll('#czViewer .rp-kv dt')].map((x) => x.textContent).join(), chips: [...document.querySelectorAll('#czViewer .rp-kv .rp-chip')].map((x) => x.textContent).join(), lbl: [...document.querySelectorAll('#czViewer .rp-brief .rp-lbl')].map((x) => x.textContent).join(), text: document.querySelector('#czViewer .rp-brief').textContent, sum: !!document.querySelector('#czViewer .czs-sum') }));
|
|
152
|
+
ok('K1 Brief (RpBrief): At a glance For, Read by, Goes out, Built from (the sources the report names), Please confirm, Why it looks like this', bf.dt === 'For,Read by,Goes out,Built from' && bf.chips === 'KR metric record krm-a' && bf.lbl === 'At a glance,Please confirm,Why it looks like this' && !bf.sum, JSON.stringify(bf));
|
|
143
153
|
ok('K2 every check passed, so nothing waits; no look is saved, so it says the standard look; no placeholder', /Nothing to confirm/.test(bf.text) && /standard PMOS look/.test(bf.text) && !(await has('[data-cz-placeholder]')));
|
|
144
154
|
await shot('reader-brief-1280');
|
|
145
|
-
await tap('[data-r="tab|report"]');
|
|
155
|
+
await tap('.rp-back [data-r="tab|report"]');
|
|
156
|
+
ok('K3 ← goes back to the report', await until(() => has('.czs-sum')) && !(await has('.rp-brief')));
|
|
146
157
|
|
|
147
|
-
/* N: Present */
|
|
158
|
+
/* N: Present opens the presenter window (premium-mtg-present.js), not a view of its own */
|
|
148
159
|
await tap('[data-r="go|0"]');
|
|
149
|
-
await
|
|
150
|
-
await until(() => p
|
|
151
|
-
ok('N1 Present shows the current slide over the whole page, its numbered strip, Stop presenting and the key hint', await p.evaluate(() => { const e = document.querySelector('#vzPres'), r = e.getBoundingClientRect(); return r.width >= innerWidth - 1 && r.height >= innerHeight - 1 && !!e.querySelector('.vz-title') && e.querySelectorAll('.rp-tb').length === 5 && !!e.querySelector('[data-r="end"]') && /B to blank/.test(e.textContent) && !e.querySelector('[data-cz-placeholder]'); }));
|
|
160
|
+
await pick('Present');
|
|
161
|
+
ok('N1 Present opens the presenter window on the report', await until(() => p.evaluate(() => { const d = document.querySelector('[role="dialog"][aria-label^="Presenting"]'); return d && !document.querySelector('#czViewer').contains(d) && !d.querySelector('[data-cz-placeholder]'); }), 10000));
|
|
152
162
|
await shot('reader-present-1280');
|
|
153
|
-
await p.keyboard.press('ArrowRight');
|
|
154
|
-
ok('N2 the arrow keys move while presenting', await until(() => p.evaluate(() => /^Slide 2 of 5$/.test(document.querySelector('#vzPres .rp-prh [aria-live]').textContent))));
|
|
155
|
-
await p.keyboard.press('b');
|
|
156
|
-
ok('N2 B blanks the screen, and B again shows the slide', await until(() => p.evaluate(() => !!document.querySelector('#vzPres .rp-blank'))) && (await p.keyboard.press('b'), await until(() => p.evaluate(() => !document.querySelector('#vzPres .rp-blank')))));
|
|
157
163
|
await p.keyboard.press('Escape');
|
|
158
|
-
ok('N3 Escape stops presenting and the card stays open on
|
|
164
|
+
ok('N3 Escape stops presenting and the card stays open on its slide', await until(() => p.evaluate(() => !document.querySelector('[role="dialog"][aria-label^="Presenting"]'))) && await counter() === '1 of 5' && !(await p.evaluate(() => document.querySelector('#czViewer').hidden)));
|
|
159
165
|
|
|
160
166
|
/* W: download */
|
|
161
|
-
await
|
|
167
|
+
await pick('Download');
|
|
162
168
|
const items = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-fmts .vz-fmt')].map((a) => a.textContent + '|' + (a.getAttribute('href') || '')));
|
|
163
|
-
ok('W1
|
|
164
|
-
ok('W1 then Print, Versions with 2 cycles and Discard this draft', await p.evaluate(() => !!document.querySelector('#czViewer .vz-pop [data-r="print"]') && /Versions\s*2 cycles/.test(document.querySelector('#czViewer .vz-pop [data-r="cycm"]').textContent) && /Discard this draft/.test(document.querySelector('#czViewer .vz-pop [data-r="discard"]').textContent)));
|
|
169
|
+
ok('W1 Download offers PPTX, DOCX, PDF, XLSX, CSV and MD; the Office files and CSV come from report-export', items.map((x) => x.split('|')[0]).join() === 'PPTX,DOCX,PDF,XLSX,CSV,MD' && [0, 1, 3, 4].every((i) => items[i].includes('/api/report-export?') && items[i].includes('fmt=' + ['pptx', 'docx', '', 'xlsx', 'csv'][i]) && items[i].includes('path=' + encodeURIComponent(pNew))), items.join(' / '));
|
|
165
170
|
const [dl] = await Promise.all([p.waitForEvent('download'), p.click(V + '[data-r="dl|pptx"]')]);
|
|
166
171
|
const pptx = fs.readFileSync(await dl.path());
|
|
167
172
|
ok('W2 PPTX downloads a .pptx of the document', /\.pptx$/.test(dl.suggestedFilename()) && pptx.slice(0, 2).toString() === 'PK', dl.suggestedFilename());
|
|
168
173
|
await until(() => p.evaluate(() => !document.querySelector('#czViewer .vz-pop')));
|
|
169
|
-
await
|
|
174
|
+
await pick('Download');
|
|
170
175
|
const [md] = await Promise.all([p.waitForEvent('download'), p.click(V + '[data-r="md"]')]);
|
|
171
176
|
ok('W3 MD downloads the file as written', fs.readFileSync(await md.path(), 'utf8') === DOC && /\.md$/.test(md.suggestedFilename()), md.suggestedFilename());
|
|
172
177
|
|
|
173
178
|
/* X: print */
|
|
174
179
|
await p.evaluate(() => { window.__pr = null; window.open = () => ({ document: { open() {}, write(h) { window.__pr = h; }, close() {} }, focus() {}, print() { window.__printed = true; } }); });
|
|
175
|
-
await
|
|
180
|
+
await pick('Download'); await tap('[data-r="print"]');
|
|
176
181
|
const pr = await until(() => p.evaluate(() => (window.__printed ? { h: window.__pr || '' } : null)));
|
|
177
182
|
ok('X1 Print opens the print page with one slide to a page', pr && /pmos-print-deck/.test(pr.h) && (pr.h.match(/class="pmos-slide"/g) || []).length === 5 && pr.h.includes('premium-report-print.css'), pr ? pr.h.slice(0, 300) : 'not printed');
|
|
178
183
|
|
|
179
|
-
/* E: Edit edits in place: on
|
|
180
|
-
await
|
|
181
|
-
await
|
|
182
|
-
ok('E1 Edit on
|
|
183
|
-
ok('E2 while editing the
|
|
184
|
+
/* E: Edit edits in place: on a page the page editor, inside the card; Cancel brings the report back */
|
|
185
|
+
await pick('Read as a page');
|
|
186
|
+
await pick('Edit');
|
|
187
|
+
ok('E1 Edit on a page mounts the page editor in the card, marked Waiting for design', await until(() => p.evaluate(() => { const h = document.querySelector('#czViewer [data-vz-ed]'); return h && h.dataset.mounted && h.children.length > 0 && !!document.querySelector('#czViewer [data-cz-placeholder="Page editor"]'); }), 15000));
|
|
188
|
+
ok('E2 while editing the edit bar takes the summary\'s place: the chip says Editing the Oct 12 draft, then Slides | Page and Cancel', /Editing the Oct 12 draft/.test(await chipT()) && await tools() === 'view|deck,view|doc,edcancel' && !(await has('.czs-sum')), await tools());
|
|
184
189
|
await tap('[data-r="edcancel"]');
|
|
185
190
|
ok('E3 Cancel brings the report back', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .rp-pg') && !document.querySelector('#czViewer [data-vz-ed]'))));
|
|
186
|
-
await
|
|
191
|
+
await pick('Read as slides');
|
|
187
192
|
|
|
188
|
-
/* I: an issued cycle is frozen;
|
|
189
|
-
await
|
|
193
|
+
/* I: an issued cycle is frozen; Versions opens it */
|
|
194
|
+
await pick('Versions');
|
|
190
195
|
await tap(`[data-r="cyc|${pOld}"]`);
|
|
191
|
-
await until(async () =>
|
|
192
|
-
|
|
196
|
+
await until(async () => await line() === 'Issued 5 Oct' && !!(await p.$(V + '.vz-slide')));
|
|
197
|
+
const m2 = await until(async () => { const m = await menu(); return /Start the next cycle/.test(m) ? m : null; });
|
|
198
|
+
ok('I1 Versions opens the issued cycle: its one primary is Share, it says it is not shared yet, ⋯ has no Edit, no Share and no Discard, and offers Start the next cycle', await primary() === 'share:Share' && /Not shared yet/.test(await p.textContent(V + '.czs-sum')) && m2 && !/Edit|Share|Discard/.test(m2) && /Archive this cycle$/.test(m2), m2);
|
|
193
199
|
ok('I2 an issued cycle still reads as a deck', await counter() === '1 of 3', await counter());
|
|
194
200
|
|
|
195
201
|
/* P: the writes */
|
|
196
202
|
ok('P1 reading, presenting, downloading, printing and editing without saving post nothing', posts.length === 0, posts.join());
|
|
197
203
|
ok('P2 the document file is unchanged', fs.readFileSync(path.join(dir, pNew), 'utf8') === DOC);
|
|
198
204
|
|
|
199
|
-
/* F: floors */
|
|
200
|
-
await openAt(pNew);
|
|
205
|
+
/* F: floors (XvAPhReport: the same shell, full screen) */
|
|
201
206
|
await p.setViewportSize({ width: 390, height: 844 });
|
|
202
|
-
await
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
ok('F2 at 390 px More also holds Edit, Present and Share', await p.evaluate(() => ['edit', 'present', 'share'].every((k) => { const b = document.querySelector('#czViewer .vz-pop .vz-pho [data-r="' + k + '"]'); return b && b.getClientRects().length; })));
|
|
208
|
-
await tap('[data-r="more"]');
|
|
207
|
+
await openAt(pNew);
|
|
208
|
+
await sleep(300);
|
|
209
|
+
const fl = await p.evaluate(() => { const v = (s) => { const e = document.querySelector('#czViewer ' + s); return !!e && e.getClientRects().length > 0; }, r = document.querySelector('#czViewer').getBoundingClientRect(), th = document.querySelector('#czViewer .rp-strip').getBoundingClientRect();
|
|
210
|
+
return { over: document.documentElement.scrollWidth - innerWidth, full: r.width >= innerWidth - 1, sum: v('.czs-sum .czs-pri'), strip: th.right <= innerWidth + 1, more: v('[data-cz-vw="more"]'), back: v('[data-cz-vw="back"]') }; });
|
|
211
|
+
ok('F1 at 390 px the Viewer is full screen with ←, ⋯, the summary with Issue and the strip, and no sideways scroll', fl.over <= 0 && fl.full && fl.sum && fl.strip && fl.more && fl.back, JSON.stringify(fl));
|
|
209
212
|
await shot('reader-deck-390');
|
|
210
213
|
await p.setViewportSize({ width: 1280, height: 900 });
|
|
211
214
|
|
|
212
215
|
/* S: Issue: a press says what it checks and does, then issues on the real route */
|
|
213
216
|
const before = posts.length;
|
|
214
|
-
await tap('[data-
|
|
215
|
-
ok('S1 Issue first shows the three checks and says nothing is sent, and posts nothing', await until(() => p.evaluate(() => { const c = document.querySelector('#czViewer .vz-conf'); return c && c.querySelectorAll('li').length === 3 && !/Checking the sources/.test(c.textContent) && /Nothing is sent/.test(c.textContent); }), 10000) && posts.length === before, await p.evaluate(() => (document.querySelector('#czViewer .vz-conf') || {}).textContent));
|
|
217
|
+
await tap('.czs-sum [data-czs-act="issue"]');
|
|
218
|
+
ok('S1 Issue first shows the three checks in place of the summary and says nothing is sent, and posts nothing (XvAReportIssue)', await until(() => p.evaluate(() => { const c = document.querySelector('#czViewer .vz-conf'); return c && c.querySelectorAll('li').length === 3 && !/Checking the sources/.test(c.textContent) && /Nothing is sent/.test(c.textContent) && !document.querySelector('#czViewer .czs-sum'); }), 10000) && posts.length === before, await p.evaluate(() => (document.querySelector('#czViewer .vz-conf') || {}).textContent));
|
|
216
219
|
await shot('reader-issue-confirm-1280');
|
|
217
220
|
await tap('[data-r="issueok"]');
|
|
218
|
-
ok('S2 Issue it issues the cycle on the report route
|
|
221
|
+
ok('S2 Issue it issues the cycle on the report route; the summary says Issued and its one primary is Share', await until(async () => await line() === 'Issued 12 Oct' && await primary() === 'share:Share', 15000) && posts.slice(before).join() === '/api/report/issue', posts.slice(before).join() + ' ' + await p.evaluate(() => document.querySelector('#czViewer .vz-rpb').textContent.slice(0, 300)));
|
|
219
222
|
ok('S3 the issue is recorded in the issues ledger', issues.isIssued(issues.readIssues(dir), CAD, '2026-10-12'));
|
|
220
223
|
await shot('reader-issued-1280');
|
|
221
224
|
|
|
222
|
-
/* A: an issued cycle archives from
|
|
225
|
+
/* A: an issued cycle archives from ⋯, after one confirm, and comes back */
|
|
223
226
|
const b2 = posts.length;
|
|
224
|
-
await
|
|
227
|
+
await pick('Archive this cycle');
|
|
225
228
|
ok('A1 Archive first asks in the card at the foot (RpStates), and posts nothing', await until(() => p.evaluate(() => /^Archive Oct 12\?/.test((document.querySelector('#czViewer .rp-ask[role="alertdialog"]') || {}).textContent || ''))) && posts.length === b2);
|
|
226
229
|
await shot('reader-archive-ask-1280');
|
|
227
230
|
await tap('[data-r="askok"]');
|
|
228
|
-
ok('A2 Archive posts the archive route
|
|
229
|
-
await
|
|
230
|
-
ok('A3
|
|
231
|
-
await
|
|
232
|
-
|
|
231
|
+
ok('A2 Archive posts the archive route; the summary says Archived and its one primary is Bring back', await until(async () => /^Archived · issued 12 Oct$/.test(await line()) && /^unarch\|.*:Bring back$/.test(await primary()), 8000) && posts.slice(b2).join() === '/api/report-documents/archive', posts.slice(b2).join() + ' ' + await line());
|
|
232
|
+
await pick('Versions');
|
|
233
|
+
ok('A3 Versions lists it under Archived with Bring back', await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-pop-cyc .vz-lab')].map((b) => b.textContent).join() === 'Issued,Archived' && !!document.querySelector('#czViewer .vz-pop-cyc [data-r^="unarch|"]')));
|
|
234
|
+
await p.keyboard.press('Escape');
|
|
235
|
+
await tap('.czs-sum [data-czs-act^="unarch|"]');
|
|
236
|
+
ok('A3 Bring back undoes it', await until(async () => await line() === 'Issued 12 Oct', 8000));
|
|
233
237
|
|
|
234
238
|
/* Y: Start the next cycle drafts a new cycle of the same report and opens it */
|
|
235
239
|
const b3 = posts.length;
|
|
236
|
-
await
|
|
240
|
+
await pick('Start the next cycle');
|
|
237
241
|
/* the scratch repository holds no initiative records, so the drafter refuses: the panel says why and stays on the issued cycle */
|
|
238
|
-
ok('Y1 Start the next cycle posts the report route once; when the drafter refuses, the panel says why', await until(() => p.evaluate(() => /The next cycle was not started: .*initiative records/.test((document.querySelector('#czViewer .vz-msg') || {}).textContent || '')), 15000) && posts.slice(b3).join() === '/api/report/draft' &&
|
|
242
|
+
ok('Y1 Start the next cycle posts the report route once; when the drafter refuses, the panel says why', await until(() => p.evaluate(() => /The next cycle was not started: .*initiative records/.test((document.querySelector('#czViewer .vz-msg') || {}).textContent || '')), 15000) && posts.slice(b3).join() === '/api/report/draft' && await line() === 'Issued 12 Oct', posts.slice(b3).join() + ' ' + await line() + ' ' + await p.evaluate(() => (document.querySelector('#czViewer .vz-msg') || {}).textContent || ''));
|
|
239
243
|
ok('F3 no page error', errs.length === 0, errs.join(' | '));
|
|
240
244
|
return finish();
|
|
241
245
|
})().catch((e) => { console.error(e); finish(1); });
|
|
@@ -58,14 +58,15 @@ const SPRINTS = { ok: true, source: 'jira', readAt: '2026-10-19T09:00:00Z', velo
|
|
|
58
58
|
await page.goto(BASE + '/premium-initiative.html?id=self-serve-v2&ws=w1&board=w1&theme=' + theme);
|
|
59
59
|
// the Board's expand link lands on Home's initiative layout (premium-agreed-design); its Overview has the Sprint press, and the Viewer shows one item at a time
|
|
60
60
|
S.up = await until(() => page.evaluate(() => !!document.querySelector('.hm-card [data-hm-ov]') && !!window.__premiumViewer && !!window.__premiumVwJira), 20000);
|
|
61
|
-
if (S.up) { if (!(await page.locator('.hm-card [data-hm-ov]').isVisible())) await page.click('#hmNeeds'); await page.click('.hm-card [data-hm-ov]'); /* a phone: the initiative card is in the top bar's sheet */ S.up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-
|
|
61
|
+
if (S.up) { if (!(await page.locator('.hm-card [data-hm-ov]').isVisible())) await page.click('#hmNeeds'); await page.click('.hm-card [data-hm-ov]'); /* a phone: the initiative card is in the top bar's sheet */ S.up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]'))); }
|
|
62
62
|
S.reads.length = 0;
|
|
63
63
|
return { page, ctx, S };
|
|
64
64
|
};
|
|
65
|
+
const viaMore = async (pg, label) => { await pg.click('#czViewer:not([hidden]) [data-cz-vw="more"]'); await until(() => pg.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); await pg.click(`#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("${label}"))`); }; // the Overview's other views, Open the full record and Sprint sit under ⋯ (XvATasks)
|
|
65
66
|
const toSprint = async (page) => {
|
|
66
|
-
if (!(await page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-
|
|
67
|
-
await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-
|
|
68
|
-
await page
|
|
67
|
+
if (!(await page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')))) { if (!(await page.locator('.hm-card [data-hm-ov]').isVisible())) await page.click('#hmNeeds'); await page.click('.hm-card [data-hm-ov]'); }
|
|
68
|
+
await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 5000);
|
|
69
|
+
await viaMore(page, 'Sprint');
|
|
69
70
|
return until(() => page.evaluate(() => !!document.querySelector('#czViewer .obody.vw[data-vw="sprint:w1"] [data-jbl]')), 5000);
|
|
70
71
|
};
|
|
71
72
|
const openBacklog = async (page) => {
|
|
@@ -125,7 +126,7 @@ const SPRINTS = { ok: true, source: 'jira', readAt: '2026-10-19T09:00:00Z', velo
|
|
|
125
126
|
await page.route('**/api/board-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model, as_of: Date.now() }) }));
|
|
126
127
|
await page.goto(BASE + '/premium-board.html');
|
|
127
128
|
const up = await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .bt-l').length > 0), 20000);
|
|
128
|
-
ok('R10 the Board has no Sprint card; its sprint chip opens the Sprints and releases popover, and its Backlog row opens the backlog in the
|
|
129
|
+
ok('R10 the Board has no Sprint card; its sprint chip opens the Sprints and releases popover, and its Backlog row opens the backlog in the Viewer, never the dialog', up && await page.evaluate(() => !document.querySelector('#cSpr, #openBacklog, #popSpr')) && (await page.click('#chSprint'), await until(() => page.evaluate(() => { const p = document.querySelector('#bdPop'); return !!p && !p.hidden && p.getAttribute('aria-label') === 'Sprints and releases' && !!p.querySelector('[data-backlog]'); }))) && (await page.click('#bdPop [data-backlog]'), await until(() => page.evaluate(() => { const k = document.querySelector('#czViewer'); return !!k && !k.hidden && /Backlog/.test((k.querySelector('.cz-vw-title') || {}).textContent) && !!!document.querySelector('#dlg.on'); }))));
|
|
129
130
|
ok('R10 no page error on the Board', errs.length === 0, errs.join(' | '));
|
|
130
131
|
await ctx.close();
|
|
131
132
|
}
|