create-pmos 0.609.0 → 0.611.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 +69 -27
- 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-columns-test.js +2 -1
- package/workspace/board-deliveries-test.js +2 -1
- package/workspace/board-programs-test.js +9 -5
- package/workspace/board-publish-ui-test.js +2 -1
- package/workspace/board-shared-ui-test.js +2 -1
- package/workspace/board-workflows-test.js +2 -1
- package/workspace/briefing-premium-adddoc-test.js +2 -1
- package/workspace/briefing-premium-board-test.js +10 -9
- package/workspace/briefing-premium-doc-edit-test.js +2 -1
- package/workspace/briefing-premium-initiative-test.js +7 -6
- package/workspace/briefing-premium-insights-test.js +12 -11
- package/workspace/briefing-premium-products-test.js +4 -2
- package/workspace/briefing-premium-sources-test.js +1 -1
- package/workspace/briefing-premium-test.js +6 -5
- package/workspace/briefing-premium-work-test.js +1 -1
- package/workspace/calm-timeline-test.js +2 -1
- package/workspace/changelog.json +68 -0
- package/workspace/core-docs-workflow-test.js +2 -1
- package/workspace/ev-everywhere-test.js +11 -10
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/index.md +4 -0
- package/workspace/guide/layout.md +92 -11
- package/workspace/guide/programs.md +16 -2
- package/workspace/guide/routine.md +50 -0
- package/workspace/guide/scheduled-tasks-and-cli.md +1 -1
- package/workspace/guide/settings-and-switches.md +1 -1
- package/workspace/home-other-product-test.js +2 -1
- package/workspace/home-railcard-test.js +2 -1
- package/workspace/impact-screens-test.js +3 -1
- package/workspace/ini-workflow-test.js +2 -1
- package/workspace/lib/beside-page.js +15 -0
- package/workspace/lib/classic-board.js +15 -0
- package/workspace/lib/events-place.js +216 -0
- package/workspace/lib/library-items.js +78 -0
- package/workspace/lib/notes.js +6 -1
- package/workspace/lib/route-modules.js +4 -0
- package/workspace/lib/routes-events-place.js +166 -0
- package/workspace/lib/routes-library.js +89 -0
- package/workspace/lib/routes-pop-work.js +39 -0
- package/workspace/lib/routes-report-setups.js +20 -0
- package/workspace/lib/routes-today-log.js +48 -0
- package/workspace/lib/routine-reports.js +52 -0
- package/workspace/lib/today-log.js +131 -0
- package/workspace/live-pill-round-test.js +11 -9
- package/workspace/metric-drafts-ui-test.js +3 -1
- package/workspace/milestone-pins-test.js +2 -1
- package/workspace/milestone-suggest-test.js +3 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/panels-test.js +6 -4
- package/workspace/premium-board-actions-test.js +3 -1
- package/workspace/premium-chat-context-test.js +6 -6
- package/workspace/premium-chat-line-test.js +1 -1
- package/workspace/premium-chat-notes-test.js +1 -1
- package/workspace/premium-core-doc-issue-test.js +2 -1
- package/workspace/premium-rec-tab-test.js +2 -1
- package/workspace/premium-vw-backlog-test.js +3 -1
- package/workspace/premium-vw-cal-test.js +1 -1
- package/workspace/premium-vw-doc-test.js +2 -1
- package/workspace/premium-vw-item-test.js +3 -1
- package/workspace/premium-vw-jira-test.js +3 -1
- package/workspace/product-lane-test.js +2 -1
- package/workspace/program-charter-test.js +3 -1
- package/workspace/program-leave-test.js +3 -1
- package/workspace/program-order-test.js +2 -1
- package/workspace/program-panel-test.js +5 -3
- package/workspace/public/pm/bd-ini-panel.js +75 -8
- package/workspace/public/pm/bd-prog-panel.js +55 -8
- package/workspace/public/pm/bd-scroll.js +4 -2
- package/workspace/public/pm/bd-work.css +130 -0
- package/workspace/public/pm/bd-work.js +356 -0
- package/workspace/public/pm/cozy-board.css +3 -0
- package/workspace/public/pm/cozy-ev.css +52 -0
- package/workspace/public/pm/cozy-events-view.js +142 -0
- package/workspace/public/pm/cozy-events.css +107 -0
- package/workspace/public/pm/cozy-events.js +210 -0
- package/workspace/public/pm/cozy-evmodel.js +1 -1
- package/workspace/public/pm/cozy-library.css +36 -0
- package/workspace/public/pm/cozy-live-pill.js +3 -1
- package/workspace/public/pm/cozy-nav.js +70 -7
- package/workspace/public/pm/cozy-panels.js +1 -1
- package/workspace/public/pm/cozy-pick.css +3 -0
- package/workspace/public/pm/cozy-pick.js +6 -2
- package/workspace/public/pm/cozy-pop-work.css +165 -0
- package/workspace/public/pm/cozy-pop-work.js +427 -0
- package/workspace/public/pm/cozy-popup.css +113 -0
- package/workspace/public/pm/cozy-popup.js +408 -0
- package/workspace/public/pm/cozy-routine-model.js +111 -0
- package/workspace/public/pm/cozy-routine-pop.js +196 -0
- package/workspace/public/pm/cozy-routine.css +102 -0
- package/workspace/public/pm/cozy-routine.js +156 -0
- package/workspace/public/pm/cozy-schedwork.js +6 -5
- package/workspace/public/pm/cozy-settings.js +10 -1
- package/workspace/public/pm/cozy-today-app.js +236 -0
- package/workspace/public/pm/cozy-today-model.js +176 -0
- package/workspace/public/pm/cozy-today-page.css +100 -0
- package/workspace/public/pm/cozy-today-view.js +76 -0
- package/workspace/public/pm/cozy-viewer.js +66 -18
- package/workspace/public/pm/home-app.js +29 -6
- package/workspace/public/pm/home-ini.js +39 -7
- package/workspace/public/pm/library-model.js +69 -0
- package/workspace/public/pm/library-open.js +34 -0
- package/workspace/public/pm/page-chat.js +16 -4
- package/workspace/public/pm/pop-sessions.js +65 -0
- package/workspace/public/pm/pop-work-model.js +335 -0
- package/workspace/public/pm/premium-board.js +137 -11
- package/workspace/public/pm/premium-insights.js +14 -2
- package/workspace/public/pm/premium-library.js +122 -0
- package/workspace/public/pm/premium-shell.js +1 -1
- package/workspace/public/premium-board.html +1 -0
- package/workspace/public/premium-events.html +42 -0
- package/workspace/public/premium-library.html +31 -0
- package/workspace/public/premium-routine.html +31 -0
- package/workspace/public/today.html +50 -0
- package/workspace/ready-dash-ui-test.js +3 -1
- package/workspace/rename-test.js +2 -1
- package/workspace/run-tests.js +4 -1
- package/workspace/server.js +3 -2
- package/workspace/sort-order-test.js +2 -1
- package/workspace/split-merge-ui-test.js +3 -1
- package/workspace/stage-card-tasks-test.js +5 -3
- package/workspace/stage-card-test.js +2 -1
- package/workspace/task-card-test.js +2 -1
- package/workspace/task-delete-test.js +3 -1
- package/workspace/task-links-test.js +4 -2
- package/workspace/task-milestones-test.js +4 -2
- package/workspace/task-plans-test.js +3 -1
- package/workspace/task-press-test.js +3 -1
- package/workspace/task-views-test.js +10 -8
- package/workspace/test-lists/events-place.json +11 -0
- package/workspace/test-lists/library-place.json +9 -0
- package/workspace/test-lists/one-popup.json +9 -0
- package/workspace/test-lists/pop-work.json +9 -0
- package/workspace/test-lists/routine-place.json +9 -0
- package/workspace/test-lists/today-log.json +9 -0
- package/workspace/test-lists/work-view.json +9 -0
- package/workspace/timeline-holds-test.js +3 -1
- package/workspace/tk-tasks-test.js +3 -1
- package/workspace/viewer-trail-test.js +1 -1
- package/workspace/workflows-setup-test.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.611.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": {
|
|
@@ -33,6 +33,74 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.611.0",
|
|
38
|
+
"at": "2026-11-18T23:52:14.177Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1366,
|
|
43
|
+
"t": "The rail and the popup together keep main green",
|
|
44
|
+
"s": "The rail and the popup together keep main green",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1363,
|
|
49
|
+
"t": "Work, one list of initiatives with its timeline (nav slice 4)",
|
|
50
|
+
"s": "Work, one list of initiatives with its timeline (nav slice 4)",
|
|
51
|
+
"k": "new"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"n": 1364,
|
|
55
|
+
"t": "Today page, a daily log beside today's agenda (nav slice 5)",
|
|
56
|
+
"s": "Today page, a daily log beside today's agenda (nav slice 5)",
|
|
57
|
+
"k": "new"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"n": 1362,
|
|
61
|
+
"t": "Events, one place for everything with a date (nav slice 6)",
|
|
62
|
+
"s": "Events, one place for everything with a date (nav slice 6)",
|
|
63
|
+
"k": "new"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"n": 1367,
|
|
67
|
+
"t": "Library, one table of everything that was made (slice 7)",
|
|
68
|
+
"s": "Library, one table of everything that was made (slice 7)",
|
|
69
|
+
"k": "new"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"n": 1365,
|
|
73
|
+
"t": "What the popup shows for work (nav slice 3)",
|
|
74
|
+
"s": "What the popup shows for work (nav slice 3)",
|
|
75
|
+
"k": "new"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"n": 1361,
|
|
79
|
+
"t": "Routine, everything that repeats in one place, and a report in the popup (slice 8)",
|
|
80
|
+
"s": "Routine, everything that repeats in one place, and a report in the popup (slice 8)",
|
|
81
|
+
"k": "new"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"v": "0.610.0",
|
|
87
|
+
"at": "2026-11-18T19:46:47.442Z",
|
|
88
|
+
"f": 4,
|
|
89
|
+
"prs": [
|
|
90
|
+
{
|
|
91
|
+
"n": 1359,
|
|
92
|
+
"t": "The navigation of six places, one thin rail on every page (slice 1)",
|
|
93
|
+
"s": "The navigation of six places, one thin rail on every page (slice 1)",
|
|
94
|
+
"k": "new"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"n": 1360,
|
|
98
|
+
"t": "One popup with the chat",
|
|
99
|
+
"s": "One popup with the chat",
|
|
100
|
+
"k": "new"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
36
104
|
{
|
|
37
105
|
"v": "0.609.0",
|
|
38
106
|
"at": "2026-11-18T14:39:08.423Z",
|
|
@@ -290,32 +358,6 @@
|
|
|
290
358
|
"k": "new"
|
|
291
359
|
}
|
|
292
360
|
]
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"v": "0.591.0",
|
|
296
|
-
"at": "2026-11-17T14:18:25.456Z",
|
|
297
|
-
"f": 4,
|
|
298
|
-
"prs": [
|
|
299
|
-
{
|
|
300
|
-
"n": 1328,
|
|
301
|
-
"t": "Home's list shows only rows with a call; the rest fold to N more",
|
|
302
|
-
"s": "Home's list shows only rows with a call; the rest fold to N more",
|
|
303
|
-
"k": "new"
|
|
304
|
-
}
|
|
305
|
-
]
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"v": "0.590.0",
|
|
309
|
-
"at": "2026-11-17T13:19:36.782Z",
|
|
310
|
-
"f": 4,
|
|
311
|
-
"prs": [
|
|
312
|
-
{
|
|
313
|
-
"n": 1326,
|
|
314
|
-
"t": "Take Your move and Waiting on others back out of Home's list",
|
|
315
|
-
"s": "Take Your move and Waiting on others back out of Home's list",
|
|
316
|
-
"k": "imp"
|
|
317
|
-
}
|
|
318
|
-
]
|
|
319
361
|
}
|
|
320
362
|
]
|
|
321
363
|
}
|
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-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-18T23:52:10Z"}
|
|
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-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-18T23:52:10Z"}
|
|
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-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-18T23:52:10Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* N a narrow Board drops columns from the right and brings them back when it widens; a phone has none
|
|
12
12
|
* SHOTS_COLS=<dir>: the timeline at 1440 light and dark, with the menu open, and at 1000, into <dir>. */
|
|
13
13
|
const path = require('path');
|
|
14
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
14
15
|
const { spawn } = require('child_process');
|
|
15
16
|
const { findBrowser } = require('./lib/find-browser');
|
|
16
17
|
const T = require('./test-run').configure({ name: 'board-columns' });
|
|
@@ -54,7 +55,7 @@ const ITEMS = [
|
|
|
54
55
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
55
56
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
56
57
|
await T.waitForServer(BASE);
|
|
57
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
58
|
+
browser = classicBoard(await chromium.launch({ executablePath: exe }));
|
|
58
59
|
|
|
59
60
|
/** The Board on the timeline at Year. o: { w, h, dark, phone, cols } */
|
|
60
61
|
const open = async (o = {}) => {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
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
10
|
* SHOTS_DL=<dir>: the lane at 1440 (open, hover, folded) and 390, into <dir>. */
|
|
11
11
|
const path = require('path');
|
|
12
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
12
13
|
const { spawn } = require('child_process');
|
|
13
14
|
const { findBrowser } = require('./lib/find-browser');
|
|
14
15
|
const T = require('./test-run').configure({ name: 'board-deliveries' });
|
|
@@ -58,7 +59,7 @@ const model = () => {
|
|
|
58
59
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
59
60
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
60
61
|
await T.waitForServer(BASE);
|
|
61
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
62
|
+
browser = classicBoard(await chromium.launch({ executablePath: exe }));
|
|
62
63
|
|
|
63
64
|
/** The Board on the timeline. o: { w, h, span, phone, store, dark } */
|
|
64
65
|
const open = async (o = {}) => {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* L List: Product and Program columns, sortable
|
|
12
12
|
* Z with no program on the board, no group head and no grouping control (zero is silence) · phone: no sideways scroll */
|
|
13
13
|
const path = require('path');
|
|
14
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
14
15
|
const { spawn } = require('child_process');
|
|
15
16
|
const { findBrowser } = require('./lib/find-browser');
|
|
16
17
|
const T = require('./test-run').configure({ name: 'board-programs' });
|
|
@@ -38,7 +39,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
38
39
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
39
40
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
40
41
|
await T.waitForServer(BASE);
|
|
41
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
42
|
+
browser = classicBoard(await chromium.launch({ executablePath: exe }));
|
|
42
43
|
|
|
43
44
|
/** A Board page of one Ascent product. o: { w, h, view, grouping, programs, qs, store } — store: localStorage to set before the page loads. */
|
|
44
45
|
const open = async (o = {}) => {
|
|
@@ -330,8 +331,11 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
330
331
|
// Find scrolls an off-screen bar into view and tints its row (TsCEdges 4)
|
|
331
332
|
await p.evaluate(() => { document.querySelector('#ibBody .tg-sc').scrollLeft = 0; }); await p.waitForTimeout(150);
|
|
332
333
|
await p.click('#bdFind'); await p.waitForSelector('#evSearch:not([hidden])'); await p.fill('#evQ', 'Legacy'); await p.waitForTimeout(400); await p.keyboard.press('Enter'); await p.waitForTimeout(700);
|
|
333
|
-
|
|
334
|
-
|
|
334
|
+
// the Board may redraw its rows after Find (a slow runner): wait for the row before reading it
|
|
335
|
+
await p.waitForFunction(() => [...document.querySelectorAll('#ibBody .tg-r[data-row]')].some((r) => /Legacy IdP sunset/.test(r.textContent) && r.querySelector('.tg-bar')), null, { timeout: 5000 }).catch(() => {});
|
|
336
|
+
const f = await p.evaluate(() => { const row = [...document.querySelectorAll('#ibBody .tg-r[data-row]')].find((r) => /Legacy IdP sunset/.test(r.textContent)); if (!row) return { row: false }; const sc = document.querySelector('#ibBody .tg-sc'), b = row.querySelector('.tg-bar').getBoundingClientRect(), s = sc.getBoundingClientRect(); const pop = document.querySelector('.cz-pop:not([hidden]) #czViewer'); return { tint: row.classList.contains('tint'), inView: b.right > s.left + 250 && b.left < s.right, pop: !!pop && /Legacy IdP sunset/.test(pop.textContent) }; });
|
|
337
|
+
// on a desk Find opens the initiative in the popup with the chat (cozy-popup.js), which covers the Board: the tint is for work beside the page
|
|
338
|
+
ok('S Find scrolls the bar into view, and tints its row for a moment or opens the initiative in the popup', f.inView && (f.tint || f.pop), JSON.stringify(f));
|
|
335
339
|
ok('S the scroll threw nothing', !errors.length, errors.join('\n'));
|
|
336
340
|
await ctx.close();
|
|
337
341
|
}
|
|
@@ -415,10 +419,10 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
415
419
|
await p.click('#ppMenu [data-pp="microsites"]');
|
|
416
420
|
await Promise.all([p.waitForNavigation(), p.mouse.click(1400, 880)]);
|
|
417
421
|
await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
|
|
418
|
-
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() }));
|
|
422
|
+
const look = () => p.evaluate(() => ({ url: decodeURIComponent(location.search), tiles: [...document.querySelectorAll('#bdPick .ppk-t')].map((t) => t.textContent).join(','), name: ((document.querySelector('#bdPick .ppk-nmc') || {}).textContent || '').replace(/\s+/g, ' ').trim(), label: document.querySelector('#bdPick').getAttribute('aria-label'), ws: [...new Set([...document.querySelectorAll('#ibBody [data-key]')].map((x) => x.dataset.key.split('/')[0]))].sort() }));
|
|
419
423
|
const a = await look();
|
|
420
424
|
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));
|
|
421
|
-
ok('M the chip shows the ticked
|
|
425
|
+
ok('M the chip shows the first ticked product\'s full name and +1 on desktop (six-place navigation); the words are in its name', a.name === 'IDPF +1' && a.label === 'Products: IDPF, Microsites', JSON.stringify(a));
|
|
422
426
|
await p.reload(); await p.waitForSelector('#ibBody [data-key]'); await p.waitForTimeout(700);
|
|
423
427
|
const b = await look();
|
|
424
428
|
ok('M a reload keeps the pick', b.url === a.url && b.label === a.label && b.ws.join(',') === 'idpf,microsites', JSON.stringify(b));
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* C the form: chips, the initiative picker, password, ends · D publish: what is sent, working, the link ready, Done · E problems · F open links ·
|
|
8
8
|
* G a phone: a sheet, no sideways scroll · H Escape and a press outside close it */
|
|
9
9
|
const path = require('path');
|
|
10
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
10
11
|
const { spawn } = require('child_process');
|
|
11
12
|
const { findBrowser } = require('./lib/find-browser');
|
|
12
13
|
const T = require('./test-run').configure({ name: 'board-publish-ui' });
|
|
@@ -23,7 +24,7 @@ const ok = (name, cond, extra = '') => { n++; if (!cond) bad++; console.log(`${c
|
|
|
23
24
|
const finish = async (browser, code) => { try { if (browser) await browser.close(); } catch { /* gone */ } try { srv.kill('SIGKILL'); } catch { /* gone */ } T.killTmux(); console.log(`\n${n - bad}/${n} board-publish-ui assertions passed`); process.exit(code !== undefined ? code : (bad ? 1 : 0)); };
|
|
24
25
|
process.on('unhandledRejection', (e) => { console.error(e); finish(null, 1); });
|
|
25
26
|
await T.waitForServer(T.BASE);
|
|
26
|
-
const browser = await chromium.launch({ executablePath: findBrowser() });
|
|
27
|
+
const browser = classicBoard(await chromium.launch({ executablePath: findBrowser() }));
|
|
27
28
|
|
|
28
29
|
const model = BP.build(F.programFacts('idpf'));
|
|
29
30
|
const BOARD = '/api/board-premium?ws=idpf&board=idpf';
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* the test (the server side is tested in board-publish-teams.test.js against the real host), so each press is checked on what the page SENDS and draws.
|
|
6
6
|
* A the tab and its number · B join · C the list · D a team that cannot be read · E leave · F reads happen on open and on Refresh only · G a phone */
|
|
7
7
|
const path = require('path');
|
|
8
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
8
9
|
const { spawn } = require('child_process');
|
|
9
10
|
const { findBrowser } = require('./lib/find-browser');
|
|
10
11
|
const T = require('./test-run').configure({ name: 'board-shared-ui' });
|
|
@@ -22,7 +23,7 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
|
|
|
22
23
|
const finish = async (browser, code) => { try { if (browser) await browser.close(); } catch { /* gone */ } try { srv.kill('SIGKILL'); } catch { /* gone */ } T.killTmux(); console.log(`\n${n - bad}/${n} board-shared-ui assertions passed`); process.exit(code !== undefined ? code : (bad ? 1 : 0)); };
|
|
23
24
|
process.on('unhandledRejection', (e) => { console.error(e); finish(null, 1); });
|
|
24
25
|
await T.waitForServer(T.BASE);
|
|
25
|
-
const browser = await chromium.launch({ executablePath: findBrowser() });
|
|
26
|
+
const browser = classicBoard(await chromium.launch({ executablePath: findBrowser() }));
|
|
26
27
|
const model = BP.build(F.programFacts('idpf'));
|
|
27
28
|
const BOARD = '/api/board-premium?ws=idpf&board=idpf';
|
|
28
29
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* W8 the phone · W9 a board with only Product feature · W10 dark, and no page error.
|
|
9
9
|
* The screenshots of the same views come from board-wf-shot.js (not a suite). */
|
|
10
10
|
const path = require('path');
|
|
11
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
11
12
|
const { spawn } = require('child_process');
|
|
12
13
|
const { findBrowser } = require('./lib/find-browser');
|
|
13
14
|
const T = require('./test-run').configure({ name: 'board-workflows' });
|
|
@@ -37,7 +38,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
37
38
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
38
39
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
39
40
|
await T.waitForServer(BASE);
|
|
40
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
41
|
+
browser = classicBoard(await chromium.launch({ executablePath: exe }));
|
|
41
42
|
const errors = [];
|
|
42
43
|
|
|
43
44
|
/** The Board in a fresh context: `view` and `pick` go into the page's store before it loads. */
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const { spawn } = require('child_process');
|
|
8
8
|
const { findBrowser } = require('./lib/find-browser');
|
|
9
|
+
const { besidePage } = require('./lib/beside-page'); // these checks are about work beside the page, not the popup
|
|
9
10
|
const { openMission } = require('./lib/open-mission');
|
|
10
11
|
const T = require('./test-run').configure({ name: 'briefing-premium-adddoc' });
|
|
11
12
|
const IP = require('./lib/initiative-premium.js');
|
|
@@ -43,7 +44,7 @@ const PAGES = {
|
|
|
43
44
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
44
45
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
45
46
|
await T.waitForServer(BASE);
|
|
46
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
47
|
+
browser = besidePage(await chromium.launch({ executablePath: exe }));
|
|
47
48
|
|
|
48
49
|
const open = async (kind, { w = 1280, h = 900, theme = 'light', custom = [], add = { status: 200, body: { ok: true } } } = {}) => {
|
|
49
50
|
const P = PAGES[kind];
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
* GET /api/board-trail (lib/board-trail.js) is answered with fixtures/board-premium-trail.js in the T block, and fails everywhere else, so the
|
|
14
14
|
* other blocks check what the page draws when the trail is not there: nothing invented. */
|
|
15
15
|
const fs = require('fs');
|
|
16
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
16
17
|
const path = require('path');
|
|
17
18
|
const { spawn } = require('child_process');
|
|
18
19
|
const { findBrowser } = require('./lib/find-browser');
|
|
20
|
+
const { besidePage } = require('./lib/beside-page'); // these checks are about work beside the page, not the popup
|
|
19
21
|
const { openMission } = require('./lib/open-mission');
|
|
20
22
|
const T = require('./test-run').configure({ name: 'briefing-premium-board' });
|
|
21
23
|
const BP = require('./lib/board-premium.js');
|
|
@@ -79,7 +81,7 @@ const IVREAD = () => {
|
|
|
79
81
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
80
82
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
81
83
|
await T.waitForServer(BASE);
|
|
82
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
84
|
+
browser = classicBoard(besidePage(await chromium.launch({ executablePath: exe })));
|
|
83
85
|
|
|
84
86
|
const open = async ({ w = 1440, h = 900, theme = 'light', model = mk(), answers = null, trail = null, qs = '', slowSheet = 0 } = {}) => {
|
|
85
87
|
const ctx = await openMission(await browser.newContext({ viewport: { width: w, height: h } }));
|
|
@@ -126,12 +128,11 @@ const IVREAD = () => {
|
|
|
126
128
|
const vwShut = (pg) => until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer'); return !v || v.hidden; }));
|
|
127
129
|
|
|
128
130
|
/* B1 (premium-agreed-design N1 N2): the floating place menu, no page header, one toolbar */
|
|
129
|
-
const place = await p.evaluate(() => { const f = document.querySelector('#
|
|
130
|
-
ok('N1 the
|
|
131
|
-
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));
|
|
132
|
-
await p.
|
|
133
|
-
|
|
134
|
-
ok('N1 the menu opens Home, Board and Intelligence, and marks Board', menu === 'Home>/premium.html|Board*>/premium-board.html|Intelligence>/premium-intelligence.html', menu);
|
|
131
|
+
const place = await p.evaluate(() => { const f = document.querySelector('#czMenu.ev-rail'), h1 = document.querySelector('main h1'), r = h1.getBoundingClientRect(), tb = document.querySelector('.bd-hd').getBoundingClientRect(); return { rail: !!f && !f.hidden, w: f ? Math.round(f.getBoundingClientRect().width) : 0, fab: getComputedStyle(document.querySelector('#czFab')).display, old: 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'), chip: ((document.querySelector('#bdPick .ppk-nmc') || {}).textContent || '').trim(), sw: !document.querySelector('#crSw'), title: document.title }; });
|
|
132
|
+
ok('N1 the rail is the one way between places on a desktop (slice 1): 72 px, no floating button, and the old rail is gone from the page', place.rail && place.w === 72 && place.fab === 'none' && place.old === 'gone', JSON.stringify(place));
|
|
133
|
+
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.chip === 'pmos' && place.sw, JSON.stringify(place));
|
|
134
|
+
const menu = await p.evaluate(() => [...document.querySelectorAll('#czMenu a')].map((a) => a.querySelector('span').textContent + (a.getAttribute('aria-current') ? '*' : '') + '>' + a.getAttribute('href')).join('|'));
|
|
135
|
+
ok('N1 the rail holds Today, Work and Goals, and marks Work', /^Today>\/today\.html\|Work\*>\/premium-board\.html\|Goals>\/premium-intelligence\.html(\|(Events|Library|Routine)>\/premium-[a-z]+\.html)*$/.test(menu), menu);
|
|
135
136
|
await p.keyboard.press('Escape');
|
|
136
137
|
// premium-agreed-design (shared foundation): the ⋯ menu leads nowhere in the console; its undesigned items open the Viewer on a placeholder.
|
|
137
138
|
// re-pointed for the Agreed Board: the Board adds none of its old items to the menu (steps, sprint and release, metrics, cancelled and archived).
|
|
@@ -140,7 +141,7 @@ const IVREAD = () => {
|
|
|
140
141
|
{ await p.click('#moreBtn'); const tc = await p.evaluate(() => { const b = document.querySelector('#moreBtn').getBoundingClientRect(); return { console: document.querySelectorAll('#moreMenu a[href*="console"], #toConsole').length, w: Math.round(b.width), h: Math.round(b.height), items: [...document.querySelectorAll('#moreMenu [role^="menuitem"]')].filter((x) => x.offsetParent !== null).map((x) => x.id), theme: !!document.querySelector('#moreMenu #tbTheme') }; });
|
|
141
142
|
ok('B1 the ⋯ menu has no console link and holds only Publish a read-only copy and Cancelled and archived (no Sources, Theme or Settings: UI grill U2)', tc.console === 0 && tc.w >= 40 && tc.h >= 40 && tc.items.join() === 'bdPublish,bdGone' && !tc.theme, JSON.stringify(tc));
|
|
142
143
|
await p.keyboard.press('Escape');
|
|
143
|
-
await p.click('#czFab'); await p.click('#czMenu [data-cz-settings]'); const vw = await until(() => p.evaluate(() => { const d = document.querySelector('#evSettings:not([hidden])'); return d ? d.getAttribute('aria-label') : null; }));
|
|
144
|
+
if (await p.isVisible('#czFab')) await p.click('#czFab'); await p.click('#czMenu [data-cz-settings]'); const vw = await until(() => p.evaluate(() => { const d = document.querySelector('#evSettings:not([hidden])'); return d ? d.getAttribute('aria-label') : null; }));
|
|
144
145
|
ok('B1 Settings opens its dialog from the place menu (premium-uncovered-features, EvSettings)', vw === 'Settings', JSON.stringify(vw)); await p.keyboard.press('Escape'); }
|
|
145
146
|
ok('B1 the page is served at /premium-board and /premium-board.html', (await fetch(BASE + '/premium-board')).status === 200 && (await fetch(BASE + '/premium-board.html')).status === 200);
|
|
146
147
|
|
|
@@ -421,7 +422,7 @@ const IVREAD = () => {
|
|
|
421
422
|
{
|
|
422
423
|
const D = await open(); const q = D.page;
|
|
423
424
|
// 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
|
|
424
|
-
ok('B15 the picker is the product chip (one product: its
|
|
425
|
+
ok('B15 the picker is the product chip (one product: its full name on a desktop since slice 1, its tile on a phone; 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' && (innerWidth > 760 ? (c.querySelector('.ppk-nmc') || {}).textContent === 'pmos' : [...c.querySelectorAll('.ppk-t')].map((t) => t.textContent).join() === 'PM' && !c.querySelector('.ppk-all')) && !document.querySelector('#crSw') && !document.querySelector('#crAsk') && !document.querySelector('#askIn'); }));
|
|
425
426
|
await D.ctx.close();
|
|
426
427
|
}
|
|
427
428
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* read off the request the page sent. The routes' own behaviour (the file, the log, stale, 403) is in briefing-premium-doc-edit.test.js, on a scratch repository.
|
|
9
9
|
* E1 tabs · E2 edit · E3 ask · E4 proposals · E5 after a write · E6 held · E7 honesty · E8 fidelity and floors */
|
|
10
10
|
const fs = require('fs');
|
|
11
|
+
const { besidePage } = require('./lib/beside-page'); // these checks read the full page beside the page; in the popup work shows its three parts (nav slice 3)
|
|
11
12
|
const path = require('path');
|
|
12
13
|
const { spawn } = require('child_process');
|
|
13
14
|
const { findBrowser } = require('./lib/find-browser');
|
|
@@ -45,7 +46,7 @@ const prop = (o) => Object.assign({ id: 'prop-a', state: 'proposed', prompt: 'ad
|
|
|
45
46
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
46
47
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
47
48
|
await T.waitForServer(BASE);
|
|
48
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
49
|
+
browser = besidePage(await chromium.launch({ executablePath: exe }));
|
|
49
50
|
|
|
50
51
|
const open = async ({ w = 1280, h = 900, theme = 'light', props = [prop()], post = null } = {}) => {
|
|
51
52
|
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
const path = require('path');
|
|
14
14
|
const { spawn } = require('child_process');
|
|
15
15
|
const { findBrowser } = require('./lib/find-browser');
|
|
16
|
+
const { besidePage } = require('./lib/beside-page'); // these checks are about work beside the page, not the popup
|
|
16
17
|
const { openMission } = require('./lib/open-mission');
|
|
17
18
|
const T = require('./test-run').configure({ name: 'briefing-premium-initiative' });
|
|
18
19
|
const IP = require('./lib/initiative-premium.js');
|
|
@@ -50,7 +51,7 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
50
51
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
51
52
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
52
53
|
await T.waitForServer(BASE);
|
|
53
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
54
|
+
browser = besidePage(await chromium.launch({ executablePath: exe }));
|
|
54
55
|
|
|
55
56
|
const open = async ({ w = 1280, h = 900, theme = 'light', model = mk(), answers = null, url = '/premium.html?ini=self-serve-v2&ws=w1&board=w1' } = {}) => {
|
|
56
57
|
const ctx = await openMission(await browser.newContext({ viewport: { width: w, height: h } }));
|
|
@@ -127,8 +128,8 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
127
128
|
await p.evaluate(() => { window.__noReload = 1; });
|
|
128
129
|
await p.click('#hmList [data-hm-prodopen]');
|
|
129
130
|
ok('I1 a product heading\'s name opens the product\'s one page in the Viewer with its goals and its Reports tab, and its own chat (HbCProduct, batch 21 item 2)', await until(() => p.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); return !!v && /Product/.test((v.querySelector('.cz-vw-kind') || {}).textContent || '') && !!v.querySelector('section.hi-pg[aria-label="Goals"]') && !!v.querySelector('[data-pv="tab"][data-k="reports"]') && /^Message PMOS about /.test(document.querySelector('#hmIn').placeholder) && !!document.querySelector('#hmList .hv-prg.sel [data-hm-prodopen]'); })));
|
|
130
|
-
await p.click('#czFab'); await p.click('#czMenu a[aria-current="page"]');
|
|
131
|
-
ok('I1 Menu >
|
|
131
|
+
if (await p.isVisible('#czFab')) await p.click('#czFab'); await p.click('#czMenu a[aria-current="page"]');
|
|
132
|
+
ok('I1 Menu > Today closes the page and clears the selection, without a reload', await until(() => p.evaluate(() => window.__noReload === 1 && !document.querySelector('#czViewer:not([hidden])') && !document.querySelector('#hmList .sel, #hmList [aria-current="true"]') && /^Ask or tell PMOS anything$/.test(document.querySelector('#hmIn').placeholder)))); // chief-of-staff C1: Home's own chat
|
|
132
133
|
await p.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=light'); await ready(p);
|
|
133
134
|
|
|
134
135
|
/* I3 header and the ONE view (batch 6 items 1 and 3: the Board's panel draws the same; stage-card-test.js holds the stage card's behaviour) */
|
|
@@ -262,9 +263,9 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
262
263
|
const g = await R.page.evaluate(() => {
|
|
263
264
|
const tok = (v) => { const x = document.createElement('i'); x.style.setProperty('background-color', 'var(' + v + ')'); document.body.appendChild(x); const c = getComputedStyle(x).backgroundColor; x.remove(); return c; };
|
|
264
265
|
const cs = (s) => { const e = document.querySelector(s); return e ? getComputedStyle(e) : null; };
|
|
265
|
-
const fab = document.querySelector('#czFab'), fr = fab && fab.getBoundingClientRect();
|
|
266
|
+
const fab = document.querySelector('#czFab'), fr = fab && fab.getBoundingClientRect(), rl = document.querySelector('#czMenu.ev-rail');
|
|
266
267
|
const c = document.querySelector('#czViewer .iv-tel').getBoundingClientRect();
|
|
267
|
-
return { font: cs('body').fontFamily, cta: (cs('#czViewer .iv-go') || {}).backgroundColor, ctaAlt: !document.querySelector('#czViewer .iv-go'), solid: tok('--cz-solid'), blue: tok('--cz-blue'), well: tok('--cz-well'), card: tok('--cz-card'), box: cs('#czViewer .iv-mc').backgroundColor, rad: parseFloat(cs(innerWidth <= 760 ? '#czViewer .iv-tel' : '#czViewer .iv-mc').borderTopLeftRadius), fab: fr ? [Math.round(fr.width), Math.round(fr.height)] : null, over: document.documentElement.scrollWidth - innerWidth, cardW: Math.round(c.width) };
|
|
268
|
+
return { font: cs('body').fontFamily, cta: (cs('#czViewer .iv-go') || {}).backgroundColor, ctaAlt: !document.querySelector('#czViewer .iv-go'), solid: tok('--cz-solid'), blue: tok('--cz-blue'), well: tok('--cz-well'), card: tok('--cz-card'), box: cs('#czViewer .iv-mc').backgroundColor, rad: parseFloat(cs(innerWidth <= 760 ? '#czViewer .iv-tel' : '#czViewer .iv-mc').borderTopLeftRadius), fab: fr ? [Math.round(fr.width), Math.round(fr.height)] : null, rail: rl ? Math.round(rl.getBoundingClientRect().width) : 0, over: document.documentElement.scrollWidth - innerWidth, cardW: Math.round(c.width) };
|
|
268
269
|
});
|
|
269
270
|
const d = [];
|
|
270
271
|
if (!/^"?Plus Jakarta Sans/.test(g.font)) d.push('font ' + g.font);
|
|
@@ -273,7 +274,7 @@ const WRITES = /^\/api\/(?:boards\/(?:move|tasks\/(?:add|state))|lifecycle|core-
|
|
|
273
274
|
// a phone has no wrapper card (batch 23 item 5, canvas PmA): the mission is the first card there
|
|
274
275
|
if (g.rad < 12) d.push('card radius ' + g.rad);
|
|
275
276
|
// on a phone the initiative's page is the Viewer, full screen over the list: the floating menu waits under it (HbCPhone)
|
|
276
|
-
if (w > 760 && (!g.
|
|
277
|
+
if (w > 760 && (!g.rail || g.rail !== 72)) d.push('rail ' + JSON.stringify(g.rail)); // a desktop: the rail of places, 72 px (slice 1)
|
|
277
278
|
if (g.over > 0) d.push('sideways scroll ' + g.over);
|
|
278
279
|
ok(`I12 the initiative follows the Agreed design at ${w} px, ${th}: Plus Jakarta Sans, the cozy card, the CTA, the floating menu`, d.length === 0, d.join(' ; '));
|
|
279
280
|
ok(`I12 no page error at ${w} px, ${th}`, R.errors.length === 0, R.errors.join(' | '));
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* L Library and the reader · W New goal · I empty, failed, floors, fidelity · E the real routes
|
|
13
13
|
* Every wait polls the page; no fixed sleep stands in for a state, except the short settles after a press. */
|
|
14
14
|
const fs = require('fs');
|
|
15
|
+
const { classicBoard } = require('./lib/classic-board'); // these checks are about the four Board views, not Work (work-one-view)
|
|
15
16
|
const os = require('os');
|
|
16
17
|
const path = require('path');
|
|
17
18
|
const { spawn } = require('child_process');
|
|
@@ -60,7 +61,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
60
61
|
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
61
62
|
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
62
63
|
await T.waitForServer(BASE);
|
|
63
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
64
|
+
browser = classicBoard(await chromium.launch({ executablePath: exe }));
|
|
64
65
|
|
|
65
66
|
const open = async ({ w = 1440, h = 900, theme = 'light', model = mk(), answers = null, bm = BMR, q = '', pick = null } = {}) => {
|
|
66
67
|
const ctx = await browser.newContext({ viewport: { width: w, height: h } });
|
|
@@ -95,18 +96,18 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
95
96
|
const txt = (s, pg = p) => pg.evaluate((q) => (document.querySelector(q) || {}).textContent || '', s);
|
|
96
97
|
|
|
97
98
|
/* N: the place menu, no page header, nothing old */
|
|
98
|
-
const nav = await p.evaluate(() => ({
|
|
99
|
-
ok('N1
|
|
100
|
-
{
|
|
101
|
-
ok('N1 the
|
|
99
|
+
const nav = await p.evaluate(() => ({ rails: document.querySelectorAll('#czMenu.ev-rail:not([hidden])').length, fab: getComputedStyle(document.querySelector('#czFab')).display, rail: document.querySelector('nav.rail') ? getComputedStyle(document.querySelector('nav.rail')).display : 'gone', name: document.querySelector('#prodPick').getAttribute('aria-label'), chip: document.querySelector('#prodPick .ppk-nmc') ? document.querySelector('#prodPick .ppk-nmc').textContent.trim() : '', left: Math.round(document.querySelector('main.ins').getBoundingClientRect().left) }));
|
|
100
|
+
ok('N1 the rail of places replaces the floating menu on a desktop (slice 1), the page starts after it, and the product chip names the product in full', nav.rails === 1 && nav.fab === 'none' && nav.rail === 'gone' && nav.name === 'Products: pmos' && nav.chip === 'pmos' && nav.left >= 96, JSON.stringify(nav));
|
|
101
|
+
{ const mn = await p.evaluate(() => ({ links: [...document.querySelectorAll('#czMenu a')].map((a) => a.querySelector('span').textContent + '=' + a.getAttribute('href')), cur: (document.querySelector('#czMenu [aria-current="page"] span') || {}).textContent })); await p.keyboard.press('Escape');
|
|
102
|
+
ok('N1 the rail holds Today, Work and Goals, marks Goals, and stays after Escape', /^Today=\/today\.html,Work=\/premium-board\.html,Goals=\/premium-intelligence\.html(,(Events|Library|Routine)=\/premium-[a-z]+\.html)*$/.test(mn.links.join()) && mn.cur === 'Goals' && await p.evaluate(() => !document.querySelector('#czMenu').hidden), JSON.stringify(mn)); }
|
|
102
103
|
{ const hd = await p.evaluate(() => { const b = document.querySelector('#insBar').getBoundingClientRect(), m = document.querySelector('main.ins').getBoundingClientRect(); return { bar: Math.round(b.top), main: Math.round(m.top), tabs: [...document.querySelectorAll('.ins-tabs [role="tab"]')].map((t) => t.textContent.replace(/\s+\d+$/, '').trim() + ':' + t.getAttribute('aria-selected')).join(), h1: [...document.querySelectorAll('h1')].filter((h) => h.getBoundingClientRect().height > 2).length }; });
|
|
103
104
|
ok('N2 no page header: the panel starts at the top with one bar, and Intelligence is one page with no tabs (batch 15 item 1)', hd.main <= 20 && hd.bar - hd.main <= 24 && hd.h1 === 0 && hd.tabs === '' && await p.evaluate(() => document.title === 'PMOS · Intelligence'), JSON.stringify(hd)); }
|
|
104
105
|
ok('N1 nothing on the page links to the console or the Chat page (premium-agreed-design)', await p.evaluate(() => !document.querySelector('#toConsole, a[href*="console.html"], a[href*="premium-chat"]')));
|
|
105
106
|
ok('N2 the old parts are gone: no charts card, no About footer, no help button, no bell, no Library composer', await p.evaluate(() => !document.querySelector('#dashBody, #cDash, #foot, #helpB, #helpPop, .tb-bell, [data-tb="bell"], #repAsk, #repAskIn, #repFold, #listNew, #snap')));
|
|
106
107
|
ok('I1 the page is served at /premium-intelligence and .html, and the old /premium-insights and .html still serve it', (await Promise.all(['/premium-intelligence', '/premium-intelligence.html', '/premium-insights', '/premium-insights.html'].map(async (u) => { const r = await fetch(BASE + u); return r.status === 200 && /PMOS · Intelligence/.test(await r.text()); }))).every(Boolean));
|
|
107
|
-
for (const [go, re] of [['
|
|
108
|
-
const r2 = await open(); await r2.page.
|
|
109
|
-
ok(`N1 the
|
|
108
|
+
for (const [go, re] of [['Today', /\/today\.html$/], ['Work', /\/premium-board\.html$/]]) {
|
|
109
|
+
const r2 = await open(); await r2.page.locator('#czMenu a', { hasText: go }).click();
|
|
110
|
+
ok(`N1 the rail's ${go} opens its page`, await until(() => re.test(r2.page.url()), 5000), r2.page.url());
|
|
110
111
|
await r2.ctx.close();
|
|
111
112
|
}
|
|
112
113
|
|
|
@@ -563,7 +564,7 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
563
564
|
await q.route('**/api/insights-premium?ws=w2*', (r) => { asked.push(r.request().url()); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: other }) }); });
|
|
564
565
|
await q.reload(); // the route above answers the second product from the first read on
|
|
565
566
|
const pf = await until(async () => { const x = await q.evaluate(() => ({ chip: (document.querySelector('#prodPick') || { getAttribute: () => '' }).getAttribute('aria-label'), all: (document.querySelector('#prodPick .ppk-all') || {}).textContent, groups: [...document.querySelectorAll('#goalTbl .ins-grp')].map((g) => g.querySelector('[role="cell"]').textContent), rows: document.querySelectorAll('#goalTbl [data-goal]').length, brief: document.querySelector('#brief').textContent, budgets: document.querySelectorAll('#goalTbl [data-budget]').length })); return x.groups.includes('Billing') ? x : null; }, 8000);
|
|
566
|
-
ok('M1 two products ticked (the chip says All; the ✦ line sums All products, redesign A): Portfolio reads the other product once and groups every goal by product; budgets stay with their product', !!pf && pf.chip === 'Products: all 2' && pf.all
|
|
567
|
+
ok('M1 two products ticked (the chip says All; the ✦ line sums All products, redesign A): Portfolio reads the other product once and groups every goal by product; budgets stay with their product', !!pf && pf.chip === 'Products: all 2' && /^All( products)?$/.test(pf.all) && pf.groups.slice(0, 2).join() === 'pmos,Billing' && pf.rows === 6 && /^Across your 2 products/.test(pf.brief) && pf.budgets === 0 && asked.length === 1, JSON.stringify(pf));
|
|
567
568
|
await q.click('#prodPick'); const pm = await q.evaluate(() => [...document.querySelectorAll('#ppMenu [data-pp]')].map((b) => b.querySelector('b').textContent + ':' + ((b.querySelector('em') || {}).textContent || '') + ':' + b.getAttribute('aria-checked')).join());
|
|
568
569
|
ok('M1 the list counts each product\'s goals and ticks both', pm === 'All products::true,pmos:5 goals:true,Billing:1 goal:true', pm);
|
|
569
570
|
await q.keyboard.press('Escape');
|
|
@@ -600,9 +601,9 @@ const BMR = { ok: true, state: 'ready', model: { tiles: [
|
|
|
600
601
|
for (const [w, h] of [[1440, 900], [390, 844]]) {
|
|
601
602
|
const R = await open({ w, h }); await sleep(300);
|
|
602
603
|
const f = await R.page.evaluate(() => { const cs = (s) => getComputedStyle(document.querySelector(s)); const main = cs('main.ins'), tab = cs('#viewChip'), strip = cs('#insHero'), row = document.querySelector('#goalTbl .ins-row').getBoundingClientRect();
|
|
603
|
-
return { font: cs('body').fontFamily, radius: main.borderTopLeftRadius, bg: main.backgroundColor, tabBg: tab.backgroundColor, tabR: tab.borderTopLeftRadius, tabW: tab.fontWeight, stripR: strip.borderTopLeftRadius, stripBg: strip.backgroundColor, rowH: Math.round(row.height), over: document.documentElement.scrollWidth > innerWidth, fab: document.querySelector('#czFab').getBoundingClientRect().width, fabX: Math.round(document.querySelector('#czFab').getBoundingClientRect().left) }; });
|
|
604
|
+
return { font: cs('body').fontFamily, radius: main.borderTopLeftRadius, bg: main.backgroundColor, tabBg: tab.backgroundColor, tabR: tab.borderTopLeftRadius, tabW: tab.fontWeight, stripR: strip.borderTopLeftRadius, stripBg: strip.backgroundColor, rowH: Math.round(row.height), over: document.documentElement.scrollWidth > innerWidth, fab: document.querySelector('#czFab').getBoundingClientRect().width, rail: document.querySelector('#czMenu.ev-rail') ? Math.round(document.querySelector('#czMenu.ev-rail').getBoundingClientRect().width) : 0, fabX: Math.round(document.querySelector('#czFab').getBoundingClientRect().left) }; });
|
|
604
605
|
const phone = w < 720;
|
|
605
|
-
ok(`I11 the page wears the Agreed design at ${w} px: Plus Jakarta Sans, the white panel, the pill View chip, the well strip, 56 px floating button`, /^"?Plus Jakarta Sans/.test(f.font) && f.radius === (phone ? '0px' : '28px') && (phone || f.bg === 'rgb(255, 255, 255)') && f.tabBg === 'rgb(244, 243, 240)' && f.tabR === '999px' && +f.tabW >= 600 && (phone || (f.stripR === '16px' && f.stripBg === 'rgb(244, 243, 240)' && f.rowH >= 60)) && !f.over && f.fab === 56 &&
|
|
606
|
+
ok(`I11 the page wears the Agreed design at ${w} px: Plus Jakarta Sans, the white panel, the pill View chip, the well strip, 56 px floating button on a phone, the 72 px rail of places on a desktop (slice 1)`, /^"?Plus Jakarta Sans/.test(f.font) && f.radius === (phone ? '0px' : '28px') && (phone || f.bg === 'rgb(255, 255, 255)') && f.tabBg === 'rgb(244, 243, 240)' && f.tabR === '999px' && +f.tabW >= 600 && (phone || (f.stripR === '16px' && f.stripBg === 'rgb(244, 243, 240)' && f.rowH >= 60)) && !f.over && (phone ? f.fab === 56 && f.fabX > 300 : f.rail === 72), JSON.stringify(f));
|
|
606
607
|
if (!phone) {
|
|
607
608
|
await toTrends(R.page);
|
|
608
609
|
const t = await R.page.evaluate(() => { const tiles = [...document.querySelectorAll('#bmBody [data-tile]')].map((x) => x.getBoundingClientRect()); return { n: tiles.length, tileH: tiles.length ? Math.round(tiles[0].height) : 0, over: document.documentElement.scrollWidth > innerWidth }; });
|
|
@@ -87,7 +87,9 @@ const product = (name, cond) => {
|
|
|
87
87
|
return { ctx, page, errors };
|
|
88
88
|
};
|
|
89
89
|
// the picker: the chip by Good morning opens the list; ticks reads its tick boxes, close presses Escape (the pick applies then)
|
|
90
|
-
|
|
90
|
+
// six-place navigation: on a desktop the product choice shows on Work and Goals only, so Today's chip is hidden there. Today still reads the
|
|
91
|
+
// one shared pick, and this suite checks that through the same picker: it shows the hidden chip for the test only.
|
|
92
|
+
const pick = async (page) => { await page.addStyleTag({ content: 'body.cz-railon.cz-home #hmPick { display: inline-flex !important; }' }); if (!(await page.$('#ppMenu'))) { await page.waitForSelector('#hmPick', { timeout: 20000 }); await page.click('#hmPick'); await page.waitForSelector('#ppMenu', { timeout: 10000 }); } };
|
|
91
93
|
const ticks = (page) => page.$$eval('#ppMenu [data-pp]', (els) => els.map((e) => e.dataset.pp + ':' + e.getAttribute('aria-checked')));
|
|
92
94
|
const tick = (page, ws) => page.click(`#ppMenu [data-pp="${ws}"]`);
|
|
93
95
|
const setting = async () => (await json('GET', '/api/settings')).body.settings.find((x) => x.key === 'ws.briefing.include');
|
|
@@ -199,7 +201,7 @@ const product = (name, cond) => {
|
|
|
199
201
|
// the narrowed view (P12): the one-workspace page, with a way back
|
|
200
202
|
const before = JSON.stringify(((await setting()) || {}).value);
|
|
201
203
|
const { ctx, page } = await open({ q: '?ws=' + encodeURIComponent(wB.id) });
|
|
202
|
-
await page.waitForSelector('#hmPick', { timeout: 20000 });
|
|
204
|
+
await page.waitForSelector('#hmPick', { state: 'attached', timeout: 20000 });
|
|
203
205
|
ok('P12 ?ws= shows that one workspace on the chip and leaves the saved pick alone', /microsites$/.test(await page.getAttribute('#hmPick', 'aria-label')) && JSON.stringify(((await setting()) || {}).value) === before, await page.getAttribute('#hmPick', 'aria-label'));
|
|
204
206
|
await ctx.close();
|
|
205
207
|
}
|
|
@@ -25,7 +25,7 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
|
25
25
|
const moreItem = async (pg, label, sel) => {
|
|
26
26
|
if (await pg.isVisible('#czViewer')) { await pg.keyboard.press('Escape'); }
|
|
27
27
|
if (label === 'Sources') {
|
|
28
|
-
await pg.click('#czFab'); await pg.click('#czMenu [data-cz-settings]'); await pg.waitForSelector('#evSettings:not([hidden])');
|
|
28
|
+
if (await pg.isVisible('#czFab')) await pg.click('#czFab'); await pg.click('#czMenu [data-cz-settings]'); await pg.waitForSelector('#evSettings:not([hidden])');
|
|
29
29
|
if (!(await pg.$('#evSettings [data-ev-sec="connectors"][aria-current="page"]'))) await pg.click('#evSettings [data-ev-sec="connectors"]');
|
|
30
30
|
await pg.waitForSelector('#evSettings ' + sel, { timeout: 15000 });
|
|
31
31
|
return;
|