create-pmos 0.398.0 → 0.399.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 (126) hide show
  1. package/package.json +13 -13
  2. package/payload/KIT-VERSION +1 -1
  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/workspace/briefing-premium-adddoc-test.js +18 -14
  7. package/workspace/briefing-premium-board-test.js +80 -48
  8. package/workspace/briefing-premium-calendar-2-test.js +36 -36
  9. package/workspace/briefing-premium-calendar-3-test.js +39 -39
  10. package/workspace/briefing-premium-calendar-test.js +23 -24
  11. package/workspace/briefing-premium-doc-edit-test.js +6 -2
  12. package/workspace/briefing-premium-initiative-test.js +38 -16
  13. package/workspace/briefing-premium-insights-test.js +114 -37
  14. package/workspace/briefing-premium-metrics-test.js +6 -4
  15. package/workspace/briefing-premium-products-test.js +10 -7
  16. package/workspace/briefing-premium-sources-test.js +25 -22
  17. package/workspace/briefing-premium-test.js +46 -42
  18. package/workspace/briefing-premium-work-test.js +9 -9
  19. package/workspace/changelog.json +12 -0
  20. package/workspace/ev-everywhere-test.js +210 -0
  21. package/workspace/fixtures/premium-viewer-fixtures.js +11 -6
  22. package/workspace/guide/home.md +39 -18
  23. package/workspace/guide/index.md +1 -1
  24. package/workspace/lib/board-grill.js +63 -0
  25. package/workspace/lib/board-premium.js +36 -5
  26. package/workspace/lib/initiative-layout.js +77 -0
  27. package/workspace/lib/insights-premium.js +3 -2
  28. package/workspace/lib/insights-records.js +21 -7
  29. package/workspace/lib/meeting-points.js +52 -0
  30. package/workspace/lib/news-for-you.js +88 -0
  31. package/workspace/lib/notes-series.js +29 -6
  32. package/workspace/lib/report-confirm.js +48 -0
  33. package/workspace/lib/route-modules.js +8 -0
  34. package/workspace/lib/routes-board-docs.js +46 -0
  35. package/workspace/lib/routes-board-grill.js +90 -0
  36. package/workspace/lib/routes-home-review.js +108 -0
  37. package/workspace/lib/routes-initiative-layout.js +57 -0
  38. package/workspace/lib/routes-insights-premium.js +4 -1
  39. package/workspace/lib/routes-insights-records.js +8 -4
  40. package/workspace/lib/routes-meeting-points.js +37 -0
  41. package/workspace/lib/routes-news.js +57 -0
  42. package/workspace/lib/routes-notes.js +2 -1
  43. package/workspace/lib/routes-report-confirm.js +31 -0
  44. package/workspace/lib/routes-search.js +38 -0
  45. package/workspace/lib/search-index.js +176 -0
  46. package/workspace/package-lock.json +2 -2
  47. package/workspace/package.json +1 -1
  48. package/workspace/premium-board-actions-test.js +86 -50
  49. package/workspace/premium-briefing-depth-test.js +55 -54
  50. package/workspace/premium-chat-chart-tab-test.js +4 -2
  51. package/workspace/premium-chat-report-tab-test.js +16 -2
  52. package/workspace/premium-core-doc-issue-test.js +15 -13
  53. package/workspace/premium-phone-card-test.js +5 -3
  54. package/workspace/premium-report-read-test.js +55 -18
  55. package/workspace/premium-vw-backlog-test.js +2 -2
  56. package/workspace/premium-vw-cal-test.js +50 -35
  57. package/workspace/premium-vw-doc-test.js +9 -3
  58. package/workspace/premium-vw-item-test.js +1 -1
  59. package/workspace/premium-vw-jira-test.js +2 -2
  60. package/workspace/premium-vw-meet-test.js +37 -40
  61. package/workspace/premium-vw-notes-test.js +21 -19
  62. package/workspace/premium-vw-rec-test.js +11 -12
  63. package/workspace/premium-welcome-test.js +3 -3
  64. package/workspace/premium-work-depth-test.js +3 -3
  65. package/workspace/public/pm/bd-acts.js +303 -225
  66. package/workspace/public/pm/bd-asks.js +261 -0
  67. package/workspace/public/pm/bd-pop.js +59 -0
  68. package/workspace/public/pm/bd-span.js +49 -13
  69. package/workspace/public/pm/bd-views.js +169 -0
  70. package/workspace/public/pm/cozy-board.css +301 -0
  71. package/workspace/public/pm/cozy-ev.css +228 -0
  72. package/workspace/public/pm/cozy-evmodel.js +106 -0
  73. package/workspace/public/pm/cozy-evui.js +47 -0
  74. package/workspace/public/pm/cozy-insights.css +148 -10
  75. package/workspace/public/pm/cozy-nav.js +103 -39
  76. package/workspace/public/pm/cozy-news.js +140 -0
  77. package/workspace/public/pm/cozy-search.js +203 -0
  78. package/workspace/public/pm/cozy-settings.js +198 -0
  79. package/workspace/public/pm/cozy-sources.js +89 -0
  80. package/workspace/public/pm/cozy-today.css +217 -0
  81. package/workspace/public/pm/cozy-viewer.js +1 -0
  82. package/workspace/public/pm/cozy-vw-mtg.css +350 -0
  83. package/workspace/public/pm/cozy-vw-rp.css +152 -0
  84. package/workspace/public/pm/home-adddoc.js +5 -5
  85. package/workspace/public/pm/home-app.js +329 -55
  86. package/workspace/public/pm/home-around.js +24 -126
  87. package/workspace/public/pm/home-chat.js +67 -14
  88. package/workspace/public/pm/home-data.js +6 -6
  89. package/workspace/public/pm/home-dictate.js +54 -0
  90. package/workspace/public/pm/home-draft.js +6 -6
  91. package/workspace/public/pm/home-ini-model.js +190 -0
  92. package/workspace/public/pm/home-ini.css +171 -0
  93. package/workspace/public/pm/home-ini.js +456 -0
  94. package/workspace/public/pm/home-list.js +276 -0
  95. package/workspace/public/pm/home-more.js +17 -134
  96. package/workspace/public/pm/home-phone-card.js +4 -4
  97. package/workspace/public/pm/home-review.js +104 -0
  98. package/workspace/public/pm/home-task.js +67 -0
  99. package/workspace/public/pm/home-today.js +144 -0
  100. package/workspace/public/pm/home-work.js +54 -26
  101. package/workspace/public/pm/premium-board.js +163 -39
  102. package/workspace/public/pm/premium-chart-tab.js +4 -5
  103. package/workspace/public/pm/premium-first.js +5 -7
  104. package/workspace/public/pm/premium-insights.js +499 -202
  105. package/workspace/public/pm/premium-mtg-present.js +138 -0
  106. package/workspace/public/pm/premium-mtg-replay.js +142 -0
  107. package/workspace/public/pm/premium-report-read.js +216 -52
  108. package/workspace/public/pm/premium-report-tab.js +44 -19
  109. package/workspace/public/pm/premium-shell.js +7 -7
  110. package/workspace/public/pm/premium-vw-cal.js +150 -60
  111. package/workspace/public/pm/premium-vw-mtg.js +488 -261
  112. package/workspace/public/pm/premium-vw-notes.js +61 -0
  113. package/workspace/public/pm/rp-parts.js +269 -0
  114. package/workspace/public/premium-board.html +4 -3
  115. package/workspace/public/premium-insights.html +10 -10
  116. package/workspace/public/premium.html +3 -1
  117. package/workspace/r/m1.png +0 -0
  118. package/workspace/r/m2.png +0 -0
  119. package/workspace/r/m3.png +0 -0
  120. package/workspace/r/nl.png +0 -0
  121. package/workspace/test-lists/initiative-layout.json +9 -0
  122. package/workspace/test-lists/premium-uncovered-meetings.json +9 -0
  123. package/workspace/test-lists/premium-uncovered-reports.json +9 -0
  124. package/workspace/test-lists/uf-everywhere.json +15 -0
  125. package/workspace/test-lists/uf-home.json +9 -0
  126. package/workspace/test-lists/uncovered-board.json +9 -0
@@ -117,7 +117,7 @@ const SPRINTS = { ok: true, source: 'jira', readAt: '2026-10-19T09:00:00Z', velo
117
117
  await ctx.close();
118
118
  }
119
119
 
120
- /* the Agreed Board (premium-agreed-design) carries no Sprint card, no backlog button and no dialog of its own */
120
+ /* the Board (premium-uncovered-features, BdSprint) carries no Sprint card and no dialog; its sprint chip opens the Sprints and releases popover, whose Backlog row opens the backlog in the side panel */
121
121
  {
122
122
  const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }), page = await ctx.newPage(), errs = [];
123
123
  page.on('pageerror', (e) => errs.push(String((e && e.message) || e)));
@@ -125,7 +125,7 @@ const SPRINTS = { ok: true, source: 'jira', readAt: '2026-10-19T09:00:00Z', velo
125
125
  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
126
  await page.goto(BASE + '/premium-board.html');
127
127
  const up = await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .bt-l').length > 0), 20000);
128
- ok('R10 the Agreed Board has no Sprint card or backlog button; its sprint chip opens the read-only Sprint and release panel, "Waiting for design"', up && await page.evaluate(() => !document.querySelector('#cSpr, #openBacklog, #popSpr')) && (await page.click('#chSprint'), await until(() => page.evaluate(() => { const k = document.querySelector('#peek'); return !!k && !k.hidden && (document.querySelector('#pkTitle') || {}).textContent === 'Sprint and release' && /Waiting for design/.test(k.textContent) && !document.querySelector('#peek [data-jbl]') && !!!document.querySelector('#dlg.on'); }))));
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
129
  ok('R10 no page error on the Board', errs.length === 0, errs.join(' | '));
130
130
  await ctx.close();
131
131
  }
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
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
- * area viewer: Main.dc.html viewer prop cal). Serves the real /premium-viewer.html from the real server; GET /api/calendar-views and the notes are
5
- * answered by stand-ins (fixtures/premium-viewer-fixtures.js).
6
- * C1 the card: Calendar | Notes and New note · C2 the Mon–Fri strip with load bars · C3 the day list with chips and the footer · C4 a meeting opens
7
- * its card · C5 Link it · C6 Day, week and month (plain list, Waiting for design): previous, next, Today · C7 honest states · C8 floors
4
+ * area viewer; redrawn for premium-uncovered-features, area meetings: MtCalendar and MtPhone). Serves the real /premium-viewer.html from the
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
8
9
  * Every wait polls the page; no fixed sleep stands in for a state. */
9
10
  const path = require('path');
10
11
  const { spawn } = require('child_process');
@@ -39,55 +40,66 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
39
40
 
40
41
  const A = await F.open(browser, BASE, '/premium-viewer.html?open=calendar');
41
42
  const p = A.page;
42
- const up = await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vz-day').length === 5 && document.querySelectorAll('#czViewer .vz-row').length > 0), 15000);
43
- ok('C1 the calendar opens in the Viewer card', up);
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);
44
45
  if (!up) return finish(1);
45
- ok('C1 the card holds Calendar | Notes and New note, and no tabs strip or conversation', await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-seg [data-c="tab"]')].map((b) => b.textContent).join() === 'Calendar,Notes' && !!document.querySelector('#czViewer [data-c="new"]') && !document.querySelector('#dlg, .stream')));
46
- ok('C1 the header names it', await p.evaluate(() => document.querySelector('#czViewer .cz-vw-kind').textContent === 'Meetings' && document.querySelector('#czViewer .cz-vw-title').textContent === 'Calendar and notes'));
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)));
47
49
 
48
- /* C2 the strip */
49
- const strip = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-day')].map((d) => ({ dow: d.querySelector('span').textContent, on: d.getAttribute('aria-pressed'), bar: d.querySelector('i').hasAttribute('data-on'), sub: d.querySelector('small').textContent })));
50
- ok('C2 Monday to Friday, today pressed', strip.map((d) => d.dow).join() === 'MON,TUE,WED,THU,FRI' && strip.filter((d) => d.on === 'true').length === 1 && strip.some((d) => /today/.test(d.sub)), JSON.stringify(strip));
51
- ok('C2 a day with meetings has its load bar', strip.filter((d) => d.bar).length >= 4, JSON.stringify(strip));
50
+ /* C2 the week grid */
51
+ 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'),
52
+ sync: [...document.querySelectorAll('#czViewer .vzc-ev')].filter((e) => /Viewer sync/.test(e.textContent)).map((e) => e.className + '|' + e.textContent),
53
+ dita: [...document.querySelectorAll('#czViewer .vzc-ev')].filter((e) => /1:1 with Dita/.test(e.textContent)).map((e) => e.className + '|' + e.textContent),
54
+ styled: document.querySelectorAll('#czViewer .vzc-ev[style*="--t"]').length, inline: document.querySelector('#czViewer .vz-cal').outerHTML.match(/ style="[^"]*"/g) }));
55
+ ok('C2 a gutter and seven days, today marked', wk.cols === 8 && wk.now, JSON.stringify(wk));
56
+ ok('C2 a linked meeting is filled with what it is about; one with no initiative is dashed with Link it', wk.sync.length === 1 && !/\bun\b/.test(wk.sync[0]) && /Viewer/.test(wk.sync[0].split('|')[1]) && wk.dita.length >= 1 && wk.dita.every((x) => /\bun\b/.test(x) && /Link it/.test(x)), JSON.stringify([wk.sync, wk.dita]));
57
+ ok('C2 each block is placed by custom properties set after the markup', wk.styled > 0);
58
+ 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, ' '))));
52
59
 
53
60
  /* C3 the day */
61
+ await tap(p, '[data-c="view"][data-k="day"]');
62
+ 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));
54
65
  const day = await text(p);
55
- ok('C3 the day list: Today, its entries and a chip on each', /Today, /.test(day) && /Viewer sync/.test(day) && await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-row')].every((r) => r.querySelector('.vz-cc'))), day.slice(0, 400));
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));
56
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));
57
- ok('C3 the footer says PMOS never writes the calendar', /PMOS never writes to it/.test(day));
58
- const other = await p.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .vz-day')].find((d) => d.getAttribute('aria-pressed') === 'false' && d.querySelector('i').hasAttribute('data-on')); b.click(); return b.dataset.k; });
68
+ 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; });
59
69
  ok('C3 another day lists its own meetings', await until(async () => /1:1 with Dita/.test(await text(p))), other);
60
- await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-day')].find((d) => /today/.test(d.querySelector('small').textContent)).click());
70
+ await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-dy')][[...document.querySelectorAll('#czViewer .vzc-dy')].findIndex((d) => /today/.test(d.getAttribute('aria-label')))].click());
61
71
 
62
72
  /* C4 a meeting opens its card */
63
73
  await until(async () => /Viewer sync/.test(await text(p)));
64
- await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-row')].find((r) => /Viewer sync/.test(r.textContent)).click());
74
+ await p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-de')].find((r) => /Viewer sync/.test(r.textContent)).click());
65
75
  ok('C4 a meeting opens the meeting card in place of the calendar', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-mtg') && /Viewer sync/.test(document.querySelector('#czViewer .cz-vw-title').textContent))), 10000);
66
76
  await A.ctx.close();
67
77
 
68
78
  /* C5 Link it */
69
79
  const B = await F.open(browser, BASE, '/premium-viewer.html?open=calendar');
70
80
  const q = B.page;
71
- await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-c="link"]')), 15000);
72
- await tap(q, '[data-c="link"]');
73
- ok('C5 Link it opens the meeting with the about picker, marked Waiting for design', await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-mtg') && !!document.querySelector('#czViewer [data-cz-placeholder]'))), (await text(q)).slice(0, 300));
81
+ await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vzc-ev [data-c="link"]')), 15000);
82
+ await tap(q, '.vzc-ev [data-c="link"]');
83
+ 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));
84
+ ok('C5 no Waiting for design marker', await q.evaluate(() => !document.querySelector('#czViewer [data-cz-placeholder]')));
74
85
  await B.ctx.close();
75
86
 
76
- /* C6 Day, week and month */
87
+ /* C6 Month, previous, next, Today */
77
88
  const C = await F.open(browser, BASE, '/premium-viewer.html?open=calendar');
78
89
  const r = C.page;
79
- await until(() => r.evaluate(() => !!document.querySelector('#czViewer [data-c="more"]')), 15000);
80
- await tap(r, '[data-c="more"]');
81
- ok('C6 Day, week and month opens the plain list, marked Waiting for design', await until(() => r.evaluate(() => !!document.querySelector('#czViewer [data-cz-placeholder="Day/Week/Month calendar"]') && document.querySelectorAll('#czViewer [data-c="mrow"]').length > 0)), (await text(r)).slice(-400));
90
+ await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vzc-wk')), 15000);
82
91
  const n0 = C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length;
83
- await tap(r, '[data-c="mv"][data-k="month"]');
84
- ok('C6 Month reads the month', await until(() => C.S.gets.some((g) => /view=month/.test(g))));
85
- await until(() => r.evaluate(() => !!document.querySelector('#czViewer [data-c="mrow"], #czViewer [data-cz-placeholder="Day/Week/Month calendar"] .vz-empty')));
92
+ await tap(r, '[data-c="view"][data-k="month"]');
93
+ 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))));
86
94
  const n1 = C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length;
87
- await tap(r, '[data-c="mn"][data-k="1"]');
95
+ await tap(r, '[data-c="nav"][data-k="1"]');
88
96
  await until(() => C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length > n1);
89
- await tap(r, '[data-c="mn"][data-k="0"]');
97
+ await tap(r, '[data-c="nav"][data-k="0"]');
90
98
  ok('C6 next and Today read again', await until(() => C.S.gets.filter((g) => g.startsWith('/api/calendar-views')).length >= n0 + 3));
99
+ await tap(r, '[data-c="view"][data-k="week"]');
100
+ await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vzc-wk')));
101
+ await tap(r, '.vzc-dn');
102
+ 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')));
91
103
  await C.ctx.close();
92
104
 
93
105
  /* C7 honest states: a calendar that does not answer */
@@ -99,18 +111,21 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
99
111
 
100
112
  /* C8 floors */
101
113
  const E = await F.open(browser, BASE, '/premium-viewer.html?open=calendar', { w: 390, h: 844 });
102
- await until(() => E.page.evaluate(() => document.querySelectorAll('#czViewer .vz-day').length === 5), 15000);
103
- const fl = await E.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, small: [...document.querySelectorAll('#czViewer .vz-row, #czViewer .vz-day')].filter((b) => b.getBoundingClientRect().height < 44).length }));
114
+ ok('C8 390px opens on the day', await until(() => E.page.evaluate(() => document.querySelectorAll('#czViewer .vzc-dy').length === 5 && document.querySelectorAll('#czViewer .vzc-de').length > 0), 15000));
115
+ // the Meetings stylesheet loads after the card is drawn: measure once it applies, and fail if it never does
116
+ const flOf = () => E.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, small: [...document.querySelectorAll('#czViewer .vzc-de, #czViewer .vzc-dy')].filter((b) => b.getBoundingClientRect().height < 44).length }));
117
+ const fl = await until(async () => { const v = await flOf(); return v.over <= 0 && v.small === 0 ? v : null; }, 8000) || await flOf();
104
118
  ok('C8 390px: no sideways scroll, rows and days at least 44px tall', fl.over <= 0 && fl.small === 0, JSON.stringify(fl));
105
119
  ok('C8 no page error', E.errors.length === 0 && A.errors.length === 0, E.errors.concat(A.errors).join(' | '));
106
120
  await E.ctx.close();
107
121
 
108
- /* C9 on Home, the calendar keeps its rows: Home's own stylesheet has a .hv class, and the card's hover class must not meet it */
109
- const G = await F.open(browser, BASE, '/premium.html');
122
+ /* C9 on Home, the Viewer widens for the week */
123
+ const G = await F.open(browser, BASE, '/premium.html', { w: 1440, h: 900 });
110
124
  await until(() => G.page.evaluate(() => !!(window.czViews && window.czViews.openCalendar)), 15000);
111
125
  await G.page.evaluate(() => window.czViews.openCalendar());
112
- const row = await until(() => G.page.evaluate(() => { const r = document.querySelector('#czViewer .vz-row'); return r && { dir: getComputedStyle(r).flexDirection, disp: getComputedStyle(r).display, hv: !!document.querySelector('#czViewer .hv') }; }), 15000);
113
- ok('C9 on premium.html, czViews.openCalendar() draws each row as one line (flex row), with no bare .hv class in the card', row && row.disp === 'flex' && row.dir === 'row' && !row.hv, JSON.stringify(row));
126
+ 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)
127
+ || 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
128
+ 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));
114
129
  await G.ctx.close();
115
130
  finish();
116
131
  })();
@@ -78,8 +78,12 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
78
78
  });
79
79
  await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&theme=' + theme);
80
80
  await until(() => page.evaluate(() => !!document.querySelector('.hm-r[data-id="f:planning/prd/self-serve-v2-prd.md"]')), 15000);
81
- if (w < 761) await page.click('#hmNeeds'); // a phone: the list is the top bar's sheet
82
- await page.click('.hm-r[data-id="f:planning/prd/self-serve-v2-prd.md"] .hm-rm'); // the initiative's Files group: the PRD opens as a page
81
+ await until(() => page.evaluate(() => !!document.querySelector('#hmList [data-hi-open="docs"]')), 15000);
82
+ if (!(await page.evaluate(() => !!document.querySelector('#hmList [data-hi-open="docs"]').offsetParent))) await page.click('#hmNeeds'); // a phone may show the list in the top bar's sheet
83
+ // the initiative's Core documents group (in place of the Files group, premium-uncovered-features InDocs) opens every document in the Viewer
84
+ await page.click('#hmList [data-hi-open="docs"]');
85
+ await until(() => page.evaluate(() => !!document.querySelector('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]')), 15000);
86
+ await page.click('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]'); // the PRD opens as a page
83
87
  await until(() => page.evaluate(() => document.querySelector('.vwdoc .cf, .vwdoc .vwempty:not(:empty)') && !/Reading the file/.test(document.querySelector('.vwdoc').textContent)));
84
88
  return { ctx, page, S };
85
89
  };
@@ -107,7 +111,9 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
107
111
  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')));
108
112
  await p.click(V + ' [data-vd="open:planning/evals/self-serve-v2-rubric.md"]');
109
113
  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"]'))));
110
- await p.click('.hm-r[data-id="f:planning/prd/self-serve-v2-prd.md"] .hm-rm'); // back to the PRD: its row opens it again
114
+ await p.click('#hmList [data-hi-open="docs"]'); // back to the PRD: Core documents opens it again
115
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]')), 15000);
116
+ await p.click('#czViewer [data-ov-open="planning/prd/self-serve-v2-prd.md"]');
111
117
  await until(() => p.evaluate(() => !!document.querySelector('#czViewer .obody.vw[data-vw="doc:planning/prd/self-serve-v2-prd.md"] .vwdoc .cf')));
112
118
  await p.click(V + ' [data-vd="more:copies"]');
113
119
  ok('D9 Copies says there is none yet and offers to link one', /no copy in Confluence or Google Docs yet/.test(await txt(p, V + ' .vwmp')));
@@ -105,7 +105,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
105
105
  await page.goto(BASE + '/premium-board.html?theme=dark');
106
106
  const up = await until(() => page.evaluate(() => document.querySelectorAll('#ibBody [data-key]').length > 0), 20000);
107
107
  ok('R9 the Board loads', up);
108
- await page.click('#ibBody .bt-l[data-row="board:self-serve-v2"] .bt-nm');
108
+ await page.click('#ibBody .ini2[data-key="board:self-serve-v2"]'); // a phone opens on the List view (premium-uncovered-features, BdPhone)
109
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
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));
111
111
  ok('R9 no page error on the Board', errors.length === 0, errors.join(' | '));
@@ -184,7 +184,7 @@ const TICKETS = {
184
184
  await I.ctx.close();
185
185
  }
186
186
 
187
- /* A the Agreed Board (premium-agreed-design): its sprint chip names the sprint and shows "Waiting for design"; it opens no dialog */
187
+ /* A the Board (premium-uncovered-features, BdSprint): its sprint chip names the sprint and opens the Sprints and releases popover; it opens no dialog */
188
188
  {
189
189
  const ctx = await browser.newContext({ viewport: { width: 1280, height: 900 } }), pg = await ctx.newPage(), errs = [];
190
190
  pg.on('pageerror', (e) => errs.push(String((e && e.message) || e)));
@@ -193,7 +193,7 @@ const TICKETS = {
193
193
  await until(() => pg.evaluate(() => !!document.querySelector('#chSprint')), 20000);
194
194
  const chip = await pg.evaluate(() => document.querySelector('#chSprint').textContent.trim());
195
195
  await pg.click('#chSprint');
196
- ok('A1 the Board\'s sprint chip names the sprint and opens its read-only Sprint and release panel, tagged "Waiting for design", in the side panel, never the dialog', chip === 'Sprint 14' && await until(() => pg.evaluate(() => (() => { const k = document.querySelector('#peek'); return !!k && !k.hidden && (document.querySelector('#pkTitle') || {}).textContent === 'Sprint and release' && /Waiting for design/.test(k.textContent) && /Sprint 14/.test(k.textContent) && /Nothing here changes Jira/.test(k.textContent); })() && !!!document.querySelector('#dlg.on') && !document.querySelector('#cSpr'))), chip);
196
+ ok('A1 the Board\'s sprint chip names the sprint and opens the Sprints and releases popover, which lists it from Jira, never the dialog', chip === 'Sprint 14' && await until(() => pg.evaluate(() => (() => { const p = document.querySelector('#bdPop'); return !!p && !p.hidden && p.getAttribute('aria-label') === 'Sprints and releases' && /Sprints · from Jira/.test(p.textContent) && !!p.querySelector('[data-sprint="Sprint 14"]'); })() && !!!document.querySelector('#dlg.on') && !document.querySelector('#cSpr'))), chip);
197
197
  ok('A2 no page error on the Board', errs.length === 0, errs.join(' | '));
198
198
  await ctx.close();
199
199
  }
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
  /* premium-vw-meet-test.js — the meeting in the Viewer card (initiative premium-viewer, R3; re-pointed for premium-agreed-design, area viewer:
4
- * Main.dc.html AgPrep / AgMeetLive / AgMeeting). Serves the real /premium-viewer.html from the real server; the notes, the calendar, Focus, the
5
- * replay and the viewer-meeting record are answered by stand-ins (fixtures/premium-viewer-fixtures.js), so each press can be read off the request
6
- * the page sent. The routes' own behaviour is in their own suites; the pure half is in premium-vw-meet.test.js and premium-vw-agreed.test.js.
7
- * One card, no tabs and no conversation: parts in a fixed order Prep → Transcript → Notes, the one that fits the meeting's state open.
8
- * S1 parts · S2 head · S3 After · S4 Make task and Becomes V.4 · S5 Before (prep) · S6 During · S7 series membership · S8 no note · S9 writes · S10 floors
4
+ * Main.dc.html AgPrep / AgMeetLive / AgMeeting; re-pointed again for premium-uncovered-features, meetings: MtAfter, MtFocus, MtReplay, MtMaterial).
5
+ * Serves the real /premium-viewer.html from the real server; the notes, the calendar, Focus, the replay and the viewer-meeting record are answered
6
+ * by stand-ins (fixtures/premium-viewer-fixtures.js), so each press can be read off the request the page sent. The routes' own behaviour is in
7
+ * their own suites; the pure half is in premium-vw-meet.test.js, premium-vw-agreed.test.js and premium-uncovered-meetings.test.js.
8
+ * One card with no conversation: a meeting to come is prep with no tabs; a live one has Live notes | Focus | Transcript; a done one has
9
+ * Notes | Replay | Transcript, Notes open.
10
+ * S1 tabs · S2 head · S3 After · S4 Make task and Becomes V.4 · S5 Before (prep) · S6 During · S7 series membership · S8 no note · S9 writes · S10 floors
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');
@@ -36,33 +38,29 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
36
38
  await T.waitForServer(BASE);
37
39
  browser = await chromium.launch({ executablePath: exe });
38
40
  const body = (p) => p.evaluate(() => (document.querySelector('#czViewer .cz-vw-body') || {}).innerText || '');
39
- const parts = (p) => p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-part')].map((x) => x.dataset.part + ':' + x.dataset.open).join());
41
+ const tabs = (p) => p.evaluate(() => [...document.querySelectorAll('#czViewer .vzm-tabs [data-a="tab"]')].map((x) => x.dataset.k + (x.getAttribute('aria-selected') === 'true' ? '*' : '')).join());
40
42
  const press = (p, sel) => p.$eval('#czViewer ' + sel, (b) => b.click());
41
43
 
42
44
  /* an ended meeting with notes */
43
45
  const A = await F.open(browser, BASE, '/premium-viewer.html?open=meeting&note=n1');
44
46
  const p = A.page;
45
- const up = await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="notes"]') && /Notes and next steps/.test(document.body.innerText)), 15000);
47
+ const up = await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="notes"]') && /Next steps/.test(document.body.innerText)), 15000);
46
48
  ok('0 the meeting opens in the Viewer card on its own page', up);
47
49
  if (!up) return finish(1);
48
50
 
49
- /* S1 parts */
50
- ok('S1 three parts in the order Prep, Transcript, Notes; Notes open for an ended meeting', await parts(p) === 'prep:false,live:false,notes:true', await parts(p));
51
- ok('S1 each part has a sub-line', await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-ph small')].every((s) => s.textContent.trim().length > 3)));
52
- ok('S1 no tabs, no Detail or Conversation switch, no #dlg', await p.evaluate(() => !document.querySelector('#czViewer [role="tablist"], #dlg, #dTabs, .stream')));
51
+ /* S1 tabs */
52
+ ok('S1 a done meeting has Notes, Replay and Transcript, Notes open', await tabs(p) === 'notes*,replay,tr', await tabs(p));
53
+ ok('S1 no Detail or Conversation switch, no #dlg', await p.evaluate(() => !document.querySelector('#dlg, #dTabs, .stream')));
53
54
  ok('S1 the note was read from GET /api/notes/one', A.S.gets.some((g) => g.startsWith('/api/notes/one?id=n1')));
54
55
 
55
56
  /* S2 the head */
56
- const head = await p.evaluate(() => ({ chip: document.querySelector('#czViewer .vz-chip').textContent, ppl: document.querySelector('#czViewer [data-a="ppl"]').textContent, pri: (document.querySelector('#czViewer .vz-pri') || {}).textContent || '', r2: document.querySelector('#czViewer .vz-r2').textContent, kind: document.querySelector('#czViewer .cz-vw-kind').textContent, open: (document.querySelector('#czViewer [data-cz-vw="open"]') || document.querySelector('#czViewer .cz-vw-hd button')).disabled }));
57
- ok('S2 row 1: Done, 3 people, Replay, ⋯', head.chip === 'Done' && /3 people/.test(head.ppl) && head.pri === 'Replay' && await p.evaluate(() => !!document.querySelector('#czViewer [data-a="more"]')), JSON.stringify(head));
58
- ok('S2 row 2: the time, About Viewer and the series 4 of 4', /to/.test(head.r2) && /About Viewer/.test(head.r2) && /Viewer sync · 4 of 4/.test(head.r2), head.r2);
57
+ const head = await p.evaluate(() => ({ state: !!document.querySelector('#czViewer .vzm-state'), sub: document.querySelector('#czViewer .vzm-sub').textContent, about: document.querySelector('#czViewer [data-a="m-about"]').textContent, ser: (document.querySelector('#czViewer .vzm-sn') || {}).textContent || '', kind: document.querySelector('#czViewer .cz-vw-kind').textContent }));
58
+ ok('S2 the head: the time and the people, About Viewer, the series 4 of 4, ⋯ and no state chip once done', /31 min/.test(head.sub) && /Ana, Dita, Wawan/.test(head.sub) && head.about === 'Viewer' && head.ser === '4 of 4' && !head.state && await p.evaluate(() => !!document.querySelector('#czViewer [data-a="more"]')), JSON.stringify(head));
59
59
  ok('S2 the header kind is Meeting notes', head.kind === 'Meeting notes', head.kind);
60
- await press(p, '[data-a="ppl"]');
61
- ok('S2 the people chip lists them', /Ana/.test(await body(p)) && /Dita/.test(await body(p)));
62
60
  await press(p, '[data-a="more"]');
63
- const menu = await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-menu b')].map((b) => b.textContent));
64
- ok('S2 ⋯ holds Focus, Change what it is about, Copy as Markdown, New meeting, Not part of this series, What Record and Focus do', ['Focus', 'about', 'Markdown', 'New meeting', 'series', 'Record'].every((w) => menu.some((m) => m.includes(w))), menu.join(' | '));
65
- ok('S2 each menu item has a sub-line', await p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-menu small')].every((s) => s.textContent.trim())));
61
+ const menu = await until(() => p.evaluate(() => { const b = [...document.querySelectorAll('#czViewer [role="menu"] [data-a]')]; return b.length ? b.map((x) => x.dataset.a) : null; }));
62
+ ok('S2 ⋯ holds Copy as Markdown, New meeting, What Record and Focus do', menu && menu.join() === 'm-copy,m-fresh,m-why', JSON.stringify(menu));
63
+ ok('S2 each menu item has a sub-line', await p.evaluate(() => [...document.querySelectorAll('#czViewer [role="menu"] [data-a]')].every((b) => b.innerText.split('\n').length >= 2)));
66
64
  await p.context().grantPermissions(['clipboard-read', 'clipboard-write']).catch(() => {});
67
65
  await press(p, '[data-a="m-copy"]');
68
66
  const clip = await until(() => p.evaluate(() => navigator.clipboard.readText().catch(() => '')));
@@ -70,29 +68,28 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
70
68
 
71
69
  /* S3 After */
72
70
  const after = await body(p);
73
- ok('S3 the replay track with its screen thumbnails', await p.evaluate(() => !!document.querySelector('#czViewer .vz-trk') && document.querySelectorAll('#czViewer .vz-shot').length === 3));
74
71
  ok('S3 the summary, Since the last one, decisions and next steps', /opens next to the chat/.test(after) && /Since the last one/.test(after) && /Raised again/.test(after) && /Diffs can be approved/.test(after) && /Add a print view/.test(after), after.slice(0, 400));
75
72
  ok('S3 Facts mentioned: Matches and Not checked', /Facts mentioned/.test(after) && /Matches/.test(after) && /Not checked/.test(after));
76
- await press(p, '[data-a="more"]'); // Full replay is the last item of the ⋯ menu (the mockup's replay well has no row for it)
77
- ok('S3 Full replay is in the menu, marked Waiting for design', await p.evaluate(() => { const b = document.querySelector('#czViewer .vz-menu [data-a="m-replay"]'); return !!b && b.dataset.czPlaceholder === 'Full Replay view' && b === [...document.querySelectorAll('#czViewer .vz-menu [data-a]')].pop(); }));
78
- await press(p, '[data-a="more"]');
79
- await press(p, '[data-a="tr"]');
80
- ok('S3 the transcript toggle shows the lines, Dita named', await until(async () => /The Viewer sits beside the chat now/.test(await body(p)) && /Dita/.test(await body(p))));
81
- await press(p, '[data-a="seekto"]');
82
- ok('S3 a thumbnail moves the replay to its time', await until(() => p.evaluate(() => /^03:10 of/.test((document.querySelector('#czViewer [data-clk="pos"]') || {}).textContent || ''))));
73
+ await press(p, '[data-a="tab"][data-k="replay"]');
74
+ ok('S3 the Replay tab has the screen thumbnails, with no Waiting for design marker', await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzp-th').length === 3 && !document.querySelector('#czViewer [data-cz-placeholder]'))));
75
+ await press(p, '.vzp-th[data-a="seekto"]');
76
+ ok('S3 a thumbnail moves the replay to its time', await until(() => p.evaluate(() => /^03:10/.test((document.querySelector('#czViewer [data-clk="pos"]') || {}).textContent || ''))), await p.evaluate(() => (document.querySelector('#czViewer [data-clk="pos"]') || {}).textContent));
77
+ await press(p, '[data-a="tab"][data-k="tr"]');
78
+ ok('S3 the Transcript tab shows the lines, Dita named', await until(async () => /The Viewer sits beside the chat now/.test(await body(p)) && /Dita/.test(await body(p))));
79
+ await press(p, '[data-a="tab"][data-k="notes"]');
83
80
 
84
81
  /* S4 Make task: a work-item becomes V.4 Drafted in PMOS */
85
- await press(p, '[data-a="task"][data-i="0"]');
86
- ok('S4 Make task offers A task or A work-item', await p.evaluate(() => !!document.querySelector('#czViewer [data-a="maketask"]') && !!document.querySelector('#czViewer [data-a="makewi"]')));
82
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-a="makewi"][data-i="0"]')));
83
+ ok('S4 each step offers Make task and an icon-only work-item press', await p.evaluate(() => !!document.querySelector('#czViewer [data-a="maketask"][data-i="0"]') && !document.querySelector('#czViewer [data-a="makewi"][data-i="0"]').textContent.trim()));
87
84
  await press(p, '[data-a="makewi"][data-i="0"]');
88
85
  ok('S4 a work-item posts the step to /api/viewer-meeting/work-item', await until(() => A.S.posts.some((x) => x.path === '/api/viewer-meeting/work-item' && x.body.note === 'n1' && x.body.step.text === 'Add a print view for documents')), JSON.stringify(A.S.posts));
89
86
  ok('S4 the step says Becomes V.4, and the message names the Commit gate', await until(async () => /Becomes V\.4/.test(await body(p)) && /Commit gate/.test(await body(p))), (await body(p)).slice(0, 300));
90
- await press(p, '[data-a="task"][data-i="1"]');
91
87
  await press(p, '[data-a="maketask"][data-i="1"]');
92
- ok('S4 A task writes one plan item for the step', await until(() => A.S.posts.some((x) => x.path === '/api/plan-items' && JSON.stringify(x.body).includes('Move saved views'))));
88
+ ok('S4 Make task writes one plan item for the step', await until(() => A.S.posts.some((x) => x.path === '/api/plan-items' && JSON.stringify(x.body).includes('Move saved views'))));
93
89
 
94
90
  /* S7 series membership */
95
- await press(p, '[data-a="more"]');
91
+ await press(p, '[data-a="sermenu"]');
92
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-a="m-serout"]')));
96
93
  await press(p, '[data-a="m-serout"]');
97
94
  ok('S7 Not part of this series posts key off', await until(() => A.S.posts.some((x) => x.path === '/api/notes/series-member' && x.body.key === 'off')));
98
95
 
@@ -106,26 +103,26 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
106
103
  const B = await F.open(browser, BASE, '/premium-viewer.html?open=meeting&event=ev-rail&date=' + F.dayKey(F.world().RAIL), { scene: 'prep' });
107
104
  const q = B.page;
108
105
  const prepUp = await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="prep"]')), 15000);
109
- ok('S5 a meeting to come opens on Prep', prepUp && await parts(q) === 'prep:true,live:false,notes:false', await parts(q));
106
+ ok('S5 a meeting to come opens on prep, with no tabs and Record in the head', prepUp && await tabs(q) === '' && await q.evaluate(() => !!document.querySelector('#czViewer .vzm-hc [data-a="record"]')), await tabs(q));
110
107
  const pre = await body(q);
111
108
  ok('S5 Prepared for you, What matters today, Agenda with minutes, Material', /Prepared for you/.test(pre) && /What matters today/.test(pre) && /Agenda/.test(pre) && /10 min/.test(pre) && /Rail PRD/.test(pre), pre.slice(0, 500));
112
- ok('S5 the chip says Starts in about 30 min', /Starts in (29|30|31) min/.test(await q.textContent('#czViewer .vz-chip')), await q.textContent('#czViewer .vz-chip'));
109
+ ok('S5 the state chip says Starts in about 30 min', /Starts in (29|30|31) min/.test(await q.textContent('#czViewer .vzm-state')), await q.textContent('#czViewer .vzm-state'));
113
110
  await q.$eval('#czViewer [data-a="min"][data-i="1"]', (b) => b.click());
114
111
  await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-a="minin"]')));
115
112
  await q.fill('#czViewer [data-a="minin"]', '15'); await q.press('#czViewer [data-a="minin"]', 'Enter');
116
113
  ok('S5 changing a topic\'s minutes posts them to /api/viewer-meeting/agenda', await until(() => B.S.posts.some((x) => x.path === '/api/viewer-meeting/agenda' && x.body.min === 15)), JSON.stringify(B.S.posts));
117
114
  await q.$eval('#czViewer [data-a="addmat"]', (b) => b.click());
118
- ok('S5 Add material opens its minimal sheet, marked Waiting for design', await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-cz-placeholder="Add material"]'))));
115
+ ok('S5 Add material opens its popover under the list, with no Waiting for design marker', await until(() => q.evaluate(() => !!document.querySelector('#czViewer .vzm-anc[data-pop="mat"] .vzm-pop [data-a="matq"]') && !document.querySelector('#czViewer [data-cz-placeholder]'))));
119
116
  await B.ctx.close();
120
117
 
121
118
  /* S6 During: a note that records */
122
119
  const C = await F.open(browser, BASE, '/premium-viewer.html?open=meeting&note=n2', { init: () => { window.__premiumHolding = { id: 'n2' }; } });
123
120
  const r = C.page;
124
121
  const liveUp = await until(() => r.evaluate(() => !!document.querySelector('#czViewer .vz-mtg[data-mk="live"]')), 15000);
125
- ok('S6 a recording note opens on the Transcript part', liveUp && await parts(r) === 'prep:false,live:true,notes:false', await parts(r));
122
+ ok('S6 a recording note opens on Live notes, with Focus and Transcript beside it', liveUp && await tabs(r) === 'notes*,focus,tr', await tabs(r));
126
123
  const lv = await body(r);
127
- ok('S6 the bar, the audio source line, Pause shots and Private', /Recording · /.test(lv) && /Listening to Zoom app/.test(lv) && /Pause shots/.test(lv) && /Private: keep only what I type/.test(lv), lv.slice(0, 400));
128
- ok('S6 Now on with the topic bars, Caught so far, Highlights', /Now on/.test(lv) && await r.evaluate(() => document.querySelectorAll('#czViewer .vz-stretch rect').length === 3) && /Caught so far: 1 decision, 2 next steps/.test(lv) && /Highlights/.test(lv) && /Issue is the blue button/.test(lv));
124
+ ok('S6 the recording line, the audio source line, Pause shots and Private', /Recording · /.test(lv) && /Listening to Zoom app/.test(lv) && /Pause shots/.test(lv) && /Private: keep only what I type/.test(lv), lv.slice(0, 400));
125
+ ok('S6 Now on with the topic bars, Caught so far, Highlights', /Now on/.test(lv) && await r.evaluate(() => document.querySelectorAll('#czViewer .vz-stretch rect').length === 3) && /Caught so far: 1 decision, 2 next steps/.test(lv) && /Highlights/.test(lv) && /Issue is the blue button/.test(lv), lv.slice(0, 600));
129
126
  await r.$eval('#czViewer [data-a="shots"]', (b) => b.click());
130
127
  ok('S6 Pause shots posts shots paused for the note', await until(() => C.S.posts.some((x) => x.path === '/api/viewer-meeting/capture' && x.body.id === 'n2' && x.body.shots === 'paused')));
131
128
  await r.$eval('#czViewer [data-a="src"]', (b) => b.click());
@@ -146,8 +143,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
146
143
  const E = await F.open(browser, BASE, '/premium-viewer.html?open=meeting&note=n1', { w: 390, h: 844 });
147
144
  await until(() => E.page.evaluate(() => !!document.querySelector('#czViewer .vz-mtg')), 15000);
148
145
  const fl = await E.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, full: (() => { const r = document.querySelector('#czViewer').getBoundingClientRect(); return r.left === 0 && Math.round(r.width) === innerWidth; })(),
149
- c3: [...document.querySelectorAll('script[src],link[href]')].some((x) => /c3-/.test(x.src || x.href)), tabs: !!document.querySelector('#czViewer [role="tablist"]') }));
150
- ok('S10 on a phone the card is the whole screen with no sideways scroll and no Detail/Conversation tabs', fl.over <= 0 && fl.full && !fl.tabs, JSON.stringify(fl));
146
+ c3: [...document.querySelectorAll('script[src],link[href]')].some((x) => /c3-/.test(x.src || x.href)), old: !!document.querySelector('#czViewer #dTabs, #czViewer .stream') }));
147
+ ok('S10 on a phone the card is the whole screen with no sideways scroll and no Detail/Conversation tabs', fl.over <= 0 && fl.full && !fl.old, JSON.stringify(fl));
151
148
  ok('S10 no c3 file is loaded', !fl.c3);
152
149
  ok('S10 no page error on the phone', E.errors.length === 0, E.errors.join(' | '));
153
150
  await E.ctx.close();
@@ -36,7 +36,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
36
36
  browser = await chromium.launch({ executablePath: exe });
37
37
  const tap = (p, sel) => p.$eval('#czViewer ' + sel, (b) => b.click());
38
38
  const text = (p) => p.evaluate(() => (document.querySelector('#czViewer') || {}).innerText || '');
39
- const groups = (p) => p.evaluate(() => [...document.querySelectorAll('#czViewer .vz-grp h3')].map((h) => h.firstChild.textContent.trim() + ':' + h.querySelector('small').textContent));
39
+ const groups = (p) => p.evaluate(() => [...document.querySelectorAll('#czViewer .vzc-grp > .vzm-lbl')].map((h) => h.firstChild.textContent.trim() + ':' + h.querySelector('small').textContent));
40
40
  const ids = (p) => p.evaluate(() => [...document.querySelectorAll('#czViewer [data-c="note"]')].map((b) => b.dataset.id));
41
41
  const ALL = [];
42
42
  const open = async (url, o = {}) => {
@@ -50,8 +50,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
50
50
  /* N1 open */
51
51
  const A = await open('/premium-viewer.html?open=notes');
52
52
  const p = A.page;
53
- ok('N1 ?open=notes opens the Viewer card on its Notes side', await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vz-grp').length > 0 && document.querySelector('#czViewer .vz-seg [data-c="tab"][data-k="notes"]').getAttribute('aria-selected') === 'true'), 15000), (await text(p)).slice(0, 300));
54
- ok('N1 the card has Calendar | Notes, New note and the search, and no tabs strip or conversation', await p.evaluate(() => !!document.querySelector('#czViewer [data-c="new"]') && !!document.querySelector('#czViewer [data-c="q"]') && !document.querySelector('#vTabs, #dlg, .stream')));
53
+ ok('N1 ?open=notes opens the Viewer card on its Notes side', await until(() => p.evaluate(() => document.querySelectorAll('#czViewer .vzc-grp').length > 0 && document.querySelector('#czViewer .vzc-tabs [data-c="tab"][data-k="notes"]').getAttribute('aria-selected') === 'true'), 15000), (await text(p)).slice(0, 300));
54
+ ok('N1 the card has the Calendar and Notes tabs, the search and the kind chips, and no tabs strip or conversation', await p.evaluate(() => !!document.querySelector('#czViewer [data-c="tab"][data-k="cal"]') && !!document.querySelector('#czViewer [data-c="q"]') && document.querySelectorAll('#czViewer [data-c="filter"]').length === 4 && !document.querySelector('#vTabs, #dlg, .stream')));
55
55
 
56
56
  /* N2 groups */
57
57
  const g = await groups(p);
@@ -60,8 +60,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
60
60
  ok('N2 a note that is not linked shows Link it and its length', /Link it/.test(r3) && /20 min/.test(r3), r3);
61
61
 
62
62
  /* N3 series */
63
- const ser = await p.evaluate(() => { const b = document.querySelector('#czViewer [data-series="viewer-sync"]'); return b ? b.textContent : ''; });
64
- ok('N3 the two notes of the series are one row: Series · 2 meetings, with its open steps', /Series · 2 meetings/.test(ser) && /2 steps open/.test(ser) && (await ids(p)).filter((x) => x === 'n0').length === 0, ser);
63
+ const ser = await p.evaluate(() => { const b = document.querySelector('#czViewer [data-c="ser"][data-k="viewer-sync"]'); return b ? b.textContent : ''; });
64
+ ok('N3 the two notes of the series are one folded card: 2 notes · series, with its open steps', /2 notes · series/.test(ser) && /2 steps open/.test(ser) && (await ids(p)).filter((x) => x === 'n0').length === 0, ser);
65
65
 
66
66
  /* N4 search */
67
67
  await p.fill('#czViewer [data-c="q"]', 'compare');
@@ -70,19 +70,21 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
70
70
  await p.fill('#czViewer [data-c="q"]', 'what was said');
71
71
  ok('N4 a note found by the server search in what was said is listed', await until(async () => (await ids(p)).length === 1) && (A.S.searches || []).includes('what was said'), JSON.stringify(A.S.searches));
72
72
  await p.fill('#czViewer [data-c="q"]', 'zzz');
73
- ok('N4 no match says so', await until(async () => /No note matches “zzz”/.test(await text(p))));
73
+ ok('N4 no match says so: 0 notes, no note row, the series kept folded as none match', await until(async () => /0 notes/.test(await text(p)) && /2 notes · none match/.test(await text(p)) && (await ids(p)).length === 0), (await text(p)).slice(0, 400));
74
74
  await p.fill('#czViewer [data-c="q"]', '');
75
75
  await until(async () => (await ids(p)).length === 3);
76
76
 
77
77
  /* N5 a note opens in the card */
78
78
  await tap(p, '[data-c="note"][data-id="n3"]');
79
79
  ok('N5 a note opens as the meeting card in place of the list', await until(() => p.evaluate(() => !!document.querySelector('#czViewer .vz-mtg') && /Compare meeting note apps/.test(document.querySelector('#czViewer .cz-vw-title').textContent))), (await text(p)).slice(0, 300));
80
- ok('N5 its head says Not linked, with Link it', await until(async () => /Not linked/.test(await text(p)) && !!(await p.$('#czViewer [data-a="m-about"]'))));
80
+ ok('N5 a note that is not linked offers What it is about', await until(async () => /What it is about/.test(await text(p)) && !!(await p.$('#czViewer [data-a="m-about"]'))), (await text(p)).slice(0, 400));
81
81
  await p.evaluate(() => window.czViews.openNotes({}));
82
- await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-series="viewer-sync"]')));
83
- await tap(p, '[data-series="viewer-sync"]');
84
- ok('N5 pressing a series opens its newest note, which says N of M', await until(async () => /Viewer sync · 4 of 4/.test(await text(p))) && A.S.gets.some((x) => /notes\/one\?id=n1/.test(x)), (await text(p)).slice(0, 300));
85
- await tap(p, '.vz-ser [data-a="note"]');
82
+ await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-c="ser"][data-k="viewer-sync"]')));
83
+ await tap(p, '[data-c="ser"][data-k="viewer-sync"]');
84
+ ok('N3 pressing the series card unfolds its notes, newest first', await until(async () => (await ids(p)).slice(0, 2).join() === 'n1,n0'), JSON.stringify(await ids(p)));
85
+ await tap(p, '[data-c="note"][data-id="n1"]');
86
+ ok('N5 a note of the series opens and says N of M', await until(async () => /4 of 4/.test(await text(p))) && A.S.gets.some((x) => /notes\/one\?id=n1/.test(x)), (await text(p)).slice(0, 300));
87
+ await tap(p, '.vzm-ser [data-a="note"]');
86
88
  ok('N5 paging reads the meeting before into the same card', await until(() => A.S.gets.some((x) => /notes\/one\?id=n0/.test(x))) && await p.evaluate(() => document.querySelectorAll('#czViewer .vz-mtg').length === 1));
87
89
 
88
90
  /* N6 Change what it is about */
@@ -91,14 +93,13 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
91
93
  await tap(p, '[data-c="note"][data-id="n3"]');
92
94
  await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-a="m-about"]')));
93
95
  await tap(p, '[data-a="m-about"]');
94
- const opts = await until(() => p.evaluate(() => { const s = document.querySelector('#czViewer [data-a="aboutsel"]'); return s ? [...s.options].map((o) => o.textContent) : null; }));
95
- ok('N6 What it is about lists Portfolio, the board and its initiatives, marked Waiting for design', opts && opts.join('|') === 'Choose|Portfolio|Board: Growth|Initiative: Viewer|Not linked' && !!(await p.$('#czViewer [data-cz-placeholder="About picker"]')), JSON.stringify(opts));
96
- await p.selectOption('#czViewer [data-a="aboutsel"]', 'i:w1/viewer');
97
- await tap(p, '[data-a="aboutgo"]');
96
+ const opts = await until(() => p.evaluate(() => { const s = [...document.querySelectorAll('#czViewer [data-a="aboutpick"]')]; return s.length ? s.map((o) => o.dataset.v) : null; }));
97
+ ok('N6 What it is about lists the initiatives, the product, the portfolio and Leave it out, with no Waiting for design marker', opts && opts.join('|') === 'i:w1/viewer|b:w1/b1|p|none' && !(await p.$('#czViewer [data-cz-placeholder]')), JSON.stringify(opts));
98
+ await tap(p, '[data-a="aboutpick"][data-v="i:w1/viewer"]');
98
99
  const links = () => A.S.posts.filter((x) => x.path === '/api/notes/link');
99
100
  await until(() => links().length === 1);
100
101
  ok('N6 Link it posts the console\'s link body for the note', JSON.stringify(links()[0] && links()[0].body) === JSON.stringify({ id: 'n3', board: { id: 'b1', ws: 'w1', title: 'Growth' }, initiative: { id: 'viewer', ws: 'w1', title: 'Viewer' } }), JSON.stringify(links()));
101
- ok('N6 the note is read again and its head names the initiative', await until(async () => /About\s+Growth › Viewer/.test(await text(p)) && !(await p.$('#czViewer [data-a="aboutsel"]'))), (await text(p)).slice(0, 300));
102
+ ok('N6 the note is read again and its head names the initiative', await until(async () => /Growth › Viewer/.test(await text(p)) && !(await p.$('#czViewer [data-a="aboutpick"]'))), (await text(p)).slice(0, 300));
102
103
 
103
104
  /* N7 writes */
104
105
  const posts = [...new Set(A.S.posts.map((x) => x.path))].sort();
@@ -123,9 +124,10 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
123
124
  const shotDir = process.env.PMOS_SHOTS || '';
124
125
  for (const th of ['light', 'dark']) {
125
126
  const P = await open('/premium-viewer.html?open=notes&theme=' + th, { w: 390, h: 844 });
126
- await until(() => P.page.evaluate(() => document.querySelectorAll('#czViewer .vz-grp').length > 0), 15000);
127
- const fl = () => P.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, small: [...document.querySelectorAll('#czViewer .vz-row, #czViewer .vz-seg button, #czViewer [data-c="new"]')].filter((b) => { if (!b.getClientRects().length) return false; const pb = getComputedStyle(b, '::before'), hit = pb.content !== 'none' && pb.position === 'absolute' ? parseFloat(pb.height) || 0 : 0; return Math.max(b.getBoundingClientRect().height, hit) < 44; }).length })); // a press may keep its drawn size (the Agreed mockup's segment and New note) and take a 44 px hit area from ::before
128
- const f0 = await fl();
127
+ await until(() => P.page.evaluate(() => document.querySelectorAll('#czViewer .vzc-grp').length > 0), 15000);
128
+ const fl = () => P.page.evaluate(() => ({ over: document.documentElement.scrollWidth - innerWidth, small: [...document.querySelectorAll('#czViewer .vzc-nr, #czViewer .vzc-tabs button, #czViewer [data-c="filter"]')].filter((b) => { if (!b.getClientRects().length) return false; const pb = getComputedStyle(b, '::before'), hit = pb.content !== 'none' && pb.position === 'absolute' ? parseFloat(pb.height) || 0 : 0; return Math.max(b.getBoundingClientRect().height, hit) < 44; }).length })); // a press may keep its drawn size (the Agreed mockup's segment and New note) and take a 44 px hit area from ::before
129
+ // the Meetings stylesheet loads after the list is drawn: measure once it applies, and fail if it never does
130
+ const f0 = await until(async () => { const v = await fl(); return v.small === 0 ? v : null; }, 8000) || await fl();
129
131
  if (shotDir) await P.page.screenshot({ path: path.join(shotDir, `list-390-${th}.png`) });
130
132
  await tap(P.page, '[data-c="note"][data-id="n3"]');
131
133
  await until(() => P.page.evaluate(() => !!document.querySelector('#czViewer .vz-mtg [data-a="m-about"]')));