create-pmos 0.415.0 → 0.417.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +25 -25
- package/payload/KIT-VERSION +2 -2
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/payload/state/log.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +3 -3
- package/workspace/briefing-premium-board-test.js +72 -43
- package/workspace/briefing-premium-doc-edit-test.js +2 -2
- package/workspace/briefing-premium-initiative-test.js +19 -22
- package/workspace/briefing-premium-insights-test.js +28 -17
- package/workspace/changelog.json +24 -0
- package/workspace/core-docs-workflow-test.js +1 -1
- package/workspace/guide/workflows.md +4 -3
- package/workspace/ini-workflow-test.js +11 -11
- package/workspace/lib/board-premium.js +7 -2
- package/workspace/lib/board-trail.js +6 -1
- package/workspace/lib/engine/boards.js +8 -2
- package/workspace/lib/initiative-chat.js +4 -3
- package/workspace/lib/initiative-premium.js +5 -3
- package/workspace/lib/insights-premium.js +9 -1
- package/workspace/lib/pmos-verbs.js +1 -1
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-boards.js +73 -6
- package/workspace/lib/routes-live.js +53 -0
- package/workspace/lib/task-cli.js +88 -24
- package/workspace/lib/task-items.js +3 -1
- package/workspace/lib/workflow-cli.js +10 -4
- package/workspace/milestone-suggest-test.js +2 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +12 -8
- package/workspace/premium-chat-report-tab-test.js +13 -5
- package/workspace/premium-core-doc-issue-test.js +1 -1
- package/workspace/premium-report-read-test.js +66 -51
- package/workspace/premium-vw-backlog-test.js +3 -3
- package/workspace/premium-vw-doc-test.js +3 -3
- package/workspace/premium-vw-item-test.js +4 -4
- package/workspace/premium-vw-jira-test.js +14 -13
- package/workspace/premium-vw-slides-test.js +7 -5
- package/workspace/program-panel-test.js +1 -1
- package/workspace/public/pm/bd-ini-panel.js +68 -230
- package/workspace/public/pm/cozy-insights.css +15 -0
- package/workspace/public/pm/cozy-live-pill.css +48 -0
- package/workspace/public/pm/cozy-live-pill.js +141 -0
- package/workspace/public/pm/cozy-viewer.js +4 -3
- package/workspace/public/pm/cozy-vw-rp.css +48 -0
- package/workspace/public/pm/home-app.js +45 -8
- package/workspace/public/pm/home-chat.js +5 -2
- package/workspace/public/pm/home-ini.js +57 -22
- package/workspace/public/pm/home-task.js +16 -5
- package/workspace/public/pm/ini-view-model.js +277 -0
- package/workspace/public/pm/ini-view.css +122 -0
- package/workspace/public/pm/ini-view.js +180 -0
- package/workspace/public/pm/live-model.js +104 -0
- package/workspace/public/pm/ov-view.css +44 -0
- package/workspace/public/pm/premium-board.js +15 -16
- package/workspace/public/pm/premium-insights.js +61 -35
- package/workspace/public/pm/premium-report-read.js +74 -50
- package/workspace/public/pm/premium-report-tab.js +36 -15
- package/workspace/public/pm/premium-shell.js +1 -1
- package/workspace/public/pm/premium-vw-item-model.js +6 -3
- package/workspace/public/pm/premium-vw-item.js +25 -6
- package/workspace/public/pm/premium-vw-jira.js +17 -15
- package/workspace/public/pm/rp-parts.js +75 -12
- package/workspace/public/pm/task-card.css +24 -49
- package/workspace/public/pm/task-card.js +90 -64
- package/workspace/public/pm/tk-view.css +21 -0
- package/workspace/public/pm/tk-view.js +216 -0
- package/workspace/public/pm/wf-page.js +2 -0
- package/workspace/server.js +24 -1
- package/workspace/stage-card-test.js +49 -41
- package/workspace/task-card-test.js +83 -38
- package/workspace/test-files.json +3 -1
- package/workspace/test-lists/bd-ini-panel.json +3 -3
- package/workspace/tk-tasks-test.js +3 -3
- package/workspace/public/pm/bd-ini-model.js +0 -81
- package/workspace/public/pm/cozy-rec-pill.css +0 -12
- package/workspace/public/pm/cozy-rec-pill.js +0 -46
|
@@ -48,7 +48,8 @@ const look = () => {
|
|
|
48
48
|
tabs: pane ? [(vw.querySelector('.cz-vw-kind') || {}).textContent || ''] : [], pane: pane ? pane.textContent.replace(/\s+/g, ' ').trim() : null,
|
|
49
49
|
secs: pane ? (pane.querySelector('.vz-dkt') ? pane.querySelectorAll('.vz-dkt button').length - 1 : pane.querySelectorAll('.vz-secs li').length) : 0,
|
|
50
50
|
slide: pane && pane.querySelector('.vz-dkn > span') ? pane.querySelector('.vz-dkn > span').textContent : null,
|
|
51
|
-
sched: pane && pane.querySelector('[data-rt="sched"] b') ? pane.querySelector('[data-rt="sched"] b').textContent : null,
|
|
51
|
+
sched: pane && pane.querySelector('[data-rt="sched"] b') ? pane.querySelector('[data-rt="sched"] b').textContent : pane && pane.querySelector('.rp-mc[data-rt="sched"]') ? pane.querySelector('.rp-mc[data-rt="sched"]').textContent : null,
|
|
52
|
+
sum: pane && pane.querySelector('.rp-sum') ? { line: pane.querySelector('.rp-sum .czs-line').textContent, chips: [...pane.querySelectorAll('.rp-sum .rp-mc')].map((c) => c.textContent).join(), pri: (pane.querySelector('.rp-sum .rp-pri') || {}).getAttribute?.('aria-label') || '', seg: [...pane.querySelectorAll('.rp-seg button')].map((b) => b.textContent).join(), folds: [...pane.querySelectorAll('.czs-row')].map((r) => r.textContent).join('|') } : null,
|
|
52
53
|
wide: document.documentElement.scrollWidth > innerWidth + 1 };
|
|
53
54
|
};
|
|
54
55
|
|
|
@@ -80,15 +81,22 @@ const look = () => {
|
|
|
80
81
|
ok('R1 opening the chat opens no tab by itself', s0.tabs.length === 0, JSON.stringify(s0));
|
|
81
82
|
await p.click('#hmLog [data-report-open]');
|
|
82
83
|
const s1 = await until(async () => { const v = await p.evaluate(look); return v.pane ? v : null; }) || await p.evaluate(look);
|
|
83
|
-
ok('R3 the new report
|
|
84
|
-
&& s1.
|
|
84
|
+
ok('R3 the new report opens the one report Viewer in its first state (OvReport): New · from your chat, Not set up yet, Set it up as an icon, the chips Once and the format, Slides | Document, a title slide and seven section slides, the folds At a glance and Structure and look', /Report · Growth leads/.test(s1.tabs.join(' ')) && /Social login weekly/.test(s1.pane || '') && !/Waiting for design/.test(s1.pane || '')
|
|
85
|
+
&& s1.sum && s1.sum.line === 'New · from your chatNot set up yet' && s1.sum.pri === 'Set it up' && s1.sum.chips === 'Once,Google Slides' && s1.sum.seg === 'Slides,Document' && s1.sum.folds === 'At a glanceFor, read by, goes out|Structure and looknew'
|
|
86
|
+
&& /One slide per section: Headline, Timeline/.test(s1.pane || '') && s1.secs === 7 && s1.slide === 'Slide 1 of 8' && s1.sched === 'Once' && !(await p.$('#czViewer .rt, #czViewer .obody, #dlg:not([hidden])')), JSON.stringify(s1));
|
|
87
|
+
await p.click('#czViewer .czs-row[data-czs-fold="glance"]');
|
|
88
|
+
ok('R3 At a glance opens with For, Read by, Goes out and Format', await until(() => p.evaluate(() => /Read byGrowth leads/.test(document.querySelector('#czViewer .czs-sec.on').textContent) && /FormatGoogle Slides/.test(document.querySelector('#czViewer .czs-sec.on').textContent) && /Goes outOff · runs once/.test(document.querySelector('#czViewer .czs-sec.on').textContent))));
|
|
89
|
+
await p.click('#czViewer .czs-row[data-czs-fold="glance"]');
|
|
90
|
+
await p.click('#czViewer [data-rt="view|doc"]');
|
|
91
|
+
ok('R3 Document shows the outline as a page, and Slides brings the deck back', await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vz-dkp .vz-secs li').length === 7 && !document.querySelector('#czViewer .vz-dks'))));
|
|
92
|
+
await p.click('#czViewer [data-rt="view|deck"]');
|
|
85
93
|
await p.click('#czViewer [data-rt="sl|1"]');
|
|
86
94
|
ok('R3 next shows the second slide, a section of the report', /Slide 2 of 8/.test((await p.evaluate(look)).slide || '') && /Headline/.test(await p.textContent('#czViewer .vz-dks')));
|
|
87
95
|
if (shots) await p.screenshot({ path: `${shots}/new-1280-light.png` });
|
|
88
96
|
await p.click('#czViewer [data-rt="sched"]');
|
|
89
97
|
await p.click('#czViewer [data-rt="pick|2"]');
|
|
90
|
-
const s2 = await until(async () => { const v = await p.evaluate(look); return v.sched && /
|
|
91
|
-
ok('R3 a pick changes the chip only: nothing is written',
|
|
98
|
+
const s2 = await until(async () => { const v = await p.evaluate(look); return v.sched && /Every week/.test(v.sched) ? v : null; }) || await p.evaluate(look);
|
|
99
|
+
ok('R3 a pick changes the chip only: nothing is written', s2.sched === 'Every week' && !ledger().some((l) => l.ev === 'setup'), JSON.stringify(s2));
|
|
92
100
|
await p.click('#czViewer [data-rt="sched"]'); await p.click('#czViewer [data-rt="pick|0"]');
|
|
93
101
|
await p.click('#czViewer [data-rt="setup"]');
|
|
94
102
|
const s3 = await until(async () => { const v = await p.evaluate(look); return v.pane && /Report template/.test(v.tabs.join()) && /Draft/.test(v.pane) ? v : null; }, 15000) || await p.evaluate(look);
|
|
@@ -118,7 +118,7 @@ const BODY = '## Purpose\n\nWhy this board exists.\n\n## Scope\n\nWhat it covers
|
|
|
118
118
|
// the initiative's page (canvas HbC): its list row opens it again when the Viewer shows something else
|
|
119
119
|
const ovOpen = async (p) => { await until(() => p.evaluate(() => !!document.querySelector('#hmList [data-hm-sel^="i:"][aria-current="true"]')), 60000);
|
|
120
120
|
if (!(await p.$('#czViewer:not([hidden]) [data-hi-v="page"]'))) await p.click('#hmList [data-hm-sel^="i:"][aria-current="true"]');
|
|
121
|
-
await until(() => p.evaluate(() => !!document.querySelector('#czViewer
|
|
121
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-hi-v="page"] .iv')), 60000); await p.click('#czViewer [data-cz-vw="more"]').then(() => p.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))')); // the initiative's page (canvas HbC): its + drills into Tasks
|
|
122
122
|
// the Overview opens on Tasks; the core documents are its Documents view (premium-uncovered-features, canvas InDocs)
|
|
123
123
|
if (await until(() => p.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 30000)) await (async (pg) => { if (await pg.$('#czViewer [data-hi-view="docs"]')) await pg.click('#czViewer [data-hi-view="docs"]'); else await viaMore(pg, 'Documents'); })(p); };
|
|
124
124
|
const I = await open('/premium-initiative.html' + iq), ip = I.page;
|
|
@@ -21,6 +21,16 @@ const RDraft = require('./lib/report-draft.js');
|
|
|
21
21
|
|
|
22
22
|
const BASE = T.BASE;
|
|
23
23
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
24
|
+
/* SHOTS_1B=<dir>: the Viewer as it is now, light and dark, at 1440 and 390 wide (batch 6 item 1b's screenshots); the page is put back after. */
|
|
25
|
+
const four = async (p, name) => {
|
|
26
|
+
const dir = process.env.SHOTS_1B; if (!dir) return;
|
|
27
|
+
const vp = p.viewportSize();
|
|
28
|
+
for (const [w, h, tag] of [[1440, 900, 'desktop'], [390, 844, 'phone']]) for (const sch of ['light', 'dark']) {
|
|
29
|
+
await p.setViewportSize({ width: w, height: h }); await p.emulateMedia({ colorScheme: sch }); await new Promise((r) => setTimeout(r, 350));
|
|
30
|
+
await p.screenshot({ path: require('path').join(dir, `${name}-${tag}-${sch}.png`) });
|
|
31
|
+
}
|
|
32
|
+
await p.setViewportSize(vp); await p.emulateMedia({ colorScheme: null }); await new Promise((r) => setTimeout(r, 250));
|
|
33
|
+
};
|
|
24
34
|
const until = async (fn, ms = 20000, step = 150) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
25
35
|
const results = [];
|
|
26
36
|
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 500) : ''}`); };
|
|
@@ -72,10 +82,13 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
72
82
|
const V = '#czViewer ';
|
|
73
83
|
const tap = (sel) => p.$eval(V + sel, (b) => b.click());
|
|
74
84
|
const has = (sel) => p.$(V + sel).then((x) => !!x);
|
|
75
|
-
const counter = () => p.evaluate(() => (document.querySelector('#czViewer .rp-
|
|
85
|
+
const counter = () => p.evaluate(() => ((document.querySelector('#czViewer .rp-nav .rp-count') || {}).textContent || '').replace(/^Slide /, ''));
|
|
76
86
|
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 .
|
|
78
|
-
const primary = () => p.evaluate(() => [...document.querySelectorAll('#czViewer .
|
|
87
|
+
const line = () => p.evaluate(() => (document.querySelector('#czViewer .rp-sum .czs-line .rp-ln') || {}).textContent || '');
|
|
88
|
+
const primary = () => p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-sum .rp-pri')].map((b) => b.dataset.r + ':' + b.getAttribute('aria-label')).join());
|
|
89
|
+
const bar = () => p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-bar button')].map((b) => b.dataset.r + (b.getAttribute('aria-pressed') === 'true' ? '*' : '')).join());
|
|
90
|
+
const folds = () => p.evaluate(() => [...document.querySelectorAll('#czViewer .czs-secs .czs-row')].map((r) => r.textContent).join('|'));
|
|
91
|
+
const fold = (id) => p.evaluate((k) => { const r = document.querySelector(`#czViewer .czs-row[data-czs-fold="${k}"]`); if (r && r.getAttribute('aria-expanded') !== 'true') r.click(); return !!r; }, id);
|
|
79
92
|
const chipT = () => p.evaluate(() => (document.querySelector('#czViewer [data-r="cycm"]') || {}).textContent || '');
|
|
80
93
|
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());
|
|
81
94
|
/* shell A's ⋯ (cozy-viewer.js): the menu it draws from open({ more }) */
|
|
@@ -87,28 +100,29 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
87
100
|
/* O: the cycle opens in the Viewer card */
|
|
88
101
|
ok('O1 /premium-viewer.html?open=report opens the cycle in the Viewer card', await openAt(pNew));
|
|
89
102
|
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
|
|
103
|
+
ok('O3 the header names the report once; the summary card says Draft and its day (OvReport)', await p.evaluate(() => document.querySelector('#czViewer .cz-vw-title').textContent === 'Partner review, 12 Oct') && await until(async () => await line() === 'Draft · Oct 12'), await line());
|
|
91
104
|
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
|
-
|
|
94
|
-
ok('B1
|
|
105
|
+
ok('B1 the summary card has one primary, Issue it, as an icon; its chip says the schedule, Once (OvReport)', await primary() === 'issue:Issue it' && await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-sum .rp-mc')].map((c) => c.textContent).join() === 'Once'), await primary());
|
|
106
|
+
ok('B1 the bar: Slides | Document | Live page, then Edit, Present, Share and Download as icons (OvReport)', await bar() === 'view|deck*,view|doc,view|live,edit,present,share,dlm' && await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-tls button')].every((b) => !b.textContent.trim() && b.getAttribute('aria-label'))), await bar());
|
|
107
|
+
ok('B1 the folds: At a glance, Earlier cycles (1), Structure and look; Please confirm is not drawn when nothing waits', await until(async () => await folds() === 'At a glanceFor, read by, built from|Earlier cycles1|Structure and look'), await folds());
|
|
108
|
+
const m1 = await until(async () => { const m = await menu(); return /Schedule/.test(m) ? m : null; });
|
|
109
|
+
ok('B1 ⋯ holds only what the card does not show: Schedule, then Discard in red, and never repeats Issue (OvReport)', m1 === 'Schedule,|,Open in full,|,Discard this draft'
|
|
95
110
|
&& 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
111
|
await shot('reader-summary-1280');
|
|
112
|
+
await four(p, 'report-draft');
|
|
97
113
|
|
|
98
|
-
/* C:
|
|
99
|
-
await
|
|
100
|
-
const cm = await p.evaluate(() => [...document.querySelectorAll('#czViewer
|
|
101
|
-
|
|
102
|
-
|
|
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)));
|
|
114
|
+
/* C: Earlier cycles lists this report's other cycles */
|
|
115
|
+
await fold('cycles');
|
|
116
|
+
const cm = await until(() => p.evaluate(() => { const L = [...document.querySelectorAll('#czViewer .rp-cys .rp-cy')].map((b) => b.dataset.r + ' ' + b.textContent); return L.length ? L : null; }));
|
|
117
|
+
ok('C1 Earlier cycles lists the other cycle with its state, and it opens it; no placeholder', JSON.stringify(cm) === JSON.stringify(['cyc|' + pOld + ' Oct 5Issued']) && !(await has('[data-cz-placeholder]')), JSON.stringify(cm));
|
|
118
|
+
await fold('cycles');
|
|
105
119
|
|
|
106
120
|
/* D: the deck */
|
|
107
|
-
ok('D1 the deck has a title slide and one slide per section;
|
|
121
|
+
ok('D1 the deck has a title slide and one slide per section; ‹ Slide 1 of 5 › sits under the slide, then the thumbnails (OvReport)', await counter() === '1 of 5' && await bigTitle() === 'Partner review, 12 Oct' && await p.evaluate(() => { const n = document.querySelector('#czViewer .rp-nav'); return n.previousElementSibling.classList.contains('vz-slide') && n.nextElementSibling.classList.contains('rp-thumbs'); }), await counter());
|
|
108
122
|
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));
|
|
109
|
-
const strip = await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-
|
|
110
|
-
ok('D2
|
|
111
|
-
&& await p.evaluate(() => { const s = document.querySelector('#czViewer .rp-
|
|
123
|
+
const strip = await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-thumbs .vz-th')].map((b) => b.getAttribute('aria-label')));
|
|
124
|
+
ok('D2 the thumbnails list the slides in the document\'s order, and ‹ is off on the first slide', strip.join() === 'Slide 1: Title,Slide 2: Headline,Slide 3: Initiatives,Slide 4: Needs your call,Slide 5: Sources'
|
|
125
|
+
&& await p.evaluate(() => { const s = document.querySelector('#czViewer .rp-nav'); return s.firstElementChild.dataset.r === 'prev' && s.lastElementChild.dataset.r === 'next' && s.firstElementChild.disabled; }), strip.join());
|
|
112
126
|
await tap('[data-r="next"]');
|
|
113
127
|
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%'));
|
|
114
128
|
await p.focus(V + '.vz-slide'); await p.keyboard.press('ArrowRight');
|
|
@@ -118,20 +132,20 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
118
132
|
await shot('reader-deck-1280');
|
|
119
133
|
|
|
120
134
|
/* G: read as a page (RpDoc, XvAReportDoc) */
|
|
121
|
-
await
|
|
135
|
+
await tap('[data-r="view|doc"]');
|
|
122
136
|
await until(() => has('.rp-pg'));
|
|
123
137
|
const heads = await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-pg h2')].map((h) => h.textContent));
|
|
124
138
|
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
139
|
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
140
|
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
|
|
141
|
+
ok('G2 the switch shows Document pressed', await bar() === 'view|deck,view|doc*,view|live,edit,present,share,dlm', await bar());
|
|
128
142
|
await shot('reader-doc-1280');
|
|
129
|
-
await
|
|
143
|
+
await tap('[data-r="dlm"]');
|
|
130
144
|
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
145
|
await p.keyboard.press('Escape');
|
|
132
146
|
|
|
133
147
|
/* L: the live page (RpLive): the numbers Insights reads */
|
|
134
|
-
await
|
|
148
|
+
await tap('[data-r="view|live"]');
|
|
135
149
|
await until(() => has('.rp-live .rp-kps, .rp-live .rp-empty'));
|
|
136
150
|
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 }));
|
|
137
151
|
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));
|
|
@@ -140,62 +154,64 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
140
154
|
await tap('[data-r="lv|pt|2"]');
|
|
141
155
|
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 || '')));
|
|
142
156
|
await shot('reader-live-1280');
|
|
143
|
-
await
|
|
157
|
+
await tap('[data-r="view|deck"]');
|
|
144
158
|
|
|
145
|
-
/* B2 the schedule; K the Brief */
|
|
146
|
-
await
|
|
159
|
+
/* B2 the schedule; K the Brief, in folds */
|
|
160
|
+
await tap('.rp-sum .rp-mc[data-r="sched"]');
|
|
147
161
|
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')));
|
|
148
162
|
await tap('[data-r="pop|"]');
|
|
149
|
-
await
|
|
150
|
-
await until(() => has('.rp-
|
|
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()
|
|
152
|
-
ok('K1
|
|
153
|
-
|
|
163
|
+
await fold('glance');
|
|
164
|
+
await until(() => has('.czs-sec.on .rp-kv'));
|
|
165
|
+
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() }));
|
|
166
|
+
ok('K1 At a glance opens: For, Read by, Goes out, Built from (the sources the report names)', bf.dt === 'For,Read by,Goes out,Built from' && bf.chips === 'KR metric record krm-a', JSON.stringify(bf));
|
|
167
|
+
await fold('look');
|
|
168
|
+
const lk = await until(() => p.evaluate(() => { const e = document.querySelector('#czViewer .czs-sec[data-czs-id="look"] .czs-body'); return e && !e.hidden ? e.textContent : null; }));
|
|
169
|
+
ok('K2 Structure and look: the sections as written; no look is saved, so it says the standard look; nothing waits, so no Please confirm; no placeholder', /HeadlineInitiativesNeeds your callSources/.test(lk || '') && /standard PMOS look/.test(lk || '') && !(await has('.czs-row[data-czs-fold="confirm"]')) && !(await has('[data-cz-placeholder]')), lk);
|
|
154
170
|
await shot('reader-brief-1280');
|
|
155
|
-
await
|
|
156
|
-
|
|
171
|
+
await fold('glance'); await fold('look');
|
|
172
|
+
await p.evaluate(() => { for (const k of ['glance', 'look']) { const r = document.querySelector(`#czViewer .czs-row[data-czs-fold="${k}"]`); if (r && r.getAttribute('aria-expanded') === 'true') r.click(); } });
|
|
157
173
|
|
|
158
174
|
/* N: Present opens the presenter window (premium-mtg-present.js), not a view of its own */
|
|
159
175
|
await tap('[data-r="go|0"]');
|
|
160
|
-
await
|
|
176
|
+
await tap('[data-r="present"]');
|
|
161
177
|
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));
|
|
162
178
|
await shot('reader-present-1280');
|
|
163
179
|
await p.keyboard.press('Escape');
|
|
164
180
|
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)));
|
|
165
181
|
|
|
166
182
|
/* W: download */
|
|
167
|
-
await
|
|
183
|
+
await tap('[data-r="dlm"]');
|
|
168
184
|
const items = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-fmts .vz-fmt')].map((a) => a.textContent + '|' + (a.getAttribute('href') || '')));
|
|
169
185
|
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(' / '));
|
|
170
186
|
const [dl] = await Promise.all([p.waitForEvent('download'), p.click(V + '[data-r="dl|pptx"]')]);
|
|
171
187
|
const pptx = fs.readFileSync(await dl.path());
|
|
172
188
|
ok('W2 PPTX downloads a .pptx of the document', /\.pptx$/.test(dl.suggestedFilename()) && pptx.slice(0, 2).toString() === 'PK', dl.suggestedFilename());
|
|
173
189
|
await until(() => p.evaluate(() => !document.querySelector('#czViewer .vz-pop')));
|
|
174
|
-
await
|
|
190
|
+
await tap('[data-r="dlm"]');
|
|
175
191
|
const [md] = await Promise.all([p.waitForEvent('download'), p.click(V + '[data-r="md"]')]);
|
|
176
192
|
ok('W3 MD downloads the file as written', fs.readFileSync(await md.path(), 'utf8') === DOC && /\.md$/.test(md.suggestedFilename()), md.suggestedFilename());
|
|
177
193
|
|
|
178
194
|
/* X: print */
|
|
179
195
|
await p.evaluate(() => { window.__pr = null; window.open = () => ({ document: { open() {}, write(h) { window.__pr = h; }, close() {} }, focus() {}, print() { window.__printed = true; } }); });
|
|
180
|
-
await
|
|
196
|
+
await tap('[data-r="dlm"]'); await tap('[data-r="print"]');
|
|
181
197
|
const pr = await until(() => p.evaluate(() => (window.__printed ? { h: window.__pr || '' } : null)));
|
|
182
198
|
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');
|
|
183
199
|
|
|
184
200
|
/* E: Edit edits in place: on a page the page editor, inside the card; Cancel brings the report back */
|
|
185
|
-
await
|
|
186
|
-
await
|
|
201
|
+
await tap('[data-r="view|doc"]');
|
|
202
|
+
await tap('[data-r="edit"]');
|
|
187
203
|
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());
|
|
204
|
+
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 has('.rp-bar')), await tools());
|
|
189
205
|
await tap('[data-r="edcancel"]');
|
|
190
206
|
ok('E3 Cancel brings the report back', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .rp-pg') && !document.querySelector('#czViewer [data-vz-ed]'))));
|
|
191
|
-
await
|
|
207
|
+
await tap('[data-r="view|deck"]');
|
|
192
208
|
|
|
193
|
-
/* I: an issued cycle is frozen;
|
|
194
|
-
await
|
|
209
|
+
/* I: an issued cycle is frozen; Earlier cycles opens it */
|
|
210
|
+
await fold('cycles');
|
|
195
211
|
await tap(`[data-r="cyc|${pOld}"]`);
|
|
196
212
|
await until(async () => await line() === 'Issued 5 Oct' && !!(await p.$(V + '.vz-slide')));
|
|
197
213
|
const m2 = await until(async () => { const m = await menu(); return /Start the next cycle/.test(m) ? m : null; });
|
|
198
|
-
ok('I1
|
|
214
|
+
ok('I1 Earlier cycles opens the issued cycle: its one primary is Share, it says it is not shared yet, the bar has no Edit and no second Share, ⋯ has no Discard and offers Start the next cycle', await primary() === 'share:Share' && /Not shared yet/.test(await p.textContent(V + '.czs-sum')) && await bar() === 'view|deck*,view|doc,view|live,present,dlm' && m2 && !/Edit|Share|Discard/.test(m2) && /Archive this cycle$/.test(m2), m2 + ' ' + await bar());
|
|
199
215
|
ok('I2 an issued cycle still reads as a deck', await counter() === '1 of 3', await counter());
|
|
200
216
|
|
|
201
217
|
/* P: the writes */
|
|
@@ -206,21 +222,22 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
206
222
|
await p.setViewportSize({ width: 390, height: 844 });
|
|
207
223
|
await openAt(pNew);
|
|
208
224
|
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(),
|
|
210
|
-
return { over: document.documentElement.scrollWidth - innerWidth, full: r.width >= innerWidth - 1, sum: v('.
|
|
211
|
-
ok('F1 at 390 px the Viewer is full screen with ←, ⋯, the summary with Issue
|
|
225
|
+
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(), bb = document.querySelector('#czViewer .rp-bar').getBoundingClientRect();
|
|
226
|
+
return { over: document.documentElement.scrollWidth - innerWidth, full: r.width >= innerWidth - 1, sum: v('.rp-sum .rp-pri'), bar: bb.right <= innerWidth + 1, nav: v('.rp-nav'), thumbs: v('.rp-thumbs'), more: v('[data-cz-vw="more"]'), back: v('[data-cz-vw="back"]') }; });
|
|
227
|
+
ok('F1 at 390 px the Viewer is full screen with ←, ⋯, the summary with Issue it, the bar and ‹ Slide › with no thumbnails (OvReport phone), and no sideways scroll', fl.over <= 0 && fl.full && fl.sum && fl.bar && fl.nav && !fl.thumbs && fl.more && fl.back, JSON.stringify(fl));
|
|
212
228
|
await shot('reader-deck-390');
|
|
213
229
|
await p.setViewportSize({ width: 1280, height: 900 });
|
|
214
230
|
|
|
215
231
|
/* S: Issue: a press says what it checks and does, then issues on the real route */
|
|
216
232
|
const before = posts.length;
|
|
217
|
-
await tap('.
|
|
233
|
+
await tap('.rp-sum [data-r="issue"]');
|
|
218
234
|
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));
|
|
219
235
|
await shot('reader-issue-confirm-1280');
|
|
220
236
|
await tap('[data-r="issueok"]');
|
|
221
237
|
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)));
|
|
222
238
|
ok('S3 the issue is recorded in the issues ledger', issues.isIssued(issues.readIssues(dir), CAD, '2026-10-12'));
|
|
223
239
|
await shot('reader-issued-1280');
|
|
240
|
+
await four(p, 'report-issued');
|
|
224
241
|
|
|
225
242
|
/* A: an issued cycle archives from ⋯, after one confirm, and comes back */
|
|
226
243
|
const b2 = posts.length;
|
|
@@ -229,10 +246,8 @@ const iss = issues.appendFromCli(dir, [{ ev: 'issued', cadence: CAD, slot: '2026
|
|
|
229
246
|
await shot('reader-archive-ask-1280');
|
|
230
247
|
await tap('[data-r="askok"]');
|
|
231
248
|
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
|
|
233
|
-
|
|
234
|
-
await p.keyboard.press('Escape');
|
|
235
|
-
await tap('.czs-sum [data-czs-act^="unarch|"]');
|
|
249
|
+
ok('A3 an archived cycle: the bar has no Edit, and Share is back on the bar since Bring back is the primary', await bar() === 'view|deck*,view|doc,view|live,present,share,dlm', await bar());
|
|
250
|
+
await tap('.rp-sum [data-r^="unarch|"]');
|
|
236
251
|
ok('A3 Bring back undoes it', await until(async () => await line() === 'Issued 12 Oct', 8000));
|
|
237
252
|
|
|
238
253
|
/* Y: Start the next cycle drafts a new cycle of the same report and opens it */
|
|
@@ -57,14 +57,14 @@ const SPRINTS = { ok: true, source: 'jira', readAt: '2026-10-19T09:00:00Z', velo
|
|
|
57
57
|
await page.route('**/api/initiative-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: IMODEL, as_of: Date.now() }) }));
|
|
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
|
-
S.up = await until(() => page.evaluate(() => !!document.querySelector('
|
|
61
|
-
if (S.up) { await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .
|
|
60
|
+
S.up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv-sc') && !!window.__premiumViewer && !!window.__premiumVwJira), 20000);
|
|
61
|
+
if (S.up) { await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .iv', { timeout: 30000 }); })(page); /* ← back to the initiative's page, else its row, else the address again (an initiative the list does not show) */ await page.click('#czViewer [data-cz-vw="more"]').then(() => page.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))')); /* the initiative's page (canvas HbC): its + drills into Tasks */ 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
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)
|
|
66
66
|
const toSprint = async (page) => {
|
|
67
|
-
if (!(await page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')))) { await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .
|
|
67
|
+
if (!(await page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')))) { await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .iv', { timeout: 30000 }); })(page); /* ← back to the initiative's page, else its row, else the address again (an initiative the list does not show) */ await page.click('#czViewer [data-cz-vw="more"]').then(() => page.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))')); /* the initiative's page (canvas HbC): its + drills into Tasks */ }
|
|
68
68
|
await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 5000);
|
|
69
69
|
await viaMore(page, 'Sprint');
|
|
70
70
|
return until(() => page.evaluate(() => !!document.querySelector('#czViewer .obody.vw[data-vw="sprint:w1"] [data-jbl]')), 5000);
|
|
@@ -77,9 +77,9 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
|
|
|
77
77
|
return send({ ok: false, error: 'not in this test' }, 404);
|
|
78
78
|
});
|
|
79
79
|
await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&theme=' + theme);
|
|
80
|
-
await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-
|
|
80
|
+
await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-iv-docs]')), 15000); // the initiative's page (canvas HbC)
|
|
81
81
|
// the page's Documents "Show all N" opens every document in the Viewer
|
|
82
|
-
await page.click('#czViewer [data-
|
|
82
|
+
await page.click('#czViewer [data-iv-docs]');
|
|
83
83
|
await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]')), 15000);
|
|
84
84
|
await page.click('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]'); // the PRD opens as a page
|
|
85
85
|
await until(() => page.evaluate(() => document.querySelector('.vwdoc .cf, .vwdoc .vwempty:not(:empty)') && !/Reading the file/.test(document.querySelector('.vwdoc').textContent)));
|
|
@@ -109,7 +109,7 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
|
|
|
109
109
|
ok('D9 Links show what it is built from and what uses it, from the document library', /Built from · 1.*Onboarding interviews/.test(await txt(p, V + ' .vwmp')) && /Used by · 1.*Self-serve rubric/.test(await txt(p, V + ' .vwmp')) && /Links 2/.test(await txt(p, V + ' .vwmore')));
|
|
110
110
|
await p.click(V + ' [data-vd="open:planning/evals/self-serve-v2-rubric.md"]');
|
|
111
111
|
ok('D9 a linked document opens as a page in the Viewer, in place of this one', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .obody.vw[data-vw="doc:planning/evals/self-serve-v2-rubric.md"]'))));
|
|
112
|
-
await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .
|
|
112
|
+
await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .iv', { timeout: 30000 }); })(p); /* ← back to the initiative's page, else its row, else the address again (an initiative the list does not show) */ await p.click('#czViewer [data-iv-docs]'); // back to the PRD: the initiative's row opens its page, and Documents opens it again
|
|
113
113
|
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]')), 15000);
|
|
114
114
|
await p.click('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]');
|
|
115
115
|
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .obody.vw[data-vw="doc:planning/prd/self-serve-v2-prd.md"] .vwdoc .cf')));
|
|
@@ -48,11 +48,11 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
48
48
|
await page.route('**/api/initiative-premium*', (r) => { const u = r.request().url(); S.gets.push(u); if (!r.request().headers()['x-pmos-nonce']) S.vgets.push(u); const a = answer ? answer(u, S.gets.filter((x) => x === u).length) : { status: 200, body: { ok: true, state: 'ready', model: MODEL, as_of: Date.now() } }; r.fulfill({ status: a.status, contentType: 'application/json', body: JSON.stringify(a.body) }); });
|
|
49
49
|
await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
|
|
50
50
|
await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=' + theme);
|
|
51
|
-
S.up = await until(() => page.evaluate(() => !!document.querySelector('
|
|
51
|
+
S.up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv-sc') && !!window.__premiumWorkItem), 20000);
|
|
52
52
|
return { page, ctx, S };
|
|
53
53
|
};
|
|
54
54
|
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)
|
|
55
|
-
const overview = async (page) => { await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .
|
|
55
|
+
const overview = async (page) => { await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .iv', { timeout: 30000 }); })(page); /* ← back to the initiative's page, else its row, else the address again (an initiative the list does not show) */ await page.click('#czViewer [data-cz-vw="more"]').then(() => page.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))')); /* the initiative's page (canvas HbC): its + drills into Tasks */ return until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]') && !!document.querySelector('#czViewer [data-ov-tk="task:t1"]'))); };
|
|
56
56
|
const cur = (page) => page.evaluate(() => { const p = document.querySelector('#czViewer:not([hidden]) .obody.vw'); return { on: p ? p.dataset.vw : null, title: (document.querySelector('#czVwTitle') || {}).textContent || '', n: document.querySelectorAll('#czViewer .obody.vw').length }; });
|
|
57
57
|
const paneTxt = (page, id) => page.evaluate((k) => { const p = document.querySelector(`#czViewer .obody.vw[data-vw="${CSS.escape(k)}"]`); return p ? p.textContent.replace(/\s+/g, ' ') : ''; }, id);
|
|
58
58
|
const INI = 'item:ini:self-serve-v2';
|
|
@@ -74,12 +74,12 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
74
74
|
await until(async () => /UAT with five partners/.test(await paneTxt(page, TK)));
|
|
75
75
|
s = await cur(page); t = await paneTxt(page, TK);
|
|
76
76
|
ok('R9 a task inside the record opens in its place, named by the task', s.on === TK && s.title === 'UAT with five partners', JSON.stringify(s));
|
|
77
|
-
ok('R9 the task is the task editor: owner, start and due, and status (item 7: no Type, Reference or Source rows)', ['Dara', '20 → 27
|
|
77
|
+
ok('R9 the task is the task editor: owner, start and due, and status (item 7: no Type, Reference or Source rows)', ['Dara', 'Oct 20 → 27', 'To do'].every((x) => t.includes(x)) && !/PMOS task|Reference/.test(t), t);
|
|
78
78
|
ok('R9 the record and its task read the route once', S.vgets.length - n0 === 1, String(S.vgets.length - n0));
|
|
79
79
|
await page.click(`#czViewer .obody.vw[data-vw="${TK}"] [data-tkc="ini"]`);
|
|
80
80
|
s = await cur(page);
|
|
81
81
|
ok('R9 the initiative link brings the record back, not a second one', await until(async () => (await cur(page)).on === INI) && (await cur(page)).n === 1, JSON.stringify(s));
|
|
82
|
-
ok('R9 the task press in the Overview opens the same task view', await overview(page) && await page.click('#czViewer [data-ov-tk="task:t1"]').then(() => until(async () => (await cur(page)).on === TK && /20 → 27
|
|
82
|
+
ok('R9 the task press in the Overview opens the same task view', await overview(page) && await page.click('#czViewer [data-ov-tk="task:t1"]').then(() => until(async () => (await cur(page)).on === TK && /Oct 20 → 27/.test(await paneTxt(page, TK)))), JSON.stringify(await cur(page)));
|
|
83
83
|
ok('R9 the old dialog never opens', await page.evaluate(() => { const d = document.querySelector('#dlg'); return !d || !d.classList.contains('on'); }));
|
|
84
84
|
ok('R9 no page error', S.errors.length === 0, S.errors.join(' | '));
|
|
85
85
|
await ctx.close();
|
|
@@ -72,7 +72,7 @@ const TICKETS = {
|
|
|
72
72
|
const IMODEL = IP.build(IF.facts());
|
|
73
73
|
// Home's initiative layout (premium-agreed-design): the card's Overview has the Sprint press; the Viewer shows one item at a time
|
|
74
74
|
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)
|
|
75
|
-
const overview = async (pg) => { await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .
|
|
75
|
+
const overview = async (pg) => { await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .iv', { timeout: 30000 }); })(pg); /* ← back to the initiative's page, else its row, else the address again (an initiative the list does not show) */ await pg.click('#czViewer [data-cz-vw="more"]').then(() => pg.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))')); /* the initiative's page (canvas HbC): its + drills into Tasks */ return until(() => pg.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]'))); };
|
|
76
76
|
const openSprint = async (pg) => { if (!(await pg.$('#czViewer:not([hidden]) [data-hi-v]'))) await overview(pg); /* open() already showed the Overview */ await viaMore(pg, 'Sprint'); };
|
|
77
77
|
const open = async ({ w = 1280, h = 900, theme = 'light', sprints = SPRINTS, tickets = TICKETS } = {}) => {
|
|
78
78
|
const ctx = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: theme });
|
|
@@ -87,7 +87,7 @@ const TICKETS = {
|
|
|
87
87
|
await page.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: IMODEL, as_of: Date.now() }));
|
|
88
88
|
await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
|
|
89
89
|
await page.goto(BASE + '/premium-initiative.html?id=self-serve-v2&ws=w1&board=w1&theme=' + theme); // the Board's expand link: Home with the initiative
|
|
90
|
-
await until(() => page.evaluate(() => !!document.querySelector('
|
|
90
|
+
await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv-sc') && !!window.__premiumVwJira), 20000);
|
|
91
91
|
await overview(page);
|
|
92
92
|
await sleep(300); reads.length = 0; posts.length = 0; // Home's own reads; the checks below are about the sprint view's
|
|
93
93
|
return { ctx, page, errors, posts, reads };
|
|
@@ -117,8 +117,9 @@ const TICKETS = {
|
|
|
117
117
|
await until(async () => { const t = await paneText(p, 'sprint:w1'); return t && /Sprint 14 ·/.test(t); });
|
|
118
118
|
ok('B11 shut again, the fold stays shut on the active sprint', await p.evaluate(() => document.querySelector('#jpast').hidden));
|
|
119
119
|
await p.click('.jcrd[data-k="OPS-9"]');
|
|
120
|
-
const o9 = await until(async () => { const t = await paneText(p, 'jira:OPS-9'); return t && /
|
|
121
|
-
|
|
120
|
+
const o9 = await until(async () => { const t = await paneText(p, 'jira:OPS-9'); return t && /Jira owns these/.test(t) ? t : null; });
|
|
121
|
+
/* re-pointed (batch 6 item 1b, canvas OvViewers "Jira ticket"): a ticket is the one ticket Viewer (tk-view.js), the same as the Board's */
|
|
122
|
+
ok('B12 a ticket on no initiative opens in the one ticket Viewer from the sprint read, says it is on no initiative, with its Jira link', !!o9 && /On no initiative of this board/.test(o9) && /Jira owns these/.test(o9) && await p.evaluate(() => [...document.querySelectorAll('#czViewer .obody.vw a[href]')].some((a) => a.href === 'https://acme.atlassian.net/browse/OPS-9')), o9);
|
|
122
123
|
await openSprint(p); await until(async () => /Migration check/.test((await paneText(p, 'sprint:w1')) || '')); // back to the sprint: one item at a time
|
|
123
124
|
ok('B6 the view says it is read-only and moves nothing', /Read-only: Jira owns each ticket's status and sprint/.test(board) && !(await p.$('#czViewer .obody.vw [draggable="true"]')));
|
|
124
125
|
await p.click('.jseg [data-sp="Sprint 15"]');
|
|
@@ -128,17 +129,17 @@ const TICKETS = {
|
|
|
128
129
|
|
|
129
130
|
/* K the ticket */
|
|
130
131
|
await p.click('.jcrd[data-k="PMOS-142"]');
|
|
131
|
-
const tk = await until(async () => { const t = await paneText(p, 'jira:PMOS-142'); return t && /Acceptance
|
|
132
|
+
const tk = await until(async () => { const t = await paneText(p, 'jira:PMOS-142'); return t && /Acceptance criteria/.test(t) ? t : null; });
|
|
132
133
|
ok('K1 a card opens its ticket in place of the sprint', !!tk && (await curId(p)) === 'jira:PMOS-142', JSON.stringify(await curId(p)));
|
|
133
|
-
ok('K2 the ticket
|
|
134
|
-
ok('K3 the description is the draft\'s sections,
|
|
135
|
-
ok('K4 subtasks
|
|
136
|
-
ok('K5 no comments, history or fields panel:
|
|
137
|
-
&& /Assignee\s*Not in the Jira read/.test(tk) && /Jira\s*Read (\d+ (min|hours?|days?) ago|just now)/.test(tk) && !/pull request|\bPR\b|builder/i.test(tk) && !/Comments \(/.test(tk)
|
|
134
|
+
ok('K2 the ticket leads with what holds it (flagged in Jira), then the facts Jira owns: status, sprint, points and priority', /^Blocked/.test(tk) && /Flagged in Jira/.test(tk) && /StatusTo Do/.test(tk) && /SprintSprint 14/.test(tk) && /Points5/.test(tk) && /PriorityHigh/.test(tk) && /Jira owns these\. They change only in Jira\./.test(tk), tk);
|
|
135
|
+
ok('K3 the description is the draft\'s sections, with bold kept and nothing run', /Description · from Jira/.test(tk) && /User Story/.test(tk) && await p.evaluate(() => !!document.querySelector('#czViewer .tkv .ovd strong') && !document.querySelector('#czViewer .tkv img') && !window.__pwned));
|
|
136
|
+
ok('K4 the folds: acceptance criteria, subtasks as the reading\'s count, and the links from the draft; the where row names the initiative and its epic', /Acceptance criteria2/.test(tk) && /Subtasks1 of 3 done/.test(tk) && /Linked2/.test(tk) && /blocks/.test(tk) && /PMOS-152/.test(tk) && /drafted fromplanning\/prd\/self-serve-v2-prd.md/.test(tk) && /Self-serve onboarding v2Epic Self-serve v2/.test(tk));
|
|
137
|
+
ok('K5 no comments, history or fields panel: Open in Jira at the foot is the one real link', !/pull request|\bPR\b|builder/i.test(tk) && !/Comments \(/.test(tk) && /Open in Jira$/.test(tk)
|
|
138
138
|
&& await p.evaluate(() => [...document.querySelectorAll('#czViewer .obody.vw a[href]')].every((a) => a.href === 'https://acme.atlassian.net/browse/PMOS-142' && a.target === '_blank' && /noopener/.test(a.rel))));
|
|
139
|
-
await p.
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
await p.evaluate(() => { const f = document.querySelector('#czViewer [data-czs-fold="links"]'); if (f && f.getAttribute('aria-expanded') !== 'true') f.click(); }); // the one ticket Viewer's Linked fold (tk-view.js) opens first
|
|
140
|
+
await p.click('#czViewer [data-tkv-link="PMOS-152"]');
|
|
141
|
+
ok('K6 a linked ticket opens in its own tab', !!(await until(async () => { const t = await paneText(p, 'jira:PMOS-152'); return t && /StatusIn Progress/.test(t) && /depends onPMOS-142/.test(t) && !/Sprint/.test(t.split('Jira owns')[0]); /* its own facts; no sprint row when it is in none (zero is silence) */ })));
|
|
142
|
+
await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .iv', { timeout: 30000 }); })(p); /* ← back to the initiative's page, else its row, else the address again (an initiative the list does not show) */ await p.click('#czViewer [data-cz-vw="more"]').then(() => p.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))')); /* the initiative's page (canvas HbC): its + drills into Tasks */
|
|
142
143
|
const k7 = await until(() => p.evaluate((t0) => { const m = document.querySelector('#czViewer:not([hidden]) .cz-vw-body'); return m && m.textContent === t0 ? m.textContent : null; }, mainTxt));
|
|
143
144
|
ok('K7 the Overview comes back with its own facts, as before', !!k7, await p.evaluate(() => ((document.querySelector('#czViewer .cz-vw-body') || {}).textContent || '').slice(0, 300)));
|
|
144
145
|
ok('K8 the views read the two Jira routes only, and wrote nothing', A.posts.filter((x) => !/thread|note|seen/.test(x)).length === 0 && A.reads.every((r) => /^\/api\/(jira\/tickets|boards\/sprints)\?/.test(r)) && A.reads.some((r) => /jira\/tickets\?.*initiative=self-serve-v2/.test(r)), JSON.stringify([A.posts, A.reads]));
|
|
@@ -84,14 +84,15 @@ const disk = () => fs.readFileSync(path.join(dir, pNew), 'utf8');
|
|
|
84
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
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; });
|
|
86
86
|
const openEditor = async () => {
|
|
87
|
-
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-
|
|
88
|
-
await
|
|
87
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .rp-bar [data-r="edit"]')));
|
|
88
|
+
await p.click('#czViewer .rp-bar [data-r="edit"]');
|
|
89
89
|
return until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-vz-ed] .sl .sl-stage .sl-cv')));
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
/* O: opening */
|
|
93
93
|
ok('O1 a draft report opens in the Viewer card', await openReader('2026-10-12'));
|
|
94
|
-
|
|
94
|
+
/* re-pointed (batch 6 item 1b, canvas OvReport): Edit is an icon on the report Viewer's bar, so ⋯ does not repeat it */
|
|
95
|
+
ok('O2 on Slides, Edit is on the bar once, as an icon, and ⋯ does not repeat it (OvReport)', await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]'))) && !(await menuOf(p)).includes('Edit') && await p.evaluate(() => { const L = document.querySelectorAll('#czViewer .cz-vw-body [data-r="edit"]'); return L.length === 1 && L[0].closest('.rp-bar') && !L[0].textContent.trim() && L[0].getAttribute('aria-label') === 'Edit'; }));
|
|
95
96
|
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"]')));
|
|
96
97
|
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()));
|
|
97
98
|
let s = await st();
|
|
@@ -233,7 +234,7 @@ const disk = () => fs.readFileSync(path.join(dir, pNew), 'utf8');
|
|
|
233
234
|
await openReader('2026-10-05');
|
|
234
235
|
await until(() => p.evaluate(() => /^Issued/.test((document.querySelector('#czViewer .czs-line') || {}).textContent || '')));
|
|
235
236
|
const im = await menuOf(p);
|
|
236
|
-
ok('I1 an issued report has no Edit and no Issue:
|
|
237
|
+
ok('I1 an issued report has no Edit and no Issue: the bar reads it as slides, a page or the live page (OvReport)', !im.includes('Edit') && await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-seg button')].map((b) => b.textContent).join() === 'Slides,Document,Live page' && !document.querySelector('#czViewer [data-r="edit"], #czViewer [data-czs-act="issue"], #czViewer [data-r="issue"]')), im.join());
|
|
237
238
|
ok('I3 the issued file is not changed', fs.readFileSync(path.join(dir, pOld), 'utf8') === OLD);
|
|
238
239
|
ok('X no page error', errs.length === 0, errs.join(' | '));
|
|
239
240
|
await ctx.close();
|
|
@@ -245,7 +246,8 @@ const disk = () => fs.readFileSync(path.join(dir, pNew), 'utf8');
|
|
|
245
246
|
await q.goto(BASE + '/premium-viewer.html?theme=dark&open=report&path=' + encodeURIComponent(pNew));
|
|
246
247
|
await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-rp0 .vz-slide')));
|
|
247
248
|
await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]')));
|
|
248
|
-
await
|
|
249
|
+
await until(() => q.evaluate(() => !!document.querySelector('#czViewer .rp-bar [data-r="edit"]')));
|
|
250
|
+
await q.click('#czViewer .rp-bar [data-r="edit"]'); // Edit is an icon on the bar at every width (OvReport)
|
|
249
251
|
await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-vz-ed] .sl .sl-stage .sl-cv')));
|
|
250
252
|
await sleep(300);
|
|
251
253
|
const m = await q.evaluate((v) => {
|
|
@@ -118,7 +118,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
118
118
|
await fold(p, 'tree');
|
|
119
119
|
await until(() => p.evaluate(() => !!document.querySelector('#czViewer button.pp-open[data-ini="descope-parity"]')));
|
|
120
120
|
await p.click('#czViewer button.pp-open[data-ini="descope-parity"]');
|
|
121
|
-
const ip = await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden || !/Initiative/.test(v.getAttribute('aria-label') || '')) return null; return { t: v.querySelector('.cz-vw-title').textContent, peek: !document.querySelector('#peek'), stg: v.querySelectorAll('.
|
|
121
|
+
const ip = await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer'); if (!v || v.hidden || !/Initiative/.test(v.getAttribute('aria-label') || '')) return null; return { t: v.querySelector('.cz-vw-title').textContent, peek: !document.querySelector('#peek'), stg: v.querySelectorAll('.iv-lad i').length }; }));
|
|
122
122
|
ok('O an initiative in the tree opens the Board\'s initiative in the same shell, with its eight steps (XvABoard)', !!ip && ip.t === 'Descope feature parity' && ip.peek && ip.stg === 8, JSON.stringify(ip));
|
|
123
123
|
await p.keyboard.press('Escape');
|
|
124
124
|
await until(() => p.evaluate(() => document.querySelector('#czViewer').hidden));
|