create-pmos 0.424.0 → 0.426.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +25 -25
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/board-deliveries-test.js +153 -0
- package/workspace/board-programs-test.js +60 -36
- package/workspace/board-shot.js +4 -3
- package/workspace/briefing-premium-board-test.js +9 -6
- package/workspace/briefing-premium-insights-test.js +31 -15
- package/workspace/briefing-premium-products-test.js +46 -43
- package/workspace/calm-timeline-test.js +190 -0
- package/workspace/changelog.json +24 -0
- package/workspace/ev-everywhere-test.js +3 -1
- package/workspace/guide/briefing-premium.md +3 -2
- package/workspace/guide/claude-proposes.md +16 -1
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/index.md +1 -0
- package/workspace/guide/notes.md +39 -1
- package/workspace/guide/present-in-a-meeting.md +57 -0
- package/workspace/guide/programs.md +4 -3
- package/workspace/lib/board-premium.js +3 -1
- package/workspace/lib/briefing-premium-products.js +18 -4
- package/workspace/lib/chat-file-locate.js +40 -2
- package/workspace/lib/engine/boards.js +8 -2
- package/workspace/lib/idle-close.js +60 -0
- package/workspace/lib/loose-proposals.js +302 -0
- package/workspace/lib/meeting-focus.js +64 -14
- package/workspace/lib/my-work-premium.js +1 -1
- package/workspace/lib/proposal-runs.js +77 -2
- package/workspace/lib/propose-cli.js +42 -1
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-boards.js +16 -4
- package/workspace/lib/routes-brief-page.js +9 -1
- package/workspace/lib/routes-briefing-premium.js +19 -0
- package/workspace/lib/routes-loose.js +210 -0
- package/workspace/lib/routes-meeting-focus.js +28 -6
- package/workspace/lib/routes-pm-items.js +27 -17
- package/workspace/lib/settings-store.js +2 -1
- package/workspace/lib/task-cli.js +18 -11
- package/workspace/milestone-pins-test.js +170 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +2 -1
- package/workspace/premium-briefing-depth-test.js +2 -2
- package/workspace/premium-chat-term-test.js +13 -2
- package/workspace/premium-core-doc-issue-test.js +1 -1
- package/workspace/premium-rec-now-test.js +153 -0
- package/workspace/premium-rec-tab-test.js +167 -0
- package/workspace/product-lane-test.js +30 -17
- package/workspace/public/pm/bd-acts.js +6 -3
- package/workspace/public/pm/bd-deliveries.js +218 -0
- package/workspace/public/pm/bd-pin-card.css +16 -0
- package/workspace/public/pm/bd-pin-card.js +80 -0
- package/workspace/public/pm/bd-pins.js +33 -0
- package/workspace/public/pm/bd-pop.js +2 -0
- package/workspace/public/pm/bd-prog.js +5 -4
- package/workspace/public/pm/bd-span.js +140 -102
- package/workspace/public/pm/cozy-aud.css +9 -0
- package/workspace/public/pm/cozy-aud.js +80 -0
- package/workspace/public/pm/cozy-board.css +73 -11
- package/workspace/public/pm/cozy-home.css +16 -1
- package/workspace/public/pm/cozy-live-pill.js +3 -0
- package/workspace/public/pm/cozy-pick.css +41 -0
- package/workspace/public/pm/cozy-pick.js +134 -0
- package/workspace/public/pm/cozy-rec-bridge.js +32 -0
- package/workspace/public/pm/cozy-rec-now.css +104 -0
- package/workspace/public/pm/cozy-rec-now.js +330 -0
- package/workspace/public/pm/cozy-rec-present.css +69 -0
- package/workspace/public/pm/cozy-rec-present.js +467 -0
- package/workspace/public/pm/cozy-rec-tab.css +90 -0
- package/workspace/public/pm/cozy-rec-tab.js +219 -0
- package/workspace/public/pm/cozy-settings.js +8 -2
- package/workspace/public/pm/cozy-today.css +4 -0
- package/workspace/public/pm/home-app.js +51 -22
- package/workspace/public/pm/home-data.js +5 -3
- package/workspace/public/pm/home-list.js +63 -15
- package/workspace/public/pm/home-more.js +2 -31
- package/workspace/public/pm/home-today.js +19 -9
- package/workspace/public/pm/ini-tasks.js +4 -1
- package/workspace/public/pm/live-model.js +1 -1
- package/workspace/public/pm/loose-props.css +54 -0
- package/workspace/public/pm/loose-props.js +262 -0
- package/workspace/public/pm/premium-board.js +65 -30
- package/workspace/public/pm/premium-insights.js +42 -24
- package/workspace/public/pm/premium-meeting.js +17 -4
- package/workspace/public/pm/premium-mtg-present.js +4 -3
- package/workspace/public/pm/premium-report-read.js +2 -0
- package/workspace/public/pm/premium-vw-mtg.js +15 -7
- package/workspace/public/pm/rec-state.js +13 -5
- package/workspace/public/pm/rec-tab-core.js +92 -0
- package/workspace/public/pm/term-view.js +81 -10
- package/workspace/public/pm/view-notes.js +9 -0
- package/workspace/public/premium-aud.html +22 -0
- package/workspace/public/premium-board.html +2 -0
- package/workspace/public/premium-insights.html +2 -1
- package/workspace/public/premium-rec.html +30 -0
- package/workspace/public/premium.html +1 -0
- package/workspace/rec-present-test.js +229 -0
- package/workspace/server.js +116 -7
- package/workspace/skills/loose-propose.skill +39 -0
- package/workspace/task-milestones-test.js +15 -6
- package/workspace/test-lists/board-deliveries.json +13 -0
- package/workspace/test-lists/calm-timeline.json +5 -0
- package/workspace/test-lists/loose-props.json +9 -0
- package/workspace/test-lists/milestone-pins.json +6 -0
- package/workspace/test-lists/rec-now.json +6 -0
- package/workspace/test-lists/rec-present.json +13 -0
- package/workspace/test-lists/recording-tab.json +13 -0
- package/workspace/timeline-holds-test.js +44 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.426.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -32,6 +32,30 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.426.0",
|
|
37
|
+
"at": "2026-10-27T04:01:13.323Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1068,
|
|
42
|
+
"t": "Thirteenth testing feedback batch",
|
|
43
|
+
"s": "Thirteenth testing feedback batch"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"v": "0.425.0",
|
|
49
|
+
"at": "2026-10-27T01:04:19.475Z",
|
|
50
|
+
"f": 2,
|
|
51
|
+
"prs": [
|
|
52
|
+
{
|
|
53
|
+
"n": 1066,
|
|
54
|
+
"t": "Recording tab and one product picker (batch 12, items 1 and 5)",
|
|
55
|
+
"s": "Recording tab and one product picker (batch 12, items 1 and 5)"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
35
59
|
{
|
|
36
60
|
"v": "0.424.0",
|
|
37
61
|
"at": "2026-10-27T00:38:50.632Z",
|
|
@@ -247,30 +271,6 @@
|
|
|
247
271
|
"s": "The list stays put; an initiative, program or product opens as a page in the Viewer"
|
|
248
272
|
}
|
|
249
273
|
]
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"v": "0.406.0",
|
|
253
|
-
"at": "2026-10-24T10:26:17.544Z",
|
|
254
|
-
"f": 2,
|
|
255
|
-
"prs": [
|
|
256
|
-
{
|
|
257
|
-
"n": 1036,
|
|
258
|
-
"t": "Tap the title to rename a program, an initiative or a task",
|
|
259
|
-
"s": "Tap the title to rename a program, an initiative or a task"
|
|
260
|
-
}
|
|
261
|
-
]
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"v": "0.405.0",
|
|
265
|
-
"at": "2026-10-24T09:32:24.061Z",
|
|
266
|
-
"f": 2,
|
|
267
|
-
"prs": [
|
|
268
|
-
{
|
|
269
|
-
"n": 1035,
|
|
270
|
-
"t": "Home session list, program chat, and new initiative sessions",
|
|
271
|
-
"s": "Home session list, program chat, and new initiative sessions"
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
274
|
}
|
|
275
275
|
]
|
|
276
276
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-27T04:01:09Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-27T04:01:09Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-10-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-27T04:01:09Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* board-deliveries-test.js — the Deliveries lane on the Board timeline in the browser (feedback batch 13 item 4, calmer timeline A6: XcalmA6Lane,
|
|
4
|
+
* XcalmA6Fold, XcalmA6Phone). Serves the real page from the real server; GET /api/board-premium answers a board lib/board-premium.js builds
|
|
5
|
+
* from rows and ◇ tasks. The page's clock is the fixture's (17 Oct 2026). The lane's rules are checked in board-deliveries.test.js.
|
|
6
|
+
* L the lane is one row right under the axis, a list per column (quarters on Year), the current column washed; missed on top, a past column
|
|
7
|
+
* says "✓ N delivered"
|
|
8
|
+
* H hover an entry: its row gets a faint wash and its ◇ a ring · P press opens the initiative · M "+N more" lists the column
|
|
9
|
+
* F the fold: one line, remembered after a reload · N Filter None: no lane · Q the phone: the next 3 in a card, All opens the sheet
|
|
10
|
+
* SHOTS_DL=<dir>: the lane at 1440 (open, hover, folded) and 390, into <dir>. */
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const { spawn } = require('child_process');
|
|
13
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
14
|
+
const T = require('./test-run').configure({ name: 'board-deliveries' });
|
|
15
|
+
const BP = require('./lib/board-premium.js');
|
|
16
|
+
const F = require('./fixtures/board-premium-facts.js');
|
|
17
|
+
|
|
18
|
+
const BASE = T.BASE;
|
|
19
|
+
const results = [];
|
|
20
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
|
|
21
|
+
let srv = null; let browser = null;
|
|
22
|
+
const finish = async (code) => {
|
|
23
|
+
if (browser) await browser.close().catch(() => {});
|
|
24
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
25
|
+
T.killTmux();
|
|
26
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
27
|
+
console.log(`\n${results.length - bad}/${results.length} board-deliveries assertions passed`);
|
|
28
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
29
|
+
};
|
|
30
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
31
|
+
|
|
32
|
+
const ROWS = [
|
|
33
|
+
F.row('magw', 'MAGW migration to auth-service', { owner: 'Wawan', start: '2026-08-01', end: '2026-11-02', progress: 60, status: 'at risk' }),
|
|
34
|
+
F.row('lbx', 'Lightbox UI Adjustments', { start: '2026-07-15', end: '2026-10-17', progress: 80 }),
|
|
35
|
+
F.row('inline', 'Inline login for eShop onsite', { start: '2026-05-01', end: '2026-11-10', progress: 70 }),
|
|
36
|
+
F.row('psle', 'PSLE Landing Page', { start: '2026-08-01', end: '2027-01-05', progress: 30 }),
|
|
37
|
+
F.row('otp', 'Email OTP (passwordless login)', { start: '2026-09-01', end: '2027-06-10', progress: 10 }),
|
|
38
|
+
];
|
|
39
|
+
const it = (ini, uid, title, o) => ({ uid, key: '', kind: 'Task', src: 'pmos', title, status: 'To do', owner: 'Wawan', ini, start: null, end: null, ref: uid, board: 'w1', milestone: true, ...o });
|
|
40
|
+
const ITEMS = [
|
|
41
|
+
it('magw', 'ms-dry', 'MAGW dry run', { end: '2026-10-14', pinned: true }),
|
|
42
|
+
it('magw', 'ms-on', 'MAGW on auth-service', { end: '2026-11-02' }),
|
|
43
|
+
it('inline', 'ms-old', 'Inline beta', { status: 'Done', end: '2026-08-20', pinned: true }),
|
|
44
|
+
it('inline', 'ms-live', 'Inline login live', { end: '2026-11-10' }),
|
|
45
|
+
it('otp', 'ms-otp', 'Email OTP live', { end: '2027-06-10' }),
|
|
46
|
+
];
|
|
47
|
+
const model = () => {
|
|
48
|
+
const m = BP.build(F.facts({ rows: ROWS.map((r) => ({ ...r })), total: ROWS.length, columns: [], items: ITEMS.map((x) => ({ ...x })) }));
|
|
49
|
+
// the pin is slice B's flag on a milestone task (pm/bd-pins.js reads m.pinned); set it on the model here
|
|
50
|
+
for (const r of m.rows || []) for (const ms of r.milestones || []) { const x = ITEMS.find((i) => i.uid === ms.id); if (x && typeof x.pinned === 'boolean') ms.pinned = x.pinned; }
|
|
51
|
+
return m;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
(async () => {
|
|
55
|
+
const exe = findBrowser();
|
|
56
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
57
|
+
let chromium;
|
|
58
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
59
|
+
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
60
|
+
await T.waitForServer(BASE);
|
|
61
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
62
|
+
|
|
63
|
+
/** The Board on the timeline. o: { w, h, span, phone, store, dark } */
|
|
64
|
+
const open = async (o = {}) => {
|
|
65
|
+
const ctx = await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 900 }, hasTouch: !!o.phone, isMobile: !!o.phone, colorScheme: o.dark ? 'dark' : 'light' });
|
|
66
|
+
const page = await ctx.newPage();
|
|
67
|
+
const errors = [];
|
|
68
|
+
page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
|
|
69
|
+
await page.clock.setFixedTime(new Date(F.NOW));
|
|
70
|
+
const M = model();
|
|
71
|
+
await page.route('**/api/board-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: M, as_of: Date.now() }) }));
|
|
72
|
+
await page.route('**/api/programs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, programs: [] }) }));
|
|
73
|
+
await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'not in this check' }) }));
|
|
74
|
+
await page.addInitScript(([s]) => { try { if (!sessionStorage.getItem('set')) { sessionStorage.setItem('set', '1'); for (const [k, v] of Object.entries(s)) localStorage.setItem(k, v); } } catch { /* none */ } },
|
|
75
|
+
[{ 'pmos.board.view': 'time', 'pmos.board.pview': 'time', 'pmos.board.span': o.span || 'year', ...(o.store || {}) }]);
|
|
76
|
+
await page.goto(BASE + '/premium-board.html?ws=w1&board=w1');
|
|
77
|
+
await page.waitForSelector('#ibBody [data-row]', { timeout: 15000 });
|
|
78
|
+
await page.waitForTimeout(400);
|
|
79
|
+
return { ctx, page, errors };
|
|
80
|
+
};
|
|
81
|
+
const shots = process.env.SHOTS_DL;
|
|
82
|
+
const shot = async (p, name) => { if (shots) await p.screenshot({ path: path.join(shots, name + '.png'), fullPage: true }); };
|
|
83
|
+
const lane = (p) => p.evaluate(() => {
|
|
84
|
+
const l = document.querySelector('#ibBody .tg-dl'); if (!l) return null;
|
|
85
|
+
const cols = [...l.querySelectorAll('.dl-c')];
|
|
86
|
+
return {
|
|
87
|
+
afterHead: !!(l.previousElementSibling && l.previousElementSibling.classList.contains('tg-h')),
|
|
88
|
+
name: (l.querySelector('.dl-t') || {}).textContent || '', cols: cols.length, now: cols.findIndex((c) => c.classList.contains('now')),
|
|
89
|
+
lists: cols.map((c) => [...c.querySelectorAll('.dl-e, .dl-dn, .dl-more')].map((e) => (e.querySelector('small') ? e.querySelector('small').textContent + ' ' + e.querySelector('b').textContent : e.textContent) + (e.classList.contains('late') ? ' [late]' : e.classList.contains('risk') ? ' [risk]' : ''))),
|
|
90
|
+
fold: (l.querySelector('.dl-fold') || {}).textContent || '',
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/* L H P M — desktop, Year */
|
|
95
|
+
{
|
|
96
|
+
const { ctx, page: p, errors } = await open();
|
|
97
|
+
const a = await lane(p);
|
|
98
|
+
ok('L one row "Deliveries · What lands when" right under the axis', a && a.afterHead && a.name === 'DeliveriesWhat lands when', JSON.stringify(a));
|
|
99
|
+
ok('L a list per quarter on Year, the current quarter washed', a && a.cols >= 4 && a.now >= 0, JSON.stringify(a && { cols: a.cols, now: a.now }));
|
|
100
|
+
const cur = a ? a.lists[a.now].join(' | ') : '';
|
|
101
|
+
ok('L the current quarter: missed on top in orange, then by date; "Today" for today; the at-risk end amber', /^Oct 14 MAGW dry run \[late\] \| Today Deliver \| Nov 2 MAGW on auth-service \[risk\] \| Nov 10 Inline login live/.test(cur), cur);
|
|
102
|
+
const prev = a ? a.lists[a.now - 1].join(' | ') : '';
|
|
103
|
+
ok('L done folds away: the past quarter says "1 delivered" after a drawn tick', prev.trim() === '1 delivered', prev);
|
|
104
|
+
await shot(p, 'deliveries-1440');
|
|
105
|
+
await p.hover('#ibBody .tg-dl [data-dl-ms="ms-on"]');
|
|
106
|
+
const hv = await p.evaluate(() => { const r = document.querySelector('#ibBody .tg-r[data-row="board:magw"]'); return { hl: r.classList.contains('dl-hl'), ring: [...r.querySelectorAll('.dl-ring')].map((x) => x.className), others: document.querySelectorAll('#ibBody .dl-hl').length }; });
|
|
107
|
+
ok('H hover an entry: its row gets a faint wash and its ◇ a ring, nothing else', hv.hl && hv.ring.length === 1 && /tg-end|tg-tm/.test(hv.ring[0]) && hv.others === 1, JSON.stringify(hv));
|
|
108
|
+
await shot(p, 'deliveries-hover-1440');
|
|
109
|
+
await p.mouse.move(5, 5);
|
|
110
|
+
ok('H the wash goes when the pointer leaves', await p.evaluate(() => !document.querySelector('#ibBody .dl-hl, #ibBody .dl-ring')));
|
|
111
|
+
await p.click('#ibBody .tg-dl [data-dl-ms="ms-on"]');
|
|
112
|
+
await p.waitForTimeout(400);
|
|
113
|
+
ok('P press opens the initiative, as pressing the row name does', await p.evaluate(() => !!document.querySelector('#ibBody [data-row="board:magw"].sel')));
|
|
114
|
+
ok('the Board threw nothing', !errors.length, errors.join('\n'));
|
|
115
|
+
await ctx.close();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* F — the fold, remembered */
|
|
119
|
+
{
|
|
120
|
+
const { ctx, page: p } = await open();
|
|
121
|
+
await p.click('#ibBody [data-dl-fold]');
|
|
122
|
+
const a = await lane(p);
|
|
123
|
+
ok('F folded: one line "Next · Today Deliver · 2 more this year · 1 missed"', a && a.cols === 0 && /^Next\s*Today Deliver\s*· 2 more this year · 1 missed$/.test(a.fold.trim()), JSON.stringify(a && a.fold));
|
|
124
|
+
ok('F the fold button says it opens the lane', await p.evaluate(() => document.querySelector('#ibBody [data-dl-fold]').getAttribute('aria-expanded') === 'false'));
|
|
125
|
+
await shot(p, 'deliveries-folded-1440');
|
|
126
|
+
await p.reload(); await p.waitForSelector('#ibBody [data-row]'); await p.waitForTimeout(300);
|
|
127
|
+
const b = await lane(p);
|
|
128
|
+
ok('F the fold is remembered after a reload', b && b.cols === 0 && !!b.fold, JSON.stringify(b));
|
|
129
|
+
await ctx.close();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* N — Filter None */
|
|
133
|
+
{
|
|
134
|
+
const { ctx, page: p } = await open({ store: { 'pmos.board.msMode': 'none' } });
|
|
135
|
+
ok('N Filter None: no lane at all', await p.evaluate(() => !document.querySelector('#ibBody .tg-dl, #ibBody .dl-ph')));
|
|
136
|
+
await ctx.close();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Q — the phone */
|
|
140
|
+
{
|
|
141
|
+
const { ctx, page: p, errors } = await open({ w: 390, h: 844, phone: true });
|
|
142
|
+
const c = await p.evaluate(() => { const s = document.querySelector('#ibBody .dl-ph'); return s ? { head: s.querySelector('.dl-phh').textContent, lines: [...s.querySelectorAll('.dl-pl')].map((x) => x.textContent), first: !!(s.nextElementSibling && s.nextElementSibling.classList.contains('tg')) } : null; });
|
|
143
|
+
ok('Q "Next deliveries · 1 missed" above the rows, with All', c && c.first && c.head === 'Next deliveries· 1 missedAll', JSON.stringify(c));
|
|
144
|
+
ok('Q the next 3, missed first', c && c.lines.join('|') === 'Oct 14MAGW dry run|TodayDeliver|Nov 2MAGW on auth-service', JSON.stringify(c && c.lines));
|
|
145
|
+
await shot(p, 'deliveries-phone-390');
|
|
146
|
+
await p.click('#ibBody .dl-all'); await p.waitForTimeout(200);
|
|
147
|
+
const sh = await p.evaluate(() => { const m = document.querySelector('.tg-msp.sh'); return m ? { h: (m.querySelector('.h') || {}).textContent, n: m.querySelectorAll('[data-ms-ini]').length } : null; });
|
|
148
|
+
ok('Q All opens the sheet with every delivery not done', sh && sh.h === 'Deliveries' && sh.n === 6, JSON.stringify(sh));
|
|
149
|
+
ok('the phone threw nothing', !errors.length, errors.join('\n'));
|
|
150
|
+
await ctx.close();
|
|
151
|
+
}
|
|
152
|
+
finish();
|
|
153
|
+
})();
|
|
@@ -53,15 +53,24 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
53
53
|
const boards = [...F.programFacts('idpf').boards, R3];
|
|
54
54
|
return ws === 'replay' ? F.programFacts('microsites', { boards, board: { ...F.programFacts('microsites').board, ...R3, product: 'Replay' } }) : F.programFacts(ws, { boards });
|
|
55
55
|
};
|
|
56
|
-
|
|
56
|
+
// the one product pick (batch 12 item 5): GET and POST /api/briefing-premium/products, kept here as the server keeps the setting
|
|
57
|
+
const reg = [{ ws: 'idpf', name: 'IDPF', primary: true }, { ws: 'microsites', name: 'Microsites' }].concat(o.third ? [{ ws: 'replay', name: 'Replay' }] : []);
|
|
58
|
+
const pk = { on: o.pick || reg.map((x) => x.ws), posts: [], reads: [] };
|
|
59
|
+
const pickBody = () => JSON.stringify({ ok: true, all: pk.on.length === reg.length, chosen: true, products: reg.map((x) => ({ ...x, home: false, initials: null, on: pk.on.includes(x.ws) })) });
|
|
60
|
+
await page.route('**/api/board-premium*', (r) => { const q = new URL(r.request().url()).searchParams; pk.reads.push(q.get('ws') || ''); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: BP.build(facts(q.get('ws') || 'idpf')), as_of: Date.now() }) }); });
|
|
61
|
+
await page.route('**/api/briefing-premium/products', (r) => {
|
|
62
|
+
if (r.request().method() === 'POST') { const b = JSON.parse(r.request().postData() || '{}'); pk.posts.push(b.on); pk.on = b.on; }
|
|
63
|
+
r.fulfill({ contentType: 'application/json', body: pickBody() });
|
|
64
|
+
});
|
|
57
65
|
await page.route('**/api/programs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, programs: o.programs || F.programs() }) }));
|
|
58
66
|
await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'not in this check' }) }));
|
|
59
67
|
await page.addInitScript(([s]) => { try { if (!sessionStorage.getItem('set')) { sessionStorage.setItem('set', '1'); for (const [k, v] of Object.entries(s)) localStorage.setItem(k, v); } } catch { /* none */ } }, [{ 'pmos.board.view': o.view || 'track', 'pmos.board.pview': o.view === 'time' ? 'track' : o.view || 'track', 'pmos.board.grouping': o.grouping || 'program', ...(o.store || {}) }]);
|
|
60
68
|
await page.addInitScript(() => { window.__prog = []; document.addEventListener('bd:program', (e) => window.__prog.push(e.detail && e.detail.id)); });
|
|
61
|
-
|
|
69
|
+
// o.plain: the Board as the place menu opens it (no ws), showing the saved pick; else a one-off link to one product's board
|
|
70
|
+
await page.goto(BASE + '/premium-board.html' + (o.plain ? (o.qs || '').replace(/^&/, '?') : '?ws=' + (o.ws || 'idpf') + '&board=' + (o.ws || 'idpf') + (o.qs || '')));
|
|
62
71
|
await page.waitForSelector('#ibBody [data-key]', { timeout: 15000 });
|
|
63
72
|
await page.waitForTimeout(700); // the programs and the other product's rows land after the board
|
|
64
|
-
return { ctx, page, errors };
|
|
73
|
+
return { ctx, page, errors, pk };
|
|
65
74
|
};
|
|
66
75
|
const events = (p) => p.evaluate(() => window.__prog.slice());
|
|
67
76
|
|
|
@@ -159,12 +168,22 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
159
168
|
clu: [...document.querySelectorAll('#ibBody .tg-pg .tg-clu')].map((c) => c.textContent + '|' + c.getAttribute('aria-label')),
|
|
160
169
|
lab: [...document.querySelectorAll('#ibBody .tg-pg .tg-pdl')].map((l) => l.textContent),
|
|
161
170
|
kids: [...document.querySelectorAll('#ibBody .tg-kid .tg-n b')].map((b) => b.textContent),
|
|
162
|
-
oneLine: [...document.querySelectorAll('#ibBody .tg-n.ini2')].every((b) => !b.querySelector('small')
|
|
171
|
+
oneLine: [...document.querySelectorAll('#ibBody .tg-n.ini2')].every((b) => !b.querySelector('small')),
|
|
172
|
+
kidDots: document.querySelectorAll('#ibBody .tg-kid .tg-n .cz-dot').length,
|
|
163
173
|
lgd: (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '',
|
|
164
174
|
}));
|
|
165
|
-
ok('T the program row comes first
|
|
166
|
-
|
|
167
|
-
|
|
175
|
+
ok('T the program row comes first with its title; open, its track draws nothing: no span, no diamond, no label (batch 13 item 4)', /tg-pg/.test(t.first) && /Project Ascent/.test(t.title) && !/2 products|Running/.test(t.title) && !t.span && !t.clu.length && !t.lab.length, JSON.stringify(t));
|
|
176
|
+
const fold = await p.evaluate(async () => {
|
|
177
|
+
const S = await import('/pm/bd-span.js'), now = new Date(2026, 9, 17);
|
|
178
|
+
const a = { key: 'board:a', id: 'a', title: 'One', start: '2026-10-01', end: '2026-11-20', status: 'late', late: true, track: { key: 'build' } };
|
|
179
|
+
const b = { key: 'board:b', id: 'b', title: 'Two', start: '2026-10-05', end: '2027-01-10', track: { key: 'build' } };
|
|
180
|
+
const groups = [{ kind: 'program', key: 'p', program: { id: 'p', title: 'IDPF Feature Expansion', products: [] }, products: [{ name: 'IDPF', rows: [a, b] }], rows: [a, b] }];
|
|
181
|
+
const d = document.createElement('div'); d.innerHTML = S.timelineHtml([a, b], { jira: null }, 'year', { now, groups, trackPx: 1100, folded: () => true }).html;
|
|
182
|
+
const pg = d.querySelector('.tg-pg');
|
|
183
|
+
return { span: pg.querySelectorAll('.tg-span').length, dm: pg.querySelectorAll('.tg-tm, .tg-tmc').length, end: (pg.querySelector('.tg-endl') || {}).textContent || '', dots: [...pg.querySelectorAll('.tg-offd .cz-dot')].map((x) => x.className), rows: d.querySelectorAll('[data-row]').length };
|
|
184
|
+
});
|
|
185
|
+
ok('T folded, the program shows the roll-up: its line, its initiatives\' ◇s, the last end and one dot per initiative off track', fold.span === 1 && fold.dm === 2 && fold.end === 'Jan ’27' && fold.dots.length === 1 && /late/.test(fold.dots[0]) && fold.rows === 0, JSON.stringify(fold));
|
|
186
|
+
ok('T the program\'s initiatives sit under it as one-line rows: the name, and a dot only off track', t.kids.join() === 'Descope feature parity,Legacy IdP sunset' && t.oneLine && t.kidDots === 0, JSON.stringify(t));
|
|
168
187
|
// batch 11 item 12: By product, a program's initiatives sit under their product on the timeline (the row copies were dropped)
|
|
169
188
|
const bpt = await p.evaluate(async () => {
|
|
170
189
|
const S = await import('/pm/bd-span.js'), now = new Date(2026, 9, 26);
|
|
@@ -215,12 +234,11 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
215
234
|
return true;
|
|
216
235
|
});
|
|
217
236
|
ok('T By product: a program\'s undated initiative keeps its "No dates" row under its product, desktop and phone; one in no program is in the foot only (batch 11 item 19)', bnd === true, JSON.stringify(bnd));
|
|
218
|
-
ok('T a legend in the chip row names done, planned,
|
|
237
|
+
ok('T a legend in the chip row names done, planned, Milestone (Deliver, Evaluate and milestone tasks, batch 11 item 3) and today; no program milestone key while a program draws none (batch 13 item 4)', /Done in Jira/.test(t.lgd) && /To do/.test(t.lgd) && !/Program milestone/.test(t.lgd) && /Milestone/.test(t.lgd) && /Today/.test(t.lgd), t.lgd);
|
|
219
238
|
await p.click('#ibBody .tg-pg .tg-pgo');
|
|
220
239
|
// the program opens in the floating Viewer (shell A), which sits over the right of the timeline; close it before the next press
|
|
221
240
|
await p.keyboard.press('Escape'); await p.waitForFunction(() => { const v = document.querySelector('#czViewer'); return !v || v.hidden; });
|
|
222
|
-
await p.
|
|
223
|
-
ok('O the program row and its counted diamond dispatch bd:program and nothing else', (await events(p)).join() === 'project-ascent,project-ascent' && await p.evaluate(() => !/Initiative/.test(((window.czViewer && window.czViewer.current()) || {}).kind || '')));
|
|
241
|
+
ok('O the program row dispatches bd:program and nothing else', (await events(p)).join() === 'project-ascent' && await p.evaluate(() => !/Initiative/.test(((window.czViewer && window.czViewer.current()) || {}).kind || '')));
|
|
224
242
|
ok('the timeline threw nothing', !errors.length, errors.join('\n'));
|
|
225
243
|
await ctx.close();
|
|
226
244
|
}
|
|
@@ -236,9 +254,9 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
236
254
|
tabs: [...el.querySelectorAll('.tg-edge')].filter(vis).map((b) => b.dataset.edge + ':' + b.textContent.trim()), out: el.querySelectorAll('.tg-out').length, first: (el.querySelector('.tg-h .tg-p > span.pin') || {}).textContent || '', label: sc.getAttribute('aria-label') }; });
|
|
237
255
|
const DAY = 86400000;
|
|
238
256
|
let g = await geo();
|
|
239
|
-
ok('S Quarter opens with today a quarter of the way in, wider than the screen,
|
|
257
|
+
ok('S Quarter opens with today a quarter of the way in, wider than the screen, no hatched ends (batch 13 item 4), Today on its line', g.tw > g.vw * 1.5 && Math.abs(g.at - 0.25) < 0.03 && g.pill && !g.back.length && g.out === 0, JSON.stringify(g));
|
|
240
258
|
ok('S the first column on screen carries the year, and the scroller names its range', /2026/.test(g.first) && /^Timeline, Oct 2026 to (Nov|Dec) 2026/.test(g.label), JSON.stringify(g));
|
|
241
|
-
ok('S
|
|
259
|
+
ok('S an open program leaves no milestone tab at the edge: it draws no milestone while open (batch 13 item 4)', !g.tabs.some((x) => /^m:/.test(x)), JSON.stringify(g.tabs));
|
|
242
260
|
await p.focus('#ibBody .tg-sc'); const l0 = g.l; await p.keyboard.press('ArrowRight'); await p.waitForTimeout(700);
|
|
243
261
|
g = await geo();
|
|
244
262
|
ok('S → moves half a screen', Math.abs(g.l - l0 - g.vw / 2) < 6, JSON.stringify({ l0, l: g.l, vw: g.vw }));
|
|
@@ -260,7 +278,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
260
278
|
g = await geo();
|
|
261
279
|
ok('S with today in view, a span switch keeps today in its place', g.span === 'y2' && (g.l === 0 || Math.abs(g.at - 0.25) < 0.03), JSON.stringify(g));
|
|
262
280
|
const lab2 = await p.evaluate(() => [...document.querySelectorAll('#ibBody .tg-endl, #ibBody .tg-pdl')].map((e) => e.textContent));
|
|
263
|
-
ok('S 2 yr
|
|
281
|
+
ok('S 2 yr labels say what lands, then when, with the year only when it is not this year (batch 13 item 4)', lab2.length > 0 && lab2.every((x) => /^[A-Z].* [A-Z][a-z]{2} \d{1,2}( ’\d\d)?$/.test(x)) && lab2.some((x) => / ’27$/.test(x)), JSON.stringify(lab2));
|
|
264
282
|
await p.click('#bdSpans [data-sp="sprint"]'); await p.waitForTimeout(200);
|
|
265
283
|
await p.evaluate(() => { const sc = document.querySelector('#ibBody .tg-sc'); if (sc) sc.scrollLeft = 0; });
|
|
266
284
|
await p.click('#bdSpans [data-sp="quarter"]'); await p.waitForTimeout(250);
|
|
@@ -307,19 +325,20 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
307
325
|
await ctx.close();
|
|
308
326
|
}
|
|
309
327
|
|
|
310
|
-
/* A All products (PgBoard, PgKanban, PgList): every product's board on one page; the program holds a sub-row per product
|
|
328
|
+
/* A All products (PgBoard, PgKanban, PgList): every product's board on one page; the program holds a sub-row per product.
|
|
329
|
+
* The chip is the one product picker Home and Insights share (batch 12 item 5): its pick is saved, never kept in the address. */
|
|
311
330
|
{
|
|
312
|
-
const { ctx, page: p, errors } = await open({
|
|
313
|
-
await p.click('#
|
|
314
|
-
const items = await p.evaluate(() => [...document.querySelectorAll('#
|
|
331
|
+
const { ctx, page: p, errors, pk } = await open({ plain: true, pick: ['idpf'] });
|
|
332
|
+
await p.click('#bdPick');
|
|
333
|
+
const items = await p.evaluate(() => [...document.querySelectorAll('#ppMenu [data-pp] b')].map((b) => b.textContent));
|
|
315
334
|
ok('A the product picker offers All products first, then each product', items[0] === 'All products' && items.length === 3, JSON.stringify(items));
|
|
316
|
-
// All products ticks every product; the pick
|
|
317
|
-
await p.click('#
|
|
335
|
+
// All products ticks every product; the pick is saved when the list closes, and the Board opens on it
|
|
336
|
+
await p.click('#ppMenu [data-pp="*"]');
|
|
318
337
|
await Promise.all([p.waitForNavigation(), p.keyboard.press('Escape')]);
|
|
319
338
|
await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
|
|
320
339
|
const a = await p.evaluate(() => ({
|
|
321
340
|
url: location.search,
|
|
322
|
-
crumb: (document.querySelector('#
|
|
341
|
+
crumb: (document.querySelector('#bdPick') || {}).textContent || '', label: (document.querySelector('#bdPick') || { getAttribute: () => '' }).getAttribute('aria-label'),
|
|
323
342
|
band: (document.querySelector('#ibBody .bt-pg .bt-pgo') || {}).textContent || '',
|
|
324
343
|
subs: [...document.querySelectorAll('#ibBody .bt-psb')].map((x) => x.textContent.replace(/\s+/g, ' ').trim()),
|
|
325
344
|
kids: [...document.querySelectorAll('#ibBody .bt-kid .bt-nm b')].map((b) => b.textContent),
|
|
@@ -327,7 +346,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
327
346
|
docs: getComputedStyle(document.querySelector('#tabDocs')).display === 'none', nw: document.querySelector('#newIni').hidden,
|
|
328
347
|
chips: [...document.querySelectorAll('#bdChipset .bd-chip')].map((c) => c.id).filter(Boolean),
|
|
329
348
|
}));
|
|
330
|
-
ok('A the
|
|
349
|
+
ok('A All products is saved, the address stays plain and the chip says All', a.url === '' && /^All/.test(a.crumb) && a.label === 'Products: all 2' && JSON.stringify(pk.posts) === '[["idpf","microsites"]]', JSON.stringify({ a, posts: pk.posts }));
|
|
331
350
|
ok('A the program comes first and holds a sub-row per product with that product\'s initiatives', /Project Ascent/.test(a.band) && a.subs.length === 2 && /IDPF/.test(a.subs[0]) && a.kids.length === 3, JSON.stringify(a));
|
|
332
351
|
ok('A then one group per product with the rows no program holds', a.prods.length === 2 && a.prods[0] === 'IDPF', JSON.stringify(a));
|
|
333
352
|
ok('A documents, New initiative, Jira and asks work across products; only the sprint waits for a product to be picked', !a.docs && !a.nw && a.chips.includes('chJira') && a.chips.includes('chAsks') && !a.chips.includes('chSprint'), JSON.stringify(a));
|
|
@@ -341,40 +360,45 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
341
360
|
await ctx.close();
|
|
342
361
|
}
|
|
343
362
|
|
|
344
|
-
/* M several products (batch 11 item 7): the
|
|
363
|
+
/* M several products (batch 11 item 7, now the one pick of batch 12 item 5): the list ticks several; the Board shows exactly those, merged */
|
|
345
364
|
{
|
|
346
|
-
const { ctx, page: p, errors } = await open({ third: true });
|
|
347
|
-
await p.click('#
|
|
348
|
-
const st = () => p.evaluate(() => ({ open:
|
|
365
|
+
const { ctx, page: p, errors, pk } = await open({ third: true, plain: true, pick: ['idpf'] });
|
|
366
|
+
await p.click('#bdPick');
|
|
367
|
+
const st = () => p.evaluate(() => ({ open: !!document.querySelector('#ppMenu'), ticks: [...document.querySelectorAll('#ppMenu [data-pp]')].map((b) => b.querySelector('b').textContent + ':' + b.getAttribute('aria-checked')) }));
|
|
349
368
|
const m0 = await st();
|
|
350
369
|
ok('M the menu ticks: All products shows a dash (some), the product on screen is ticked', m0.ticks.join(',') === 'All products:mixed,IDPF:true,Microsites:false,Replay:false', JSON.stringify(m0));
|
|
351
|
-
await p.click('#
|
|
370
|
+
await p.click('#ppMenu [data-pp="microsites"]');
|
|
352
371
|
const m1 = await st();
|
|
353
372
|
ok('M a press ticks a product and the menu stays open', m1.open && m1.ticks[2] === 'Microsites:true', JSON.stringify(m1));
|
|
354
|
-
await p.click('#
|
|
373
|
+
await p.click('#ppMenu [data-pp="microsites"]'); await p.click('#ppMenu [data-pp="idpf"]');
|
|
355
374
|
const m2 = await st();
|
|
356
375
|
ok('M a second press unticks; the last ticked product stays ticked', m2.open && m2.ticks.join(',') === 'All products:mixed,IDPF:true,Microsites:false,Replay:false', JSON.stringify(m2));
|
|
357
|
-
await p.click('#
|
|
376
|
+
await p.click('#ppMenu [data-pp="microsites"]');
|
|
358
377
|
await Promise.all([p.waitForNavigation(), p.mouse.click(1400, 880)]);
|
|
359
378
|
await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
|
|
360
|
-
const look = () => p.evaluate(() => ({ url: decodeURIComponent(location.search),
|
|
379
|
+
const look = () => p.evaluate(() => ({ url: decodeURIComponent(location.search), tiles: [...document.querySelectorAll('#bdPick .ppk-t')].map((t) => t.textContent).join(','), label: document.querySelector('#bdPick').getAttribute('aria-label'), ws: [...new Set([...document.querySelectorAll('#ibBody [data-key]')].map((x) => x.dataset.key.split('/')[0]))].sort() }));
|
|
361
380
|
const a = await look();
|
|
362
|
-
ok('M a click outside closes the menu and the Board shows the ticked products only, merged', a.url === '
|
|
363
|
-
ok('M the
|
|
381
|
+
ok('M a click outside closes the menu, saves the pick and the Board shows the ticked products only, merged', a.url === '' && JSON.stringify(pk.on) === '["idpf","microsites"]' && a.ws.join(',') === 'idpf,microsites', JSON.stringify(a));
|
|
382
|
+
ok('M the chip shows the ticked products\' tiles; the words are in its name', a.tiles === 'ID,MI' && a.label === 'Products: IDPF, Microsites', JSON.stringify(a));
|
|
364
383
|
await p.reload(); await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
|
|
365
384
|
const b = await look();
|
|
366
|
-
ok('M a reload keeps the pick', b.url === a.url && b.
|
|
367
|
-
await p.click('#
|
|
385
|
+
ok('M a reload keeps the pick', b.url === a.url && b.label === a.label && b.ws.join(',') === 'idpf,microsites', JSON.stringify(b));
|
|
386
|
+
await p.click('#bdPick');
|
|
368
387
|
const m3 = await st();
|
|
369
388
|
ok('M the menu ticks the products on screen', m3.ticks.join(',') === 'All products:mixed,IDPF:true,Microsites:true,Replay:false', JSON.stringify(m3));
|
|
370
|
-
await p.click('#
|
|
389
|
+
await p.click('#ppMenu [data-pp="*"]');
|
|
371
390
|
const m4 = await st();
|
|
372
391
|
ok('M All products ticks every product', m4.ticks.join(',') === 'All products:true,IDPF:true,Microsites:true,Replay:true', JSON.stringify(m4));
|
|
373
|
-
await p.click('#
|
|
392
|
+
await p.click('#ppMenu [data-pp="idpf"]'); await p.click('#ppMenu [data-pp="microsites"]');
|
|
393
|
+
pk.reads.length = 0;
|
|
374
394
|
await Promise.all([p.waitForNavigation(), p.keyboard.press('Escape')]);
|
|
375
395
|
await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(500);
|
|
376
396
|
const c = await look();
|
|
377
|
-
ok('M unticked down to one product, the Board is that product\'s own board', c.url === '
|
|
397
|
+
ok('M unticked down to one product, the Board is that product\'s own board', c.url === '' && pk.reads[pk.reads.length - 1] === 'replay' && c.label === 'Products: Replay', JSON.stringify({ c, reads: pk.reads }));
|
|
398
|
+
// a one-off link (?ws=&board=) shows that board and leaves the saved pick alone
|
|
399
|
+
await p.goto(BASE + '/premium-board.html?ws=microsites&board=microsites'); await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(500);
|
|
400
|
+
const d = await look();
|
|
401
|
+
ok('M a link to one board shows it and does not change the saved pick', d.label === 'Products: Microsites' && JSON.stringify(pk.on) === '["replay"]' && pk.posts.length === 2, JSON.stringify({ d, on: pk.on, posts: pk.posts.length }));
|
|
378
402
|
ok('M the page threw nothing', !errors.length, errors.join('\n'));
|
|
379
403
|
await ctx.close();
|
|
380
404
|
}
|
package/workspace/board-shot.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
/* board-shot.js — screenshots of the Board with Project Ascent (initiative program-hierarchy: PgBoard, PgBoardProduct, PgKanban, PgTimeline, PgList)
|
|
4
4
|
* at 1440x900 and 390x844 against the Board's program fixture (fixtures/board-premium-facts.js programFacts). Not a suite: a look at the page.
|
|
5
|
-
* OUT=<dir> names where the PNGs go (default: the state folder of this run). WS=microsites shoots the other product's board.
|
|
5
|
+
* OUT=<dir> names where the PNGs go (default: the state folder of this run). WS=microsites shoots the other product's board. SPAN=year sets
|
|
6
|
+
* the timeline's span; PHONE_TIME=1 shoots the timeline at 390 too. */
|
|
6
7
|
const fs = require('fs');
|
|
7
8
|
const path = require('path');
|
|
8
9
|
const { spawn } = require('child_process');
|
|
@@ -32,13 +33,13 @@ const TRAIL = { ok: true, at: '2026-10-17T09:12:00.000Z', usual: {}, themes: [],
|
|
|
32
33
|
const shots = (process.env.SHOTS || 'track,product,stages,time,list').split(',');
|
|
33
34
|
for (const [w, h, name] of [[1440, 900, '1440'], [390, 844, '390']]) {
|
|
34
35
|
for (const s of shots) {
|
|
35
|
-
if (name === '390' && (s === 'time' || s === 'product')) continue;
|
|
36
|
+
if (name === '390' && ((s === 'time' && !process.env.PHONE_TIME) || s === 'product')) continue;
|
|
36
37
|
const ctx = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: process.env.DARK ? 'dark' : 'light' });
|
|
37
38
|
await ctx.route('**/api/board-premium*', (r) => { const q = new URL(r.request().url()).searchParams; r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: model(q.get('ws') || ws), as_of: Date.now() }) }); });
|
|
38
39
|
await ctx.route('**/api/programs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, programs: F.programs() }) }));
|
|
39
40
|
await ctx.route('**/api/board-trail*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(TRAIL) }));
|
|
40
41
|
const v = s === 'product' ? 'track' : s;
|
|
41
|
-
await ctx.addInitScript(([v, s, phone]) => { try { localStorage.setItem(phone ? 'pmos.board.pview' : 'pmos.board.view', v); localStorage.setItem('pmos.board.grouping', s === 'product' ? 'product' : 'program'); } catch {} }, [v, s, name === '390']);
|
|
42
|
+
await ctx.addInitScript(([v, s, phone, sp]) => { try { localStorage.setItem(phone ? 'pmos.board.pview' : 'pmos.board.view', v); localStorage.setItem('pmos.board.grouping', s === 'product' ? 'product' : 'program'); if (sp) localStorage.setItem('pmos.board.span', sp); } catch {} }, [v, s, name === '390', process.env.SPAN || '']);
|
|
42
43
|
const p = await ctx.newPage();
|
|
43
44
|
p.on('pageerror', (e) => errs.push(name + ' ' + s + ': ' + e.message));
|
|
44
45
|
p.on('console', (m) => { if (m.type() === 'error' && !/Failed to load resource/.test(m.text())) errs.push(name + ' ' + s + ' console: ' + m.text()); });
|
|
@@ -91,6 +91,8 @@ const IVREAD = () => {
|
|
|
91
91
|
await page.route('**/api/doc?**', (r) => r.fulfill({ contentType: 'text/markdown', body: '---\ntype: PRD\ntitle: Self-serve onboarding v2\n---\n\n## Problem\nNew teams stall at the invite step.' }));
|
|
92
92
|
await page.route('**/api/sources/refresh', (r) => { const rq = r.request(); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
|
|
93
93
|
await page.route('**/api/briefing-premium/**', (r) => { const rq = r.request(); if (rq.method() === 'GET') return r.fulfill({ contentType: 'application/json', body: JSON.stringify(thread) }); posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}'), headers: rq.headers() }); return r.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
|
|
94
|
+
// the one product chip (batch 12 item 5): one product, ticked
|
|
95
|
+
await page.route('**/api/briefing-premium/products', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, all: false, chosen: false, products: [{ ws: 'pmos', name: 'pmos', home: false, primary: true, initials: 'PM', on: true }] }) }));
|
|
94
96
|
await page.goto(BASE + '/premium-board.html?theme=' + theme + qs);
|
|
95
97
|
const up = await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0 || /could not be read/.test(document.querySelector('#snap').textContent)), 20000);
|
|
96
98
|
return { ctx, page, errors, posts, up, calls: () => calls, setModel: (m) => { current = m; }, set: (a) => { answer = a; }, setThread: (t) => { thread = t; } };
|
|
@@ -111,9 +113,9 @@ const IVREAD = () => {
|
|
|
111
113
|
const vwShut = (pg) => until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer'); return !v || v.hidden; }));
|
|
112
114
|
|
|
113
115
|
/* B1 (premium-agreed-design N1 N2): the floating place menu, no page header, one toolbar */
|
|
114
|
-
const place = await p.evaluate(() => { const f = document.querySelector('#czFab'), h1 = document.querySelector('main h1'), r = h1.getBoundingClientRect(), tb = document.querySelector('.bd-hd').getBoundingClientRect(); return { fab: f && f.getAttribute('aria-label'), w: Math.round(f.getBoundingClientRect().width), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', h1: Math.round(r.width) + 'x' + Math.round(r.height), top: Math.round(tb.top), name: document.querySelector('#
|
|
116
|
+
const place = await p.evaluate(() => { const f = document.querySelector('#czFab'), h1 = document.querySelector('main h1'), r = h1.getBoundingClientRect(), tb = document.querySelector('.bd-hd').getBoundingClientRect(); return { fab: f && f.getAttribute('aria-label'), w: Math.round(f.getBoundingClientRect().width), rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', h1: Math.round(r.width) + 'x' + Math.round(r.height), top: Math.round(tb.top), name: (document.querySelector('#bdPick') || { getAttribute: () => '' }).getAttribute('aria-label'), sw: !document.querySelector('#crSw'), title: document.title }; });
|
|
115
117
|
ok('N1 the floating menu is the one way between places: 56 px, it says Board, and the old rail is gone from the page', /^Open the menu. You are in Board(\. |$)/.test(place.fab) && place.w === 56 && place.rail === 'gone', JSON.stringify(place));
|
|
116
|
-
ok('N2 no page header on desktop: the heading is for screen readers only and the toolbar starts at the top', place.h1 === '1x1' && place.top < 60 && place.name === 'pmos' && place.sw, JSON.stringify(place));
|
|
118
|
+
ok('N2 no page header on desktop: the heading is for screen readers only and the toolbar starts at the top', place.h1 === '1x1' && place.top < 60 && place.name === 'Products: pmos' && place.sw, JSON.stringify(place));
|
|
117
119
|
await p.click('#czFab');
|
|
118
120
|
const menu = await p.evaluate(() => [...document.querySelectorAll('#czMenu a')].map((a) => a.textContent + (a.getAttribute('aria-current') ? '*' : '') + '>' + a.getAttribute('href')).join('|'));
|
|
119
121
|
ok('N1 the menu opens Home, Board and Insights, and marks Board', menu === 'Home>/premium.html|Board*>/premium-board.html|Insights>/premium-insights.html', menu);
|
|
@@ -345,7 +347,7 @@ const IVREAD = () => {
|
|
|
345
347
|
ok('B6 Year draws Quarter\'s rows (TsAllSpans): one row per initiative with its bar, months as columns; no themes, no Group chip; the chips and the legend stay', yr.rows.join() === tl.rows.join() && yr.bars === 3 && !yr.themes && !yr.group && yr.lgd && yr.jira && yr.heads.length >= 12 && yr.heads.every((h) => /^[A-Z][a-z]{2}$/.test(h)), JSON.stringify(yr));
|
|
346
348
|
await spanTo(p, 'y5');
|
|
347
349
|
const y5 = await p.evaluate(() => ({ rows: document.querySelectorAll('#ibBody .tg-q[data-span="y5"] .tg-n.ini2').length, heads: [...document.querySelectorAll('#ibBody .tg-h .tg-p > span[data-y] b')].map((b) => b.textContent), dates: [...document.querySelectorAll('#ibBody .tg-endl, #ibBody .tg-lab')].map((e) => e.textContent) }));
|
|
348
|
-
ok('B6 5 yr draws the same rows with years as columns, and
|
|
350
|
+
ok('B6 5 yr draws the same rows with years as columns, and each bar ends with what lands, then when (batch 13 item 4)', y5.rows === 3 && y5.heads.length >= 5 && y5.heads.every((h) => /^\d{4}$/.test(h)) && y5.dates.length === 3 && y5.dates.every((d) => /^[A-Z][\w ]* [A-Z][a-z]{2} \d{1,2}( ’\d\d)?$/.test(d)), JSON.stringify(y5));
|
|
349
351
|
const sp = [];
|
|
350
352
|
for (const [k, sel, re] of [['sprint', '.sp[data-span="sprint"]', /Initiative and ticket.*Backlog · \d+ not in/], ['half', '.tg-q[data-span="half"]', /Self-serve onboarding v2/], ['y2', '.tg-q[data-span="y2"]', /Self-serve onboarding v2/]]) { await spanTo(p, k); sp.push(await p.evaluate(([q2, r]) => { const e = document.querySelector('#ibBody ' + q2); return !!e && !document.querySelector('#ibBody .bd-wtag') && new RegExp(r).test(e.textContent); }, [sel, re.source])); }
|
|
351
353
|
ok('B6 Sprint (BdSpans: tickets and the backlog row), Half and 2 yr (Quarter\'s rows) are drawn, with no "Waiting for design" tag', sp.every(Boolean), JSON.stringify(sp));
|
|
@@ -391,7 +393,8 @@ const IVREAD = () => {
|
|
|
391
393
|
/* B15 the product picker */
|
|
392
394
|
{
|
|
393
395
|
const D = await open(); const q = D.page;
|
|
394
|
-
|
|
396
|
+
// batch 12 item 5: the product chip replaces the board name and its switcher; with one product it shows that product's tile, never All
|
|
397
|
+
ok('B15 the picker is the product chip (one product: its tile, no All, no switcher), and the Board has no chat button', await q.evaluate(() => { const c = document.querySelector('#bdPick'); return !!c && c.getAttribute('aria-label') === 'Products: pmos' && [...c.querySelectorAll('.ppk-t')].map((t) => t.textContent).join() === 'PM' && !c.querySelector('.ppk-all') && !document.querySelector('#crSw') && !document.querySelector('#crAsk') && !document.querySelector('#askIn'); }));
|
|
395
398
|
await D.ctx.close();
|
|
396
399
|
}
|
|
397
400
|
|
|
@@ -406,7 +409,7 @@ const IVREAD = () => {
|
|
|
406
409
|
const c2 = await browser.newContext({ viewport: { width: 1280, height: 900 } }), p2 = await c2.newPage();
|
|
407
410
|
await p2.route('**/api/board-premium*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, state: 'error', error: 'the board could not be read' }) }));
|
|
408
411
|
await p2.goto(BASE + '/premium-board.html');
|
|
409
|
-
ok('B2 a failed read says why and draws nothing', await until(() => p2.evaluate(() => /The reason: the board could not be read/.test(document.querySelector('#ibBody .bd-msg').textContent) && document.querySelectorAll('#ibBody .ini2').length === 0), 4000));
|
|
412
|
+
ok('B2 a failed read says why and draws nothing', await until(() => p2.evaluate(() => /The reason: the board could not be read/.test((document.querySelector('#ibBody .bd-msg') || {}).textContent || '') && document.querySelectorAll('#ibBody .ini2').length === 0), 4000));
|
|
410
413
|
await c2.close();
|
|
411
414
|
}
|
|
412
415
|
|
|
@@ -471,7 +474,7 @@ const IVREAD = () => {
|
|
|
471
474
|
await q.click('#bdFilter'); const fgS = await q.evaluate(() => [...document.querySelectorAll('#bdPop .bd-mlbl')].map((e) => e.textContent)); await q.keyboard.press('Escape');
|
|
472
475
|
ok('T the sprint filter shows on the Sprint span only: no chip and no Sprint group in Filter on Year, both on Sprint', sfY && !fgY.includes('Sprint') && sfS && fgS.includes('Sprint'), JSON.stringify({ sfY, fgY, sfS, fgS }));
|
|
473
476
|
await spanTo(q, 'quarter');
|
|
474
|
-
ok('T the Quarter
|
|
477
|
+
ok('T the Quarter names a release sign-off in its bar\'s hover (no blue ◆, batch 13 item 4) and a dependency on the bar', await q.evaluate(() => [...document.querySelectorAll('#ibBody .tg-bar')].some((b) => /v2\.4 sign-off/.test(b.getAttribute('title') || '')) && !document.querySelector('#ibBody .tg-msd') && /after SSO for partners/.test(document.querySelector('#ibBody').textContent)));
|
|
475
478
|
await view(q, 'track');
|
|
476
479
|
/* the row actions write through the console's routes, each with Undo; re-pointed (viewer-shell-a): the initiative's ⋯ opens them */
|
|
477
480
|
await q.click('#bdChipset [data-f="sprint"]');
|