create-pmos 0.401.0 → 0.403.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/package.json +25 -30
  2. package/payload/KIT-VERSION +2 -2
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/payload/state/log.md +1 -1
  7. package/workspace/board-programs-test.js +227 -0
  8. package/workspace/board-shot.js +54 -0
  9. package/workspace/briefing-premium-adddoc-test.js +28 -22
  10. package/workspace/briefing-premium-board-test.js +107 -82
  11. package/workspace/briefing-premium-calendar-2-test.js +23 -10
  12. package/workspace/briefing-premium-calendar-3-test.js +23 -19
  13. package/workspace/briefing-premium-calendar-test.js +20 -15
  14. package/workspace/briefing-premium-initiative-test.js +25 -12
  15. package/workspace/briefing-premium-insights-test.js +31 -18
  16. package/workspace/briefing-premium-metrics-test.js +8 -8
  17. package/workspace/briefing-premium-sources-test.js +15 -10
  18. package/workspace/briefing-premium-test.js +39 -16
  19. package/workspace/changelog.json +24 -0
  20. package/workspace/fixtures/board-premium-facts.js +20 -3
  21. package/workspace/fixtures/briefing-premium-facts.js +18 -2
  22. package/workspace/fixtures/premium-viewer-fixtures.js +24 -2
  23. package/workspace/fixtures/program-ascent.js +101 -0
  24. package/workspace/guide/home.md +11 -7
  25. package/workspace/guide/index.md +1 -0
  26. package/workspace/guide/jira.md +38 -6
  27. package/workspace/guide/programs.md +37 -0
  28. package/workspace/home-rows-test.js +184 -0
  29. package/workspace/lib/briefing-premium-products.js +4 -4
  30. package/workspace/lib/briefing-premium.js +2 -2
  31. package/workspace/lib/calendar-layers.js +8 -4
  32. package/workspace/lib/initiative-layout.js +4 -3
  33. package/workspace/lib/jira-cli.js +17 -12
  34. package/workspace/lib/jira-status.js +1 -1
  35. package/workspace/lib/jira-tickets.js +126 -24
  36. package/workspace/lib/meeting-files.js +58 -0
  37. package/workspace/lib/meeting-learn.js +139 -0
  38. package/workspace/lib/meeting-material.js +12 -5
  39. package/workspace/lib/notes.js +3 -0
  40. package/workspace/lib/programs.js +129 -0
  41. package/workspace/lib/route-modules.js +1 -0
  42. package/workspace/lib/routes-brief-page.js +8 -1
  43. package/workspace/lib/routes-briefing-premium.js +1 -1
  44. package/workspace/lib/routes-calendar-views.js +24 -3
  45. package/workspace/lib/routes-meeting-material.js +38 -0
  46. package/workspace/lib/routes-meeting-points.js +23 -3
  47. package/workspace/lib/routes-programs.js +122 -0
  48. package/workspace/package-lock.json +2 -2
  49. package/workspace/package.json +1 -1
  50. package/workspace/premium-board-actions-test.js +31 -25
  51. package/workspace/premium-chat-context-test.js +1 -1
  52. package/workspace/premium-chat-goal-view-test.js +1 -1
  53. package/workspace/premium-chat-viewer-test.js +1 -1
  54. package/workspace/premium-core-doc-issue-test.js +13 -7
  55. package/workspace/premium-discuss-landing-test.js +83 -0
  56. package/workspace/premium-link-suggest-test.js +103 -0
  57. package/workspace/premium-report-read-test.js +86 -82
  58. package/workspace/premium-vw-backlog-test.js +6 -5
  59. package/workspace/premium-vw-cal-test.js +45 -19
  60. package/workspace/premium-vw-item-test.js +8 -6
  61. package/workspace/premium-vw-jira-test.js +3 -2
  62. package/workspace/premium-vw-meet-test.js +122 -66
  63. package/workspace/premium-vw-notes-test.js +7 -6
  64. package/workspace/premium-vw-rec-test.js +14 -13
  65. package/workspace/premium-vw-slides-test.js +11 -5
  66. package/workspace/program-panel-test.js +152 -0
  67. package/workspace/public/pm/bd-acts.js +24 -15
  68. package/workspace/public/pm/bd-asks.js +111 -30
  69. package/workspace/public/pm/bd-ini-panel.js +229 -0
  70. package/workspace/public/pm/bd-pop.js +2 -2
  71. package/workspace/public/pm/bd-prog-panel.js +436 -0
  72. package/workspace/public/pm/bd-prog.js +191 -0
  73. package/workspace/public/pm/bd-span.js +98 -15
  74. package/workspace/public/pm/bd-views.js +93 -29
  75. package/workspace/public/pm/cozy-board.css +214 -20
  76. package/workspace/public/pm/cozy-evui.js +4 -2
  77. package/workspace/public/pm/cozy-home-rows.css +54 -0
  78. package/workspace/public/pm/cozy-home.css +35 -0
  79. package/workspace/public/pm/cozy-insights.css +1 -2
  80. package/workspace/public/pm/cozy-mtg-present.css +160 -0
  81. package/workspace/public/pm/cozy-panel.css +155 -0
  82. package/workspace/public/pm/cozy-rec-pill.css +12 -0
  83. package/workspace/public/pm/cozy-rec-pill.js +46 -0
  84. package/workspace/public/pm/cozy-today.css +189 -0
  85. package/workspace/public/pm/cozy-viewer.js +307 -43
  86. package/workspace/public/pm/cozy-vw-mtg.css +96 -94
  87. package/workspace/public/pm/cozy-vw-rp.css +40 -25
  88. package/workspace/public/pm/cozy-vw-shell.css +127 -0
  89. package/workspace/public/pm/cozy-xv.css +51 -0
  90. package/workspace/public/pm/cozy-xv.js +34 -0
  91. package/workspace/public/pm/home-app.js +192 -72
  92. package/workspace/public/pm/home-chat.js +17 -4
  93. package/workspace/public/pm/home-data.js +1 -1
  94. package/workspace/public/pm/home-day.js +64 -0
  95. package/workspace/public/pm/home-ini-model.js +1 -1
  96. package/workspace/public/pm/home-ini.js +197 -54
  97. package/workspace/public/pm/home-list.js +100 -27
  98. package/workspace/public/pm/home-mentions.js +187 -0
  99. package/workspace/public/pm/home-rec-row.js +67 -0
  100. package/workspace/public/pm/home-review.js +20 -10
  101. package/workspace/public/pm/home-task.js +19 -18
  102. package/workspace/public/pm/home-today.js +137 -59
  103. package/workspace/public/pm/premium-board.js +294 -288
  104. package/workspace/public/pm/premium-insights.js +118 -82
  105. package/workspace/public/pm/premium-mtg-present.js +408 -100
  106. package/workspace/public/pm/premium-mtg-replay.js +70 -10
  107. package/workspace/public/pm/premium-report-read.js +118 -63
  108. package/workspace/public/pm/premium-vw-cal.js +62 -34
  109. package/workspace/public/pm/premium-vw-mtg.js +348 -192
  110. package/workspace/public/pm/program-model.js +192 -0
  111. package/workspace/public/pm/rec-state.js +63 -0
  112. package/workspace/public/pm/rp-parts.js +33 -8
  113. package/workspace/public/pm/tk-draft.js +107 -0
  114. package/workspace/public/pm/tk-model.js +134 -0
  115. package/workspace/public/pm/tk-send.js +124 -0
  116. package/workspace/public/pm/tk-tasks.css +120 -0
  117. package/workspace/public/premium-board.html +4 -2
  118. package/workspace/server.js +4 -2
  119. package/workspace/skills/jira-push.skill +3 -3
  120. package/workspace/test-lists/board-programs.json +9 -0
  121. package/workspace/test-lists/prd-to-jira.json +6 -0
  122. package/workspace/test-lists/program-hierarchy.json +11 -0
  123. package/workspace/test-lists/program-panel.json +9 -0
  124. package/workspace/test-lists/viewer-home-rows.json +9 -0
  125. package/workspace/test-lists/viewer-meetings.json +9 -0
  126. package/workspace/test-lists/viewer-shell-a.json +15 -0
  127. package/workspace/tk-tasks-test.js +199 -0
@@ -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) draws the parts the Agreed mockup left out: Report | Brief (RpBrief), the cycle menu in groups,
9
- * the lock line and the ask card (RpStates), Document as paper pages (RpDoc), Live page (RpLive), Present and the phone (RpPhone):
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 .vz-snav [aria-live]') || {}).textContent || '');
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
- const ready = () => until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-rp0 .vz-slide, #czViewer .vz-rp0 .vz-page')));
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, and the cycle chip says Draft and its date', await p.evaluate(() => document.querySelector('#czViewer .cz-vw-kind').textContent === 'Report' && document.querySelector('#czViewer .cz-vw-title').textContent === 'Partner review, 12 Oct') && /Draft · Oct 12/.test(await chipT()), await chipT());
85
- await until(() => has('[data-r="sched"]'));
86
- ok('B1 the tabs are Report and Brief (RpBrief), Report open', await p.evaluate(() => [...document.querySelectorAll('#czViewer .rp-tabs [role="tab"]')].map((b) => b.dataset.r + ':' + b.getAttribute('aria-selected')).join()) === 'tab|report:true,tab|brief:false');
87
- ok('B1 the chips are the cycle and the schedule', await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-rpc > button')].map((b) => b.dataset.r).join()) === 'cycm,sched');
88
- ok('B1 one toolbar: Slides | Document | Live page, Edit, Present, Share, Download, Issue and More', await tools() === 'view|deck,view|doc,view|live,edit,present,share,dlm,issue,more', await tools());
89
- const bar = await p.evaluate(() => { const L = [...document.querySelectorAll('#czViewer .vz-tb > *')].filter((x) => x.offsetWidth && x.offsetHeight && !x.classList.contains('vz-sp')), c = L.map((x) => { const r = x.getBoundingClientRect(); return r.top + r.height / 2; }); return { spread: Math.round(Math.max(...c) - Math.min(...c)), unnamed: [...document.querySelectorAll('#czViewer .vz-tb .vz-ib')].filter((b) => !b.getAttribute('aria-label') || !b.title).length }; });
90
- ok('B1 the bar is one row, and each icon button is named by its label and tooltip', bar.spread <= 6 && bar.unnamed === 0, JSON.stringify(bar));
91
- await shot('reader-bar-1280');
92
-
93
- /* C: the cycle chip lists this report's cycles */
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 the cycle menu 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);
98
- await tap('[data-r="cycm"]');
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', strip.join());
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: the document, as paper (RpDoc) */
114
- await tap('[data-r="view|doc"]');
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 Document 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());
117
- ok('G2 the sources are the footnote line, the bar says Page 1 of 1 and Draft, and offers Download as PDF or Word', await p.evaluate(() => /krm-a/.test(document.querySelector('#czViewer .rp-fn').textContent) && /Page 1 of 1/.test(document.querySelector('#czViewer [data-rp-page]').textContent) && document.querySelector('#czViewer .rp-paperbar .rp-pill').textContent === 'Draft' && !!document.querySelector('#czViewer [data-r="dlm"]')));
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 tap('[data-r="dlm"]');
120
- ok('G3 Download offers PDF and Word, 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')); }));
121
- await tap('[data-r="dlm"]');
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 tap('[data-r="view|live"]');
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 page: 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));
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 tap('[data-r="view|deck"]');
143
+ await pick('Read as slides');
134
144
 
135
145
  /* B2 the schedule; K the Brief */
136
- await tap('[data-r="sched"]');
137
- ok('B2 a report with no template says Not scheduled; its popover offers the cadences, the weekdays and the time, and says a template is saved', /Not scheduled/.test(await p.textContent(V + '[data-r="sched"]')) && 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')));
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 tap('[data-r="tab|brief"]');
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, tb: !!document.querySelector('#czViewer .vz-tb') }));
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.tb, JSON.stringify(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 tap('[data-r="present"]');
150
- await until(() => p.$('#vzPres'));
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 that slide', await until(() => p.evaluate(() => !document.querySelector('#vzPres'))) && await counter() === '2 of 5');
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 tap('[data-r="more"]');
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 More 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(' / '));
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 tap('[data-r="more"]');
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 tap('[data-r="more"]'); await tap('[data-r="print"]');
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 Page the page editor, inside the card; Cancel brings the report back */
180
- await tap('[data-r="view|doc"]');
181
- await tap('[data-r="edit"]');
182
- ok('E1 Edit on 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));
183
- ok('E2 while editing the cycle chip says Editing the Oct 12 draft, and the bar keeps Slides | Page and Cancel', /Editing the Oct 12 draft/.test(await chipT()) && await tools() === 'view|deck,view|doc,edcancel', await tools());
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 tap('[data-r="view|deck"]');
191
+ await pick('Read as slides');
187
192
 
188
- /* I: an issued cycle is frozen; the cycle chip opens it */
189
- await tap('[data-r="cycm"]');
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 () => /Issued · Oct 5/.test(await chipT()) && !!(await p.$(V + '.vz-slide')));
192
- ok('I1 the cycle menu opens the issued cycle: no Edit and no Issue, and the lock line with Start the next cycle (RpStates)', !(await has('[data-r="edit"]')) && !(await has('[data-r="issue"]')) && /Issued, so it stays as sent/.test(await p.evaluate(() => (document.querySelector('#czViewer .rp-lock') || {}).textContent || '')) && await has('.rp-lock [data-r="nextcyc"]'), await chipT());
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 until(() => p.evaluate(() => !document.querySelectorAll('#czViewer .vz-tb .vz-dko')[0].getClientRects().length));
203
- const fl = await p.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, desk: [...document.querySelectorAll('#czViewer .vz-tb .vz-dko')].filter((b) => b.getClientRects().length).length, shown: [...document.querySelectorAll('#czViewer .vz-tb > button, #czViewer .vz-tb .vz-sg button')].filter((b) => b.getClientRects().length).map((b) => b.dataset.r).join() }));
204
- ok('F1 at 390 px: no sideways scroll; the bar keeps Slides | Page, Issue and More', fl.over <= 0 && fl.desk === 0 && fl.shown === 'view|deck,view|doc,issue,more', JSON.stringify(fl));
205
- ok('F1 at 390 px (RpPhone): Report | Brief, "Slide 1 of 5 · swipe for the next", no thumbnails, and a full-width Present', await p.evaluate(() => { const v = (s) => { const e = document.querySelector('#czViewer ' + s); return !!e && e.getClientRects().length > 0; }; const pr = document.querySelector('#czViewer .rp-present'); return v('.rp-tabs') && /Slide 1 of 5 · swipe for the next/.test(document.querySelector('#czViewer .rp-swipe').textContent) && v('.rp-swipe') && !v('.vz-thumbs') && pr && pr.getBoundingClientRect().width > 300; }));
206
- await tap('[data-r="more"]');
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-r="issue"]');
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 and the chip says Issued', await until(async () => /Issued · Oct 12/.test(await chipT()) && !(await has('[data-r="issue"]')), 15000) && posts.slice(before).join() === '/api/report/issue', posts.slice(before).join() + ' ' + await p.evaluate(() => document.querySelector('#czViewer .vz-rpb').textContent.slice(0, 300)));
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 More, after one confirm, and comes back */
225
+ /* A: an issued cycle archives from ⋯, after one confirm, and comes back */
223
226
  const b2 = posts.length;
224
- await tap('[data-r="more"]'); await tap('[data-r="archive"]');
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 and the chip says Archived', await until(async () => /Archived · Oct 12/.test(await chipT()), 8000) && posts.slice(b2).join() === '/api/report-documents/archive', posts.slice(b2).join());
229
- await tap('[data-r="cycm"]');
230
- ok('A3 the cycle menu 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|"]')));
231
- await tap('[data-r^="unarch|"]');
232
- ok('A3 Bring back undoes it', await until(async () => /Issued · Oct 12/.test(await chipT()), 8000));
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 tap('[data-r="nextcyc"]');
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' && /Issued · Oct 12/.test(await chipT()), posts.slice(b3).join() + ' ' + await chipT() + ' ' + await p.evaluate(() => (document.querySelector('#czViewer .vz-msg') || {}).textContent || ''));
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-ov-sprint]'))); }
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-ov-sprint]')))) { if (!(await page.locator('.hm-card [data-hm-ov]').isVisible())) await page.click('#hmNeeds'); await page.click('.hm-card [data-hm-ov]'); }
67
- await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-ov-sprint]')), 5000);
68
- await page.click('#czViewer [data-ov-sprint]');
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 side panel, 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('#peek'); return !!k && !k.hidden && /Backlog/.test((document.querySelector('#pkTitle') || {}).textContent) && !!!document.querySelector('#dlg.on'); }))));
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
  }
@@ -3,9 +3,11 @@
3
3
  /* premium-vw-cal-test.js — Calendar | Notes in the Viewer card, the Calendar side (initiative premium-viewer, R8; re-pointed for premium-agreed-design,
4
4
  * area viewer; redrawn for premium-uncovered-features, area meetings: MtCalendar and MtPhone). Serves the real /premium-viewer.html from the
5
5
  * real server; GET /api/calendar-views and the notes are answered by stand-ins (fixtures/premium-viewer-fixtures.js).
6
- * C1 the card: Calendar | Notes, the range, Day | Week | Month and New note · C2 the week grid: linked filled, not linked dashed with Link it,
7
- * today's column and its now line · C3 the day: Mon–Fri and the day's entries with chips · C4 a meeting opens its card · C5 Link it opens What
8
- * it is about · C6 Month, previous, next, Today · C7 honest states · C8 floors at 390px · C9 on Home, the Viewer widens for the week
6
+ * Viewer kit (XvACal): one item, "Calendar", opens on the day with today's summary first; Week and Month are in ⋯.
7
+ * C1 the item: Calendar | Notes and +, today's summary, ⋯ with the ranges and New note · C2 the week grid (⋯ Week): linked filled, not linked
8
+ * dashed with Link it, today's column and its now line · C3 the day: Mon–Fri with load bars and one list; a chip only where it asks for a
9
+ * look · C4 a meeting opens its card · C5 Link it opens What it is about · C6 Month, previous, next, Today · C7 honest states · C8 floors at
10
+ * 390px · C9 on Home, the Viewer widens for the week and not for the day
9
11
  * Every wait polls the page; no fixed sleep stands in for a state. */
10
12
  const path = require('path');
11
13
  const { spawn } = require('child_process');
@@ -37,15 +39,31 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
37
39
  browser = await chromium.launch({ executablePath: exe });
38
40
  const tap = (p, sel) => p.$eval('#czViewer ' + sel, (b) => b.click());
39
41
  const text = (p) => p.evaluate(() => (document.querySelector('#czViewer') || {}).innerText || '');
42
+ /** ⋯ in the Viewer's header: its rows, or press the one named. */
43
+ const more = async (p, label) => {
44
+ await p.$eval('#czViewer [data-cz-vw="more"]', (b) => b.click());
45
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu')), 5000);
46
+ const rows = await p.evaluate(() => [...document.querySelectorAll('#czViewer .cz-vw-menu [role="menuitem"]')].map((b) => b.innerText.replace(/\n/g, ' ').trim()));
47
+ if (label) await p.evaluate((l) => [...document.querySelectorAll('#czViewer .cz-vw-menu [role="menuitem"]')].find((b) => b.querySelector('span').textContent === l).click(), label);
48
+ else await p.keyboard.press('Escape');
49
+ return rows;
50
+ };
51
+ const weekday = ![0, 6].includes(new Date().getDay());
40
52
 
41
53
  const A = await F.open(browser, BASE, '/premium-viewer.html?open=calendar');
42
54
  const p = A.page;
43
- const up = await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vzc-wk') && document.querySelectorAll('#czViewer .vzc-ev').length > 0), 15000);
44
- ok('C1 the calendar opens in the Viewer card on its week', up);
55
+ const up = await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzc-dy').length === 5 && document.querySelectorAll('#czViewer .vzc-de').length > 0), 15000);
56
+ ok('C1 the calendar opens in the Viewer on the day', up);
45
57
  if (!up) return finish(1);
46
- ok('C1 the card holds Calendar | Notes, Day | Week | Month and New note, and no conversation', await p.evaluate(() => [...document.querySelectorAll('#czViewer [data-c="tab"]')].map((b) => b.textContent).join() === 'Calendar,Notes'
47
- && [...document.querySelectorAll('#czViewer [data-c="view"]')].map((b) => b.textContent + ':' + b.getAttribute('aria-pressed')).join() === 'Day:false,Week:true,Month:false' && !!document.querySelector('#czViewer [data-c="new"][aria-label="New note"]') && !document.querySelector('#dlg, .stream')));
48
- ok('C1 the header names it; the range says "N to M Mon"', await p.evaluate(() => document.querySelector('#czViewer .cz-vw-kind').textContent === 'Meetings' && /^\d{1,2}( \w{3})? to \d{1,2} \w{3}$/.test(document.querySelector('#czViewer .vzc-head h2').textContent)));
58
+ ok('C1 the item holds Calendar | Notes and + (New note), and no conversation', await p.evaluate(() => [...document.querySelectorAll('#czViewer [data-c="tab"]')].map((b) => b.textContent + ':' + b.getAttribute('aria-selected')).join() === 'Calendar:true,Notes:false'
59
+ && !!document.querySelector('#czViewer [data-c="new"][aria-label="New note"]') && !document.querySelector('#czViewer .vzc-head') && !document.querySelector('#dlg, .stream')));
60
+ ok('C1 the header says Calendar, of Meetings', await p.evaluate(() => document.querySelector('#czViewer .cz-vw-kind').textContent === 'Meetings' && document.querySelector('#czViewer .cz-vw-title').textContent === 'Calendar'));
61
+ const sum = await p.evaluate(() => { const s = document.querySelector('#czViewer .czs-sum'); return s && { line: s.querySelector('.czs-line').innerText, text: (s.querySelector('.czs-p') || {}).innerText || '', pri: (s.querySelector('[data-czs-act]') || {}).textContent || '' }; });
62
+ ok('C1 today\'s summary comes first: "Today · N meetings · h", then what is next or live, with one primary', sum && /^Today · \d+ meetings?( · [\d.]+ (h|min))?$/.test(sum.line) && (/^(Next|Recording now|Paused): /.test(sum.text) ? /^Open the (prep|notes)$/.test(sum.pri) : !sum.pri), JSON.stringify(sum));
63
+ const rows = await more(p);
64
+ ok('C1 ⋯ holds Day (shown), Week, Month, the range moves, Back to today and New note', /^Day shown,Week,Month,Previous week,Next week,Back to today,New note no calendar event/.test(rows.join()), rows.join());
65
+ await more(p, 'Week');
66
+ ok('C2 ⋯ Week draws the week grid with its range head and Day', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vzc-wk') && document.querySelectorAll('#czViewer .vzc-ev').length > 0 && /^\d{1,2}( \w{3})? to \d{1,2} \w{3}$/.test(document.querySelector('#czViewer .vzc-head h2').textContent) && !!document.querySelector('#czViewer .vzc-head [data-c="view"][data-k="day"]')), 10000));
49
67
 
50
68
  /* C2 the week grid */
51
69
  const wk = await p.evaluate(() => ({ cols: document.querySelectorAll('#czViewer .vzc-col').length, now: !!document.querySelector('#czViewer .vzc-hd.now'), line: !!document.querySelector('#czViewer .vzc-nl'),
@@ -58,16 +76,19 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
58
76
  ok('C2 the legend: Linked, Not linked, and what a press does', /Linked\s*Not linked\s*Press a meeting to open its prep or notes here/.test(await p.evaluate(() => document.querySelector('#czViewer .vzc-leg').innerText.replace(/\n/g, ' '))));
59
77
 
60
78
  /* C3 the day */
61
- await tap(p, '[data-c="view"][data-k="day"]');
79
+ await tap(p, '.vzc-head [data-c="view"][data-k="day"]');
62
80
  await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzc-dy').length === 5 && document.querySelectorAll('#czViewer .vzc-de').length > 0), 10000);
63
- const strip = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')].map((d) => ({ dow: d.querySelector('span').textContent, on: d.getAttribute('aria-pressed') })));
64
- ok('C3 Day: Monday to Friday, today pressed, the range says "· today"', strip.map((d) => d.dow).join() === 'Mon,Tue,Wed,Thu,Fri' && strip.filter((d) => d.on === 'true').length === 1 && /· today$/.test(await p.evaluate(() => document.querySelector('#czViewer .vzc-head h2').textContent)), JSON.stringify(strip));
81
+ const strip = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')].map((d) => ({ dow: d.querySelector('span').textContent, on: d.getAttribute('aria-pressed'), bar: !!d.querySelector('.vzc-lb') })));
82
+ ok('C3 Day: Monday to Friday, each with its load bar; today pressed on a weekday', strip.map((d) => d.dow).join() === 'MON,TUE,WED,THU,FRI' && strip.every((d) => d.bar) && strip.filter((d) => d.on === 'true').length === (weekday ? 1 : 0), JSON.stringify(strip));
65
83
  const day = await text(p);
66
- ok('C3 the day: its count, each entry at its time with a chip', /\d (meetings?|entries) · /.test(day) && /Viewer sync/.test(day) && await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-de')].every((r) => r.querySelector('.vz-cc'))), day.slice(0, 400));
67
- ok('C3 a note recorded without an event shows Link it; a done meeting Done', /Compare meeting note apps/.test(day) && /Link it/.test(day) && /Done/.test(day));
84
+ const chips = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-de .vz-cc')].map((c) => c.textContent));
85
+ ok('C3 the day: one list, each entry at its time; a chip only on Link it or a live recording', /Viewer sync/.test(day) && chips.length > 0 && chips.every((c) => /^(Link it|Recording|Paused)$/.test(c)) && await p.evaluate(() => !!document.querySelector('#czViewer .vzc-list')), JSON.stringify(chips));
86
+ ok('C3 a note recorded without an event shows Link it; a met meeting says notes ready', /Compare meeting note apps/.test(day) && /Link it/.test(day) && /notes ready/.test(day));
68
87
  const other = await p.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .vzc-dy')].find((d) => d.getAttribute('aria-pressed') === 'false'); b.click(); return b.dataset.k; });
69
88
  ok('C3 another day lists its own meetings', await until(async () => /1:1 with Dita/.test(await text(p))), other);
70
- await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')][[...document.querySelectorAll('#czViewer .vzc-dy')].findIndex((d) => /today/.test(d.getAttribute('aria-label')))].click());
89
+ // back to today: its day in the strip, or ⋯ Back to today on a weekend (the strip is Monday to Friday)
90
+ if (weekday) await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')].find((d) => /today/.test(d.getAttribute('aria-label'))).click());
91
+ else await more(p, 'Back to today');
71
92
 
72
93
  /* C4 a meeting opens its card */
73
94
  await until(async () => /Viewer sync/.test(await text(p)));
@@ -78,6 +99,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
78
99
  /* C5 Link it */
79
100
  const B = await F.open(browser, BASE, '/premium-viewer.html?open=calendar');
80
101
  const q = B.page;
102
+ await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vzc-dy')), 15000);
103
+ await more(q, 'Week');
81
104
  await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vzc-ev [data-c="link"]')), 15000);
82
105
  await tap(q, '.vzc-ev [data-c="link"]');
83
106
  ok('C5 Link it opens the meeting with What it is about open', await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-mtg') && !!document.querySelector('#czViewer .vzm-pop [data-a="aboutq"]'))), (await text(q)).slice(0, 300));
@@ -87,9 +110,9 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
87
110
  /* C6 Month, previous, next, Today */
88
111
  const C = await F.open(browser, BASE, '/premium-viewer.html?open=calendar');
89
112
  const r = C.page;
90
- await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vzc-wk')), 15000);
113
+ await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vzc-dy')), 15000);
91
114
  const n0 = C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length;
92
- await tap(r, '[data-c="view"][data-k="month"]');
115
+ await more(r, 'Month');
93
116
  ok('C6 Month reads the month and draws its grid', await until(() => C.S.gets.some((g) => /view=month/.test(g))) && await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vzc-mg') && /^\w+ \d{4}$/.test(document.querySelector('#czViewer .vzc-head h2').textContent))));
94
117
  const n1 = C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length;
95
118
  const head = () => r.evaluate(() => document.querySelector('#czViewer .vzc-head h2').textContent);
@@ -99,10 +122,10 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
99
122
  await until(async () => C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length > n1 && (await head()) !== m0);
100
123
  await tap(r, '[data-c="nav"][data-k="0"]');
101
124
  ok('C6 next and Today read again', await until(() => C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length >= n0 + 3));
102
- await tap(r, '[data-c="view"][data-k="week"]');
125
+ await more(r, 'Week');
103
126
  await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vzc-wk')));
104
127
  await tap(r, '.vzc-dn');
105
- ok('C6 a day name in the week opens that day', await until(() => r.evaluate(() => document.querySelector('#czViewer [data-c="view"][data-k="day"]').getAttribute('aria-pressed') === 'true')));
128
+ ok('C6 a day name in the week opens that day', await until(() => r.evaluate(() => !document.querySelector('#czViewer .vzc-wk') && document.querySelectorAll('#czViewer .vzc-dy').length === 5)));
106
129
  await C.ctx.close();
107
130
 
108
131
  /* C7 honest states: a calendar that does not answer */
@@ -126,9 +149,12 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
126
149
  const G = await F.open(browser, BASE, '/premium.html', { w: 1440, h: 900 });
127
150
  await until(() => G.page.evaluate(() => !!(window.czViews && window.czViews.openCalendar)), 15000);
128
151
  await G.page.evaluate(() => window.czViews.openCalendar());
152
+ await until(() => G.page.evaluate(() => !!document.querySelector('#czViewer .vzc-dy')), 15000);
153
+ ok('C9 the day sits at the side\'s width', await G.page.evaluate(() => !document.querySelector('#czViewer').dataset.vzw));
154
+ await more(G.page, 'Week');
129
155
  const wide = await until(() => G.page.evaluate(() => { const v = document.querySelector('#czViewer'); return v && v.dataset.vzw === 'cal' && document.querySelector('#czViewer .vzc-wk') && v.getBoundingClientRect().width > 600 && { w: v.getBoundingClientRect().width, hv: !!document.querySelector('#czViewer .hv') }; }), 15000)
130
156
  || await G.page.evaluate(() => { const v = document.querySelector('#czViewer'); return v && { w: v.getBoundingClientRect().width, hv: !!document.querySelector('#czViewer .hv') }; }); // the width comes with the stylesheet
131
- ok('C9 on premium.html, czViews.openCalendar() draws the week in a wider Viewer, with no bare .hv class in the card', wide && wide.w > 600 && !wide.hv, JSON.stringify(wide));
157
+ ok('C9 on premium.html, ⋯ Week draws the week in a wider Viewer, with no bare .hv class in the card', wide && wide.w > 600 && !wide.hv, JSON.stringify(wide));
132
158
  await G.ctx.close();
133
159
  finish();
134
160
  })();
@@ -51,7 +51,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
51
51
  S.up = await until(() => page.evaluate(() => !!document.querySelector('.hm-card [data-hm-ov]') && !!window.__premiumWorkItem), 20000);
52
52
  return { page, ctx, S };
53
53
  };
54
- const overview = async (page) => { 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 */ return until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-ov-record]') && !!document.querySelector('#czViewer [data-ov-tk="task:t1"]'))); };
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) => { 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 */ return until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-cz-vw="more"]') && !!document.querySelector('#czViewer [data-ov-tk="task:t1"]'))); };
55
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 }; });
56
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);
57
58
  const INI = 'item:ini:self-serve-v2';
@@ -60,9 +61,9 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
60
61
  {
61
62
  const { page, ctx, S } = await open();
62
63
  ok('R9 Home loads the initiative with the Viewer\'s item views', S.up);
63
- ok('R9 the Overview offers Open the full record and an Open press on each task', await overview(page));
64
+ ok('R9 the Overview offers Open the full record (under ⋯) and an Open press on each task', await overview(page));
64
65
  const n0 = S.vgets.length;
65
- await page.click('#czViewer [data-ov-record]');
66
+ await viaMore(page, 'Open the full record');
66
67
  await until(async () => /Checks/.test(await paneTxt(page, INI)));
67
68
  let s = await cur(page), t = await paneTxt(page, INI);
68
69
  ok('R9 the record opens in the Viewer in place of the Overview, one item at a time', s.on === INI && s.n === 1, JSON.stringify(s));
@@ -106,15 +107,16 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
106
107
  const up = await until(() => page.evaluate(() => document.querySelectorAll('#ibBody [data-key]').length > 0), 20000);
107
108
  ok('R9 the Board loads', up);
108
109
  await page.click('#ibBody .ini2[data-key="board:self-serve-v2"]'); // a phone opens on the List view (premium-uncovered-features, BdPhone)
109
- const pk = await until(() => page.evaluate(() => { const k = document.querySelector('#peek'); return k && !k.hidden ? { record: !!k.querySelector('[data-pk="record"]'), dlg: !!document.querySelector('#dlg.on'), href: (k.querySelector('[data-pk="expand"]') || {}).getAttribute ? k.querySelector('[data-pk="expand"]').getAttribute('href') : '' } : null; }));
110
- ok('R9 an initiative row opens the Board\'s side panel, not the dialog, and its expand leads to the initiative page, where the record tab is', !!pk && !pk.record && !pk.dlg && /^\/premium-initiative\.html\?id=self-serve-v2&ws=w1&board=w1$/.test(pk.href), JSON.stringify(pk));
110
+ /* re-pointed (viewer-shell-a, XvABoard): the initiative opens in the Viewer's shell A; "Open in full" under ⋯ leads to the initiative page */
111
+ const pk = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); return v && !v.hidden && c && c.kind === 'Initiative' ? { record: !!v.querySelector('[data-pk="record"]'), dlg: !!document.querySelector('#dlg.on'), href: c.url || '' } : null; }));
112
+ ok('R9 an initiative row opens the Board\'s initiative in the Viewer, not the dialog, and its "Open in full" leads to the initiative page, where the record tab is', !!pk && !pk.record && !pk.dlg && /^\/premium-initiative\.html\?id=self-serve-v2&ws=w1&board=w1$/.test(pk.href), JSON.stringify(pk));
111
113
  ok('R9 no page error on the Board', errors.length === 0, errors.join(' | '));
112
114
  await ctx.close();
113
115
  }
114
116
  {
115
117
  const { page, ctx, S } = await open({ w: 390, h: 844, theme: 'dark' });
116
118
  await overview(page);
117
- await page.click('#czViewer [data-ov-record]');
119
+ await viaMore(page, 'Open the full record');
118
120
  await until(async () => /Checks/.test(await paneTxt(page, INI)));
119
121
  const fl = await page.evaluate((k) => {
120
122
  const p = document.querySelector(`#czViewer .obody.vw[data-vw="${CSS.escape(k)}"]`);
@@ -71,8 +71,9 @@ const TICKETS = {
71
71
  const model = (sprints) => BP.build(F.facts({ sprints }));
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
- const overview = async (pg) => { if (!(await pg.locator('.hm-card [data-hm-ov]').isVisible())) await pg.click('#hmNeeds'); await pg.click('.hm-card [data-hm-ov]'); /* a phone: the initiative card is in the top bar's sheet */ return until(() => pg.evaluate(() => !!document.querySelector('#czViewer [data-ov-sprint]'))); };
75
- const openSprint = async (pg) => { if (!(await pg.$('#czViewer:not([hidden]) [data-ov-sprint]'))) await overview(pg); /* open() already showed the Overview */ await pg.click('#czViewer [data-ov-sprint]'); };
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) => { if (!(await pg.locator('.hm-card [data-hm-ov]').isVisible())) await pg.click('#hmNeeds'); await pg.click('.hm-card [data-hm-ov]'); /* a phone: the initiative card is in the top bar's sheet */ return until(() => pg.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]'))); };
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'); };
76
77
  const open = async ({ w = 1280, h = 900, theme = 'light', sprints = SPRINTS, tickets = TICKETS } = {}) => {
77
78
  const ctx = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: theme });
78
79
  await ctx.addInitScript((t) => { try { localStorage.setItem('pmos.c3.theme', t); } catch { /* none */ } }, theme);