create-pmos 0.402.0 → 0.403.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -13
- 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-programs-test.js +6 -5
- package/workspace/briefing-premium-adddoc-test.js +28 -22
- package/workspace/briefing-premium-board-test.js +91 -73
- package/workspace/briefing-premium-calendar-2-test.js +23 -10
- package/workspace/briefing-premium-calendar-3-test.js +23 -19
- package/workspace/briefing-premium-calendar-test.js +19 -17
- package/workspace/briefing-premium-initiative-test.js +25 -12
- package/workspace/briefing-premium-insights-test.js +31 -18
- package/workspace/briefing-premium-metrics-test.js +8 -8
- package/workspace/briefing-premium-test.js +4 -3
- package/workspace/changelog.json +12 -0
- package/workspace/fixtures/premium-viewer-fixtures.js +24 -2
- package/workspace/guide/jira.md +38 -6
- package/workspace/home-rows-test.js +184 -0
- package/workspace/lib/calendar-layers.js +8 -4
- package/workspace/lib/initiative-layout.js +4 -3
- package/workspace/lib/jira-cli.js +17 -12
- package/workspace/lib/jira-status.js +1 -1
- package/workspace/lib/jira-tickets.js +126 -24
- package/workspace/lib/meeting-files.js +58 -0
- package/workspace/lib/meeting-learn.js +139 -0
- package/workspace/lib/meeting-material.js +12 -5
- package/workspace/lib/notes.js +3 -0
- package/workspace/lib/routes-brief-page.js +8 -1
- package/workspace/lib/routes-calendar-views.js +24 -3
- package/workspace/lib/routes-meeting-material.js +38 -0
- package/workspace/lib/routes-meeting-points.js +23 -3
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +30 -24
- package/workspace/premium-chat-context-test.js +1 -1
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-viewer-test.js +1 -1
- package/workspace/premium-core-doc-issue-test.js +13 -7
- package/workspace/premium-discuss-landing-test.js +83 -0
- package/workspace/premium-link-suggest-test.js +103 -0
- package/workspace/premium-report-read-test.js +86 -82
- package/workspace/premium-vw-backlog-test.js +6 -5
- package/workspace/premium-vw-cal-test.js +46 -23
- package/workspace/premium-vw-item-test.js +8 -6
- package/workspace/premium-vw-jira-test.js +3 -2
- package/workspace/premium-vw-meet-test.js +122 -66
- package/workspace/premium-vw-notes-test.js +7 -6
- package/workspace/premium-vw-rec-test.js +14 -13
- package/workspace/premium-vw-slides-test.js +11 -5
- package/workspace/program-panel-test.js +64 -55
- package/workspace/public/pm/bd-acts.js +1 -1
- package/workspace/public/pm/bd-asks.js +22 -7
- package/workspace/public/pm/bd-ini-panel.js +229 -0
- package/workspace/public/pm/bd-pop.js +2 -2
- package/workspace/public/pm/bd-prog-panel.js +176 -191
- package/workspace/public/pm/cozy-board.css +5 -28
- package/workspace/public/pm/cozy-evui.js +4 -2
- package/workspace/public/pm/cozy-home-rows.css +54 -0
- package/workspace/public/pm/cozy-home.css +9 -0
- package/workspace/public/pm/cozy-insights.css +1 -2
- package/workspace/public/pm/cozy-mtg-present.css +160 -0
- package/workspace/public/pm/cozy-panel.css +11 -34
- package/workspace/public/pm/cozy-rec-pill.css +12 -0
- package/workspace/public/pm/cozy-rec-pill.js +46 -0
- package/workspace/public/pm/cozy-viewer.js +307 -43
- package/workspace/public/pm/cozy-vw-mtg.css +96 -94
- package/workspace/public/pm/cozy-vw-rp.css +40 -25
- package/workspace/public/pm/cozy-vw-shell.css +127 -0
- package/workspace/public/pm/cozy-xv.css +51 -0
- package/workspace/public/pm/cozy-xv.js +34 -0
- package/workspace/public/pm/home-app.js +122 -58
- package/workspace/public/pm/home-chat.js +11 -2
- package/workspace/public/pm/home-day.js +64 -0
- package/workspace/public/pm/home-ini-model.js +1 -1
- package/workspace/public/pm/home-ini.js +197 -54
- package/workspace/public/pm/home-list.js +6 -14
- package/workspace/public/pm/home-mentions.js +187 -0
- package/workspace/public/pm/home-rec-row.js +67 -0
- package/workspace/public/pm/home-review.js +20 -10
- package/workspace/public/pm/home-task.js +19 -18
- package/workspace/public/pm/home-today.js +3 -3
- package/workspace/public/pm/premium-board.js +73 -235
- package/workspace/public/pm/premium-insights.js +118 -82
- package/workspace/public/pm/premium-mtg-present.js +408 -100
- package/workspace/public/pm/premium-mtg-replay.js +70 -10
- package/workspace/public/pm/premium-report-read.js +118 -63
- package/workspace/public/pm/premium-vw-cal.js +62 -34
- package/workspace/public/pm/premium-vw-mtg.js +348 -192
- package/workspace/public/pm/rec-state.js +63 -0
- package/workspace/public/pm/rp-parts.js +33 -8
- package/workspace/public/pm/tk-draft.js +107 -0
- package/workspace/public/pm/tk-model.js +134 -0
- package/workspace/public/pm/tk-send.js +124 -0
- package/workspace/public/pm/tk-tasks.css +120 -0
- package/workspace/public/premium-board.html +0 -1
- package/workspace/server.js +4 -2
- package/workspace/skills/jira-push.skill +3 -3
- package/workspace/test-lists/prd-to-jira.json +6 -0
- package/workspace/test-lists/viewer-home-rows.json +9 -0
- package/workspace/test-lists/viewer-meetings.json +9 -0
- package/workspace/test-lists/viewer-shell-a.json +15 -0
- package/workspace/tk-tasks-test.js +199 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.403.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,18 @@
|
|
|
32
32
|
"audit"
|
|
33
33
|
],
|
|
34
34
|
"pmosChanges": [
|
|
35
|
+
{
|
|
36
|
+
"v": "0.403.0",
|
|
37
|
+
"at": "2026-10-24T03:40:15.576Z",
|
|
38
|
+
"f": 2,
|
|
39
|
+
"prs": [
|
|
40
|
+
{
|
|
41
|
+
"n": 1033,
|
|
42
|
+
"t": "Viewer shell A, Home rows, meetings, reports and PRD to Jira (second kit)",
|
|
43
|
+
"s": "Viewer shell A, Home rows, meetings, reports and PRD to Jira (second kit)"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
"v": "0.402.0",
|
|
37
49
|
"at": "2026-10-24T03:05:59.743Z",
|
|
@@ -279,18 +291,6 @@
|
|
|
279
291
|
"s": "Claude's stored lead shows first in a popup, with Refresh"
|
|
280
292
|
}
|
|
281
293
|
]
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
"v": "0.383.0",
|
|
285
|
-
"at": "2026-10-21T13:13:17.082Z",
|
|
286
|
-
"f": 2,
|
|
287
|
-
"prs": [
|
|
288
|
-
{
|
|
289
|
-
"n": 994,
|
|
290
|
-
"t": "Share a viewer file as a password link that needs no Cloudflare login",
|
|
291
|
-
"s": "Share a viewer file as a password link that needs no Cloudflare login"
|
|
292
|
-
}
|
|
293
|
-
]
|
|
294
294
|
}
|
|
295
295
|
]
|
|
296
296
|
}
|
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-24T03:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-24T03:40:12Z"}
|
|
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-24T03:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-24T03:40:12Z"}
|
|
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-24T03:
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-10-24T03:40:12Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -81,8 +81,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
81
81
|
ok('G there is no "Not in a program" group, and Programs first draws no grouping chip (the choice lives in Filter)', !/Not in a program/.test(tr.text) && tr.grp);
|
|
82
82
|
|
|
83
83
|
await p.click('#ibBody .bt-pg [data-prog]');
|
|
84
|
-
ok('O pressing the band dispatches bd:program with the program id and opens no initiative panel', (await events(p)).join() === 'project-ascent' && await p.evaluate(() =>
|
|
85
|
-
await p.keyboard.press('Escape'); await p.waitForFunction(() => { const
|
|
84
|
+
ok('O pressing the band dispatches bd:program with the program id and opens no initiative panel', (await events(p)).join() === 'project-ascent' && await p.evaluate(() => !/Initiative/.test(((window.czViewer && window.czViewer.current()) || {}).kind || '')), JSON.stringify(await events(p)));
|
|
85
|
+
await p.keyboard.press('Escape'); await p.waitForFunction(() => { const v = document.querySelector('#czViewer'); return !v || v.hidden; });
|
|
86
86
|
|
|
87
87
|
await p.click('#ibBody .bt-pg [data-fold]');
|
|
88
88
|
const f1 = await p.evaluate(() => ({ kids: document.querySelectorAll('#ibBody .bt-kid').length, band: !!document.querySelector('#ibBody .bt-pg'), exp: document.querySelector('#ibBody .bt-pg [data-fold]').getAttribute('aria-expanded'), st: localStorage.getItem('pmos.board.fold') }));
|
|
@@ -138,7 +138,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
138
138
|
await p.click('#ibBody .bd-lh.pd [data-fold]');
|
|
139
139
|
ok('K a product lane folds to its head', await p.evaluate(() => [...document.querySelectorAll('#ibBody .bd-kc .bd-bc .t')].every((b) => b.textContent !== 'Usage-based billing') && !!document.querySelector('#ibBody .bd-lh.pd')));
|
|
140
140
|
await p.click('#ibBody .bd-lh.pg [data-prog]');
|
|
141
|
-
ok('O pressing the program swimlane dispatches bd:program and nothing else', (await events(p)).join() === 'project-ascent' && await p.evaluate(() =>
|
|
141
|
+
ok('O pressing the program swimlane dispatches bd:program and nothing else', (await events(p)).join() === 'project-ascent' && await p.evaluate(() => !/Initiative/.test(((window.czViewer && window.czViewer.current()) || {}).kind || '')));
|
|
142
142
|
ok('the Kanban threw nothing', !errors.length, errors.join('\n'));
|
|
143
143
|
await ctx.close();
|
|
144
144
|
}
|
|
@@ -161,9 +161,10 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
161
161
|
ok('T the program\'s initiatives sit under it as one-line rows: a status dot and the name', t.kids.join() === 'Legacy IdP sunset,Descope feature parity' && t.oneLine, JSON.stringify(t));
|
|
162
162
|
ok('T a legend in the chip row names done, planned, the program milestone, Deliver or Evaluate and today', /Done in Jira/.test(t.lgd) && /Planned/.test(t.lgd) && /Program milestone/.test(t.lgd) && /Deliver or Evaluate/.test(t.lgd) && /Today/.test(t.lgd), t.lgd);
|
|
163
163
|
await p.click('#ibBody .tg-pg .tg-pgo');
|
|
164
|
-
|
|
164
|
+
// the program opens in the floating Viewer (shell A), which sits over the right of the timeline; close it before the next press
|
|
165
|
+
await p.keyboard.press('Escape'); await p.waitForFunction(() => { const v = document.querySelector('#czViewer'); return !v || v.hidden; });
|
|
165
166
|
await p.click('#ibBody .tg-pg .tg-clu');
|
|
166
|
-
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(() =>
|
|
167
|
+
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 || '')));
|
|
167
168
|
ok('the timeline threw nothing', !errors.length, errors.join('\n'));
|
|
168
169
|
await ctx.close();
|
|
169
170
|
}
|
|
@@ -35,7 +35,7 @@ const CUSTOM = [
|
|
|
35
35
|
const PAGES = {
|
|
36
36
|
board: { file: '/premium-board.html', api: '**/api/board-premium*', scope: 'board:w1', mk: (custom) => BP.build(BF.facts({ custom })), ready: '#ibBody .ini2', btn: '#addDoc', qs: '?theme=' },
|
|
37
37
|
// the initiative is a layout inside Home (premium-agreed-design): Add a document is in its Overview, a minimal form in the Viewer (Waiting for design)
|
|
38
|
-
initiative: { file: '/premium.html', api: '**/api/initiative-premium*', scope: 'initiative:self-serve-v2', mk: (custom) => IP.build(IF.facts({ custom })), ready: '.hm-card [data-hm-ov]', btn: '#czViewer [data-
|
|
38
|
+
initiative: { file: '/premium.html', api: '**/api/initiative-premium*', scope: 'initiative:self-serve-v2', mk: (custom) => IP.build(IF.facts({ custom })), ready: '.hm-card [data-hm-ov]', btn: '#czViewer [data-hi-v="docs"]', qs: '?ini=self-serve-v2&ws=w1&board=w1&theme=' },
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
(async () => {
|
|
@@ -64,8 +64,11 @@ const PAGES = {
|
|
|
64
64
|
return { ctx, page, errors, posts, up, calls: () => calls, setCustom: (c) => { current = c; }, reply: (a) => { reply = a; } };
|
|
65
65
|
};
|
|
66
66
|
const txt = (p, s) => p.evaluate((q) => (document.querySelector(q) || {}).textContent || '', s);
|
|
67
|
+
const viaMore = async (pg, label) => { await pg.click('#czViewer:not([hidden]) [data-cz-vw="more"]'); await until(() => pg.evaluate(() => !!document.querySelector('#czViewer .cz-vw-menu'))); await pg.click(`#czViewer .cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("${label}"))`); }; // the Overview's other views, Open the full record and Sprint sit under ⋯ (XvATasks)
|
|
67
68
|
// the Overview opens on Tasks; Add a document is on its Documents view (premium-uncovered-features, canvas InDocs)
|
|
68
|
-
|
|
69
|
+
// Documents is shell A (XvADocs): Add a document is under its ⋯, with Group by and Show
|
|
70
|
+
async function addDoc(page) { await page.click('#czViewer [data-cz-vw="more"]'); await page.click('#czViewer .cz-vw-menu button:has-text("Add a document")'); }
|
|
71
|
+
async function docsView(page) { if (await until(() => page.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 20000)) await (async (pg) => { if (await pg.$('#czViewer [data-hi-view="docs"]')) await pg.click('#czViewer [data-hi-view="docs"]'); else await viaMore(pg, 'Documents'); })(page); }
|
|
69
72
|
|
|
70
73
|
/* the Board (premium-uncovered-features, BdDocs): the Documents tab is a table with an Add a document form in the side panel;
|
|
71
74
|
the same route, the same fields, the same refusals */
|
|
@@ -75,37 +78,37 @@ const PAGES = {
|
|
|
75
78
|
if (!A.up) return finish(1);
|
|
76
79
|
ok('board A1 the Documents tab has an Add a document button', await p.evaluate(() => { const b = document.querySelector('#docBody #addDoc'); return !!b && b.textContent === 'Add a document'; }));
|
|
77
80
|
await p.click('#addDoc');
|
|
78
|
-
const form = await until(() => p.evaluate(() => { const f = document.querySelector('#
|
|
81
|
+
const form = await until(() => p.evaluate(() => { const f = document.querySelector('#czViewer form[data-form="adddoc"]'); return f ? { title: document.querySelector('#czViewer .cz-vw-title').textContent, seg: [...f.querySelectorAll('.bd-rad span')].map((x) => x.textContent), kinds: [...f.kind.options].map((o) => o.textContent), uOff: f.url.disabled, note: f.querySelector('.bd-amut').textContent, dlg: !!document.querySelector('#dlg.on') } : null; }));
|
|
79
82
|
ok('board A1 the side panel has the dialog\'s fields, and the old dialog stays shut', !!form && form.title === 'Add a document' && form.seg.join() === 'PMOS drafts it,I write it' && form.kinds.join() === 'In PMOS,Confluence,Google Docs,Google Slides' && form.uOff && !form.dlg, JSON.stringify(form));
|
|
80
83
|
ok('board A7 it says the document is saved and the linked page is not read', !!form && /saved on the board's record/.test(form.note) && /does not read or sync/.test(form.note), form && form.note);
|
|
81
|
-
const go = '#
|
|
84
|
+
const go = '#czViewer form[data-form="adddoc"] [type="submit"]';
|
|
82
85
|
await p.click(go); await sleep(120);
|
|
83
86
|
ok('board A4 an empty title is refused in the panel and posts nothing', /Give the document a title/.test(await txt(p, '#formM')) && A.posts.length === 0);
|
|
84
|
-
await p.fill('#
|
|
85
|
-
ok('board A1 the address field opens for a link kind', await p.evaluate(() => !document.querySelector('#
|
|
87
|
+
await p.fill('#czViewer input[name="title"]', 'UAT plan'); await p.selectOption('#czViewer select[name="kind"]', 'Confluence');
|
|
88
|
+
ok('board A1 the address field opens for a link kind', await p.evaluate(() => !document.querySelector('#czViewer input[name="url"]').disabled));
|
|
86
89
|
await p.click(go); await sleep(120);
|
|
87
90
|
ok('board A4 a link kind with no address is refused in the panel and posts nothing', /Paste the address of the Confluence page/.test(await txt(p, '#formM')) && A.posts.length === 0);
|
|
88
91
|
A.reply({ status: 409, body: { ok: false, error: '“UAT plan” is already on this board.' } });
|
|
89
|
-
await p.fill('#
|
|
90
|
-
ok('board A4 a refusal from the route is shown in the panel, which stays open', /already on this/.test(await txt(p, '#formM')) && await p.evaluate((g) => !document.querySelector('#
|
|
92
|
+
await p.fill('#czViewer input[name="url"]', 'https://example.atlassian.net/wiki/x'); await p.click(go); await sleep(300);
|
|
93
|
+
ok('board A4 a refusal from the route is shown in the panel, which stays open', /already on this/.test(await txt(p, '#formM')) && await p.evaluate((g) => !document.querySelector('#czViewer').hidden && !document.querySelector(g).disabled, go));
|
|
91
94
|
A.reply({ status: 200, body: { ok: true } }); const calls0 = A.calls();
|
|
92
|
-
await p.check('#
|
|
95
|
+
await p.check('#czViewer input[name="writer"][value="you"]'); await p.click(go); await sleep(500);
|
|
93
96
|
const last = A.posts[A.posts.length - 1], mint = await T.nonce(BASE);
|
|
94
97
|
const want = { ws: 'w1', scope: P.scope, title: 'UAT plan', writer: 'you', kind: 'Confluence', url: 'https://example.atlassian.net/wiki/x' };
|
|
95
98
|
ok('board A3 the press posts the entered fields to the one route, with the launch nonce and no writer field', last && last.path === '/api/custom-docs/add' && JSON.stringify(Object.keys(last.body).sort()) === JSON.stringify(Object.keys(want).sort()) && Object.keys(want).every((k) => last.body[k] === want[k] || k === 'ws') && !!mint && last.headers['x-pmos-nonce'] === mint && !['by', 'via', 'at', 'actor', 'pm', 'nonce'].some((k) => k in last.body), JSON.stringify(last && last.body));
|
|
96
99
|
ok('board A3 nothing else was posted', A.posts.every((x) => x.path === '/api/custom-docs/add'));
|
|
97
|
-
ok('board A1 the panel closes, the page reads again and says it was added', A.calls() > calls0 && await p.evaluate(() => document.querySelector('#
|
|
100
|
+
ok('board A1 the panel closes, the page reads again and says it was added', A.calls() > calls0 && await p.evaluate(() => document.querySelector('#czViewer').hidden && /is added to the board's documents/.test(document.querySelector('#bdToast').textContent)));
|
|
98
101
|
A.setCustom(CUSTOM); await p.reload(); await until(() => p.evaluate((s) => !!document.querySelector(s), P.ready), 20000); await p.click('#tabDocs'); await sleep(300);
|
|
99
102
|
const rows = await p.evaluate(() => [...document.querySelectorAll('#docBody .bd-dt[data-docrow]')].map((r) => { const c = r.querySelectorAll('[role="cell"]'); return { id: r.dataset.docrow, t: r.querySelector('[data-opendoc]').textContent, s: c[1].textContent, when: c[2].textContent, by: c[3].textContent, btn: r.querySelectorAll('button').length }; }));
|
|
100
103
|
const uat = rows.find((r) => r.t === 'UAT plan'), con = rows.find((r) => r.t === 'Contract');
|
|
101
104
|
ok('board A5 an unlinked document reads Not started with the date it was added, who writes it, and no press but its title', uat && uat.s === 'Not started' && /18 Oct/.test(uat.when) && /You write it/.test(uat.by) && uat.btn === 1, JSON.stringify(uat));
|
|
102
105
|
ok('board A5 a linked document reads Linked and has no press but its title', con && con.s === 'Linked' && con.btn === 1, JSON.stringify(con));
|
|
103
106
|
await p.click(`#docBody [data-opendoc="${con.id}"]`);
|
|
104
|
-
ok('board A5 a linked document opens with its address as text', await until(() => p.evaluate(() => { const o = document.querySelector('#
|
|
107
|
+
ok('board A5 a linked document opens with its address as text', await until(() => p.evaluate(() => { const o = document.querySelector('#czViewer'); return !o.hidden && /Lives in Confluence: https:\/\/example\.atlassian\.net/.test(o.textContent) && !o.querySelector('a[href^="https://example"]'); })), await txt(p, '#czViewer'));
|
|
105
108
|
ok('board no page error', A.errors.length === 0, A.errors.join(' | '));
|
|
106
109
|
await A.ctx.close();
|
|
107
110
|
const N = await open('board', { w: 390, h: 844 }); await N.page.click('#addDoc'); await sleep(300);
|
|
108
|
-
const fl = await N.page.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1, add: Math.round(document.querySelector('#addDoc').getBoundingClientRect().height), go: Math.round(document.querySelector('#
|
|
111
|
+
const fl = await N.page.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1, add: Math.round(document.querySelector('#addDoc').getBoundingClientRect().height), go: Math.round(document.querySelector('#czViewer form[data-form="adddoc"] [type="submit"]').getBoundingClientRect().height) }));
|
|
109
112
|
ok('board A8 at 390 px no sideways scroll with the form open, and its buttons are 44 px', !fl.over && fl.add >= 44 && fl.go >= 44, JSON.stringify(fl));
|
|
110
113
|
await N.ctx.close();
|
|
111
114
|
}
|
|
@@ -117,8 +120,9 @@ const PAGES = {
|
|
|
117
120
|
const dlgShut = () => p.evaluate(() => { const d = document.querySelector('#dlg'); return !d || !d.classList.contains('on'); });
|
|
118
121
|
ok(`${kind} 0 the page draws (Home with the initiative, its Overview open)`, A.up);
|
|
119
122
|
if (!A.up) return finish(1);
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
await p.click('#czViewer [data-cz-vw="more"]');
|
|
124
|
+
ok(`${kind} A1 the Overview's Documents view has Add a document under ⋯`, await p.evaluate(() => [...document.querySelectorAll('#czViewer .cz-vw-menu button')].some((b) => /^Add a document/.test(b.textContent.trim()))));
|
|
125
|
+
await p.click('#czViewer .cz-vw-menu button:has-text("Add a document")'); await until(() => p.evaluate(() => !!document.querySelector('#czViewer #adT')));
|
|
122
126
|
const form = await p.evaluate((V) => ({ open: !!document.querySelector(V + ' #adT'), title: (document.querySelector('#czVwTitle') || {}).textContent || '', wait: !!document.querySelector(V + ' .hx-wait'), phase: !!document.querySelector(V + ' #adPh'), seg: [...document.querySelectorAll(V + ' #adW button')].map((b) => b.textContent), kinds: [...document.querySelectorAll(V + ' #adK option')].map((o) => o.textContent), uOff: document.querySelector(V + ' #adU').disabled, note: (document.querySelector(V + ' [data-ad-note]') || {}).textContent || '' }), F);
|
|
123
127
|
ok(`${kind} A1 the form in the Viewer has the dialog's fields, with no "Waiting for design" tag (premium-uncovered-features), and the old dialog stays shut`, form.open && /^Add a document/.test(form.title) && !form.wait && form.phase === ini && form.seg.join() === 'PMOS drafts it,I write it' && form.kinds.join() === 'In PMOS,Confluence,Google Docs,Google Slides' && form.uOff && await dlgShut(), JSON.stringify(form));
|
|
124
128
|
ok(`${kind} A7 the form says the document is saved and the linked page is not read`, /saved on the (board|initiative)'s record/.test(form.note) && /does not read or sync/.test(form.note), form.note);
|
|
@@ -139,24 +143,25 @@ const PAGES = {
|
|
|
139
143
|
if (ini) want.phase = 'Plan';
|
|
140
144
|
ok(`${kind} A3 the press posts the entered fields to the one route, with the launch nonce and no writer field`, last && last.path === '/api/custom-docs/add' && JSON.stringify(Object.keys(last.body).sort()) === JSON.stringify(Object.keys(want).sort()) && Object.keys(want).every((k) => last.body[k] === want[k] || k === 'ws') && !!mint && last.headers['x-pmos-nonce'] === mint && !['by', 'via', 'at', 'actor', 'pm', 'nonce'].some((k) => k in last.body), JSON.stringify(last && last.body));
|
|
141
145
|
ok(`${kind} A3 nothing else was posted`, A.posts.every((x) => x.path === '/api/custom-docs/add'));
|
|
142
|
-
ok(`${kind} A1 the form closes, the initiative is read again and its Overview comes back`, await until(() => A.calls() > calls0) && await until(() => p.evaluate(() => !document.querySelector('#czViewer #adT') && !!document.querySelector('#czViewer [data-
|
|
146
|
+
ok(`${kind} A1 the form closes, the initiative is read again and its Overview comes back`, await until(() => A.calls() > calls0) && await until(() => p.evaluate(() => !document.querySelector('#czViewer #adT') && !!document.querySelector('#czViewer [data-hi-v="docs"]'))));
|
|
143
147
|
A.setCustom(CUSTOM.map((d) => Object.assign({}, d, { scope: P.scope }))); await p.reload();
|
|
144
148
|
await until(() => p.evaluate((s) => !!document.querySelector(s), P.ready), 20000); await p.click(P.ready); await docsView(p);
|
|
145
149
|
await until(() => p.evaluate(() => !!document.querySelector('#czViewer [data-ov-doc="custom:cd-2"]')), 20000);
|
|
146
150
|
// a row: the title, its state pill, then what it is (when, who writes it, where it lives) and the link as text (InDocs)
|
|
147
|
-
|
|
151
|
+
// shell A (XvADocs): a row is one press, its title then one quiet line (when, who writes it, the state) and the link as text
|
|
152
|
+
const rows = await p.evaluate(() => [...document.querySelectorAll('#czViewer [data-ov-doc]')].map((r) => { const w = r.querySelector('.w') || r, sub = [...w.querySelectorAll(':scope > span')].map((x) => x.textContent); return { t: (w.firstChild && w.firstChild.nodeType === 3 ? w.firstChild.textContent : '').trim(), meta: sub.filter((x) => !/: https?:/.test(x)).join(' · '), small: sub.filter((x) => /: https?:/.test(x)).join(' '), btn: r.querySelectorAll('button:not([disabled]):not([data-ov-none])').length, none: !!r.querySelector('[data-ov-none]') }; })); // a document with no file says so when pressed (testing fixes); it opens nothing
|
|
148
153
|
const uat = rows.find((r) => r.t === 'UAT plan'), con = rows.find((r) => r.t === 'Contract');
|
|
149
|
-
ok(`${kind} A5 an unlinked document reads Not started with the date it was added and no press`, uat &&
|
|
150
|
-
ok(`${kind} A5 a linked document reads Linked, shows its address as text and has no press`, con &&
|
|
154
|
+
ok(`${kind} A5 an unlinked document reads Not started with the date it was added and no press`, uat && /Not started/.test(uat.meta) && /added 18 Oct/.test(uat.meta) && /You write it/.test(uat.meta) && uat.btn === 0 && uat.none, JSON.stringify(uat));
|
|
155
|
+
ok(`${kind} A5 a linked document reads Linked, shows its address as text and has no press`, con && /Linked/.test(con.meta) && /Confluence: https:\/\/example\.atlassian\.net/.test(con.small) && con.btn === 0 && !/Up to date/.test(con.meta), JSON.stringify(con));
|
|
151
156
|
const sum = await txt(p, '#czViewer [data-ov-dsum]');
|
|
152
157
|
ok(`${kind} A5 the summary counts one linked and the up-to-date ones`, /1\s*linked/.test(sum) && /up to date/.test(sum), sum);
|
|
153
158
|
ok(`${kind} A5 a linked document is listed apart from the up-to-date ones (no Up to date on it, no Open press)`, !!con && !/Up to date/.test(con.meta) && con.btn === 0); // the old filter chips are not in the Agreed design
|
|
154
|
-
await p
|
|
159
|
+
await addDoc(p); await until(() => p.evaluate(() => !!document.querySelector('#czViewer #adT')));
|
|
155
160
|
await p.keyboard.press('Escape'); await sleep(250);
|
|
156
161
|
ok(`${kind} A8 Escape closes the form`, await p.evaluate(() => !document.querySelector('#czViewer #adT')));
|
|
157
162
|
ok(`${kind} no page error`, A.errors.length === 0, A.errors.join(' | '));
|
|
158
163
|
await A.ctx.close();
|
|
159
|
-
const N = await open(kind, { w: 390, h: 844 }); await N.page
|
|
164
|
+
const N = await open(kind, { w: 390, h: 844 }); await addDoc(N.page); await until(() => N.page.evaluate(() => !!document.querySelector('#czViewer #adT')));
|
|
160
165
|
const floors = await N.page.evaluate(() => { const h = (s) => Math.round(document.querySelector('#czViewer ' + s).getBoundingClientRect().height); return { go: h('#adGo'), no: h('#adNo'), t: h('#adT'), k: h('#adK'), w: h('#adW button'), fs: getComputedStyle(document.querySelector('#czViewer #adT')).fontSize }; });
|
|
161
166
|
ok(`${kind} A8 at 390 px the presses and fields are at least 44 px and the fields do not zoom the page`, [floors.go, floors.no, floors.t, floors.k, floors.w].every((v) => v >= 44) && parseFloat(floors.fs) >= 16, JSON.stringify(floors));
|
|
162
167
|
ok(`${kind} A8 no sideways scroll at 390 px with the form open`, await N.page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1 && document.querySelector('#czViewer').getBoundingClientRect().right <= innerWidth + 1));
|
|
@@ -187,8 +192,9 @@ const PAGES = {
|
|
|
187
192
|
* the solid colour. The colours are read from the page's own tokens, so a theme is checked against itself. */
|
|
188
193
|
for (const [w, h] of [[1280, 900], [390, 844]]) for (const th of ['light', 'dark']) {
|
|
189
194
|
const R = await open('initiative', { w, h, theme: th });
|
|
190
|
-
|
|
191
|
-
await R.page.
|
|
195
|
+
await R.page.click('#czViewer [data-cz-vw="more"]'); // the press is a ⋯ menu item now (shell A): its font, and the round ⋯ it hangs from
|
|
196
|
+
const btn = await R.page.evaluate(() => { const cs = getComputedStyle(document.querySelector('#czViewer .cz-vw-menu button')), m = getComputedStyle(document.querySelector('#czViewer [data-cz-vw="more"]')); return { ff: cs.fontFamily, br: m.borderRadius }; });
|
|
197
|
+
await R.page.click('#czViewer .cz-vw-menu button:has-text("Add a document")'); await until(() => R.page.evaluate(() => !!document.querySelector('#czViewer #adT')));
|
|
192
198
|
const g = await R.page.evaluate(() => {
|
|
193
199
|
const tok = (v, prop) => { const x = document.createElement('i'); x.style.setProperty(prop, 'var(' + v + ')'); document.querySelector('#czViewer').appendChild(x); const c = getComputedStyle(x)[prop === 'color' ? 'color' : 'backgroundColor']; x.remove(); return c; };
|
|
194
200
|
const cs = (s) => getComputedStyle(document.querySelector(s));
|