create-pmos 0.427.0 → 0.429.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-programs-test.js +16 -2
- package/workspace/briefing-premium-board-test.js +27 -22
- package/workspace/briefing-premium-insights-test.js +81 -60
- package/workspace/briefing-premium-metrics-test.js +5 -3
- package/workspace/briefing-premium-sources-test.js +5 -5
- package/workspace/briefing-premium-test.js +7 -5
- package/workspace/changelog.json +24 -0
- package/workspace/ev-everywhere-test.js +2 -2
- package/workspace/guide/briefing-premium.md +4 -2
- package/workspace/guide/home.md +34 -7
- package/workspace/guide/index.md +1 -0
- package/workspace/guide/metric-drafts.md +48 -0
- package/workspace/guide/programs.md +1 -0
- package/workspace/home-other-product-test.js +12 -2
- package/workspace/intel-report-ui-test.js +189 -0
- package/workspace/lib/board-metrics-premium.js +1 -1
- package/workspace/lib/headless.js +15 -2
- package/workspace/lib/insights-premium.js +5 -1
- package/workspace/lib/insights-records.js +14 -5
- package/workspace/lib/intel-report.js +419 -0
- package/workspace/lib/metric-draft-runs.js +193 -0
- package/workspace/lib/metric-drafts.js +231 -0
- package/workspace/lib/metrics-cli.js +104 -0
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/report-setups.js +29 -13
- package/workspace/lib/route-modules.js +1 -0
- package/workspace/lib/routes-insights-premium.js +2 -2
- package/workspace/lib/routes-insights-records.js +13 -5
- package/workspace/lib/routes-meeting-material.js +22 -1
- package/workspace/lib/routes-metric-drafts.js +141 -0
- package/workspace/lib/routes-phone-day.js +13 -2
- package/workspace/lib/routes-report-setups.js +92 -3
- package/workspace/lib/routes-viewer.js +5 -2
- package/workspace/lib/settings-store.js +14 -0
- package/workspace/metric-drafts-ui-test.js +209 -0
- package/workspace/milestone-pins-test.js +13 -0
- package/workspace/milestone-suggest-test.js +10 -4
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +40 -13
- package/workspace/premium-phone-card-test.js +8 -5
- package/workspace/premium-rec-tab-test.js +8 -0
- package/workspace/premium-vw-item-test.js +7 -3
- package/workspace/premium-vw-jira-test.js +2 -1
- package/workspace/program-charter-test.js +1 -1
- package/workspace/program-leave-test.js +2 -2
- package/workspace/program-order-test.js +3 -2
- package/workspace/program-panel-test.js +2 -1
- package/workspace/public/pm/bd-acts.js +23 -29
- package/workspace/public/pm/bd-ini-panel.js +90 -32
- package/workspace/public/pm/bd-pin-card.css +4 -4
- package/workspace/public/pm/bd-pin-card.js +4 -1
- package/workspace/public/pm/bd-prog-panel.js +9 -4
- package/workspace/public/pm/bd-span.js +22 -12
- package/workspace/public/pm/cozy-aud.css +1 -1
- package/workspace/public/pm/cozy-board.css +256 -256
- package/workspace/public/pm/cozy-ev.css +45 -45
- package/workspace/public/pm/cozy-evmodel.js +1 -1
- package/workspace/public/pm/cozy-home-rows.css +23 -23
- package/workspace/public/pm/cozy-home.css +207 -207
- package/workspace/public/pm/cozy-insights.css +207 -108
- package/workspace/public/pm/cozy-live-pill.css +5 -5
- package/workspace/public/pm/cozy-mtg-present.css +23 -23
- package/workspace/public/pm/cozy-nav.js +1 -1
- package/workspace/public/pm/cozy-news.js +2 -2
- package/workspace/public/pm/cozy-panel.css +29 -29
- package/workspace/public/pm/cozy-pick.css +5 -5
- package/workspace/public/pm/cozy-rec-now.css +20 -20
- package/workspace/public/pm/cozy-rec-present.css +11 -11
- package/workspace/public/pm/cozy-rec-tab.css +13 -13
- package/workspace/public/pm/cozy-rec-tab.js +12 -3
- package/workspace/public/pm/cozy-settings.js +1 -1
- package/workspace/public/pm/cozy-steps.css +9 -9
- package/workspace/public/pm/cozy-today.css +107 -71
- package/workspace/public/pm/cozy-viewer.css +7 -7
- package/workspace/public/pm/cozy-viewer.js +157 -23
- package/workspace/public/pm/cozy-vw-mtg.css +81 -81
- package/workspace/public/pm/cozy-vw-rp.css +53 -53
- package/workspace/public/pm/cozy-vw-shell.css +34 -21
- package/workspace/public/pm/cozy-vw.css +117 -117
- package/workspace/public/pm/cozy-xv.css +11 -11
- package/workspace/public/pm/cozy.css +18 -15
- package/workspace/public/pm/hi-pop.css +82 -0
- package/workspace/public/pm/hi-pop.js +65 -0
- package/workspace/public/pm/home-app.js +83 -28
- package/workspace/public/pm/home-day.js +131 -26
- package/workspace/public/pm/home-ini.css +38 -108
- package/workspace/public/pm/home-ini.js +50 -68
- package/workspace/public/pm/home-line.css +7 -7
- package/workspace/public/pm/home-list.js +41 -4
- package/workspace/public/pm/home-phone-card.js +18 -15
- package/workspace/public/pm/home-today.js +18 -7
- package/workspace/public/pm/ini-more.js +67 -0
- package/workspace/public/pm/ini-view-model.js +3 -2
- package/workspace/public/pm/ini-view.css +104 -102
- package/workspace/public/pm/ini-view.js +16 -8
- package/workspace/public/pm/loose-props.css +13 -13
- package/workspace/public/pm/metric-drafts.css +82 -0
- package/workspace/public/pm/metric-drafts.js +165 -0
- package/workspace/public/pm/ms-suggest.css +8 -8
- package/workspace/public/pm/order-model.js +85 -0
- package/workspace/public/pm/ov-view.css +12 -12
- package/workspace/public/pm/premium-board.js +57 -11
- package/workspace/public/pm/premium-chart-tab.js +6 -6
- package/workspace/public/pm/premium-insights.js +306 -105
- package/workspace/public/pm/premium-report-intel.css +56 -0
- package/workspace/public/pm/premium-report-intel.js +232 -0
- package/workspace/public/pm/premium-shell.js +2 -2
- package/workspace/public/pm/premium-vw-file.js +2 -2
- package/workspace/public/pm/premium-vw-item.js +3 -1
- package/workspace/public/pm/premium-vw-jira.js +2 -0
- package/workspace/public/pm/premium.css +127 -128
- package/workspace/public/pm/prog-order.css +6 -6
- package/workspace/public/pm/prog-order.js +15 -2
- package/workspace/public/pm/program-charter.css +23 -23
- package/workspace/public/pm/rp-parts.js +2 -2
- package/workspace/public/pm/sort-order.css +17 -0
- package/workspace/public/pm/sort-order.js +108 -0
- package/workspace/public/pm/split-merge.css +15 -15
- package/workspace/public/pm/task-card.css +21 -21
- package/workspace/public/pm/tk-tasks.css +37 -37
- package/workspace/public/pm/tk-view.css +6 -6
- package/workspace/public/pm/tk-view.js +3 -2
- package/workspace/public/pm/wf-page.css +28 -28
- package/workspace/public/pm/wf-page.js +1 -1
- package/workspace/public/premium-board.html +1 -0
- package/workspace/public/premium-intelligence.html +82 -0
- package/workspace/server.js +38 -3
- package/workspace/skills/metric-draft.skill +47 -0
- package/workspace/sort-order-test.js +201 -0
- package/workspace/stage-card-test.js +1 -0
- package/workspace/task-card-test.js +1 -1
- package/workspace/test-lists/intel-report-ui.json +5 -0
- package/workspace/test-lists/intel-report.json +9 -0
- package/workspace/test-lists/metric-drafts-ui.json +5 -0
- package/workspace/test-lists/metric-drafts.json +9 -0
- package/workspace/test-lists/sort-order.json +6 -0
- package/workspace/test-lists/viewer-trail.json +5 -0
- package/workspace/test-run.js +3 -0
- package/workspace/tk-tasks-test.js +5 -3
- package/workspace/viewer-trail-test.js +145 -0
- package/workspace/public/premium-insights.html +0 -81
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* POST /api/viewer-meeting/work-item { note, step: { text, owner?, due? } } → { ok, ticket, created }
|
|
12
12
|
* A next step becomes a ticket Drafted in PMOS on the note's initiative (lib/jira-tickets.js's draft file). It is not approved and not pushed:
|
|
13
13
|
* only the Commit gate pushes a ticket to Jira.
|
|
14
|
-
* GET /api/viewer-report/checks?ws=&path=&slot= → { ok, checks: [{ id, ok, text }] } the three checks before Issue (lib/viewer-report.js)
|
|
14
|
+
* GET /api/viewer-report/checks?ws=&path=&slot= → { ok, checks: [{ id, ok, text }] } the three checks before Issue (lib/viewer-report.js); five for a
|
|
15
|
+
* report made from Intelligence (lib/intel-report.js storyChecks)
|
|
15
16
|
* Every POST is a page press (lib/pm-guard.js requirePagePress). Handlers are pure over (q | body, ctx) so a test needs no server. */
|
|
16
17
|
const fs = require('fs');
|
|
17
18
|
const path = require('path');
|
|
@@ -84,7 +85,9 @@ function checks(q, ctx) {
|
|
|
84
85
|
let text = '';
|
|
85
86
|
try { text = fs.readFileSync(full, 'utf8'); } catch { return fail(404, 'the report file could not be read'); }
|
|
86
87
|
const slot = str(q.slot, 10) || ((/(\d{4}-\d{2}-\d{2})\.md$/.exec(rel) || [])[1] || '');
|
|
87
|
-
|
|
88
|
+
// A report made from Intelligence (batch 15 item 4) is checked as a story: the five checks before it goes out (lib/intel-report.js storyChecks).
|
|
89
|
+
const IR = require('./intel-report.js'), src = (/^---\r?\n[\s\S]*?^source:\s*(\S+)/m.exec(text) || [])[1];
|
|
90
|
+
return okBody({ checks: IR.isIntelligence(src) ? IR.storyChecks(text) : VR.issueChecks(text, { slot }) });
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
const respond = (ctx, res, r) => { ctx.json(res, r.body, r.status); return true; };
|
|
@@ -63,6 +63,8 @@ const DEFS = Object.freeze({
|
|
|
63
63
|
'sess.idle': one('sessions', 'computer', ['15', '30', '60', 'never'], '30'),
|
|
64
64
|
'sess.share': one('sessions', 'computer', ['ws', 'job'], 'ws'),
|
|
65
65
|
'look.start': one('appearance', 'computer', ['brief', 'cal', 'work', 'init', 'rep'], 'brief'),
|
|
66
|
+
// ONE order for Home, the Board and the Timeline (batch 14 item 8): the sort, the programs and products, the initiatives under each product
|
|
67
|
+
'look.order': { section: 'appearance', scope: 'computer', type: 'order', def: { sort: 'mine', top: [], inis: {} } },
|
|
66
68
|
// premium-updates: once a day by default. An open page posts the check; the server never schedules one (no-network.test.js).
|
|
67
69
|
'upd.check': one('updates', 'computer', ['press', 'daily'], 'daily'),
|
|
68
70
|
'upd.apply': one('updates', 'computer', ['ask', 'idle'], 'ask'),
|
|
@@ -127,6 +129,18 @@ function validate(key, value) {
|
|
|
127
129
|
}
|
|
128
130
|
// ['*'] alone is every workspace (the product picker's All, lib/briefing-premium-products.js)
|
|
129
131
|
case 'ids': return value === null || Array.isArray(value) && (value.length === 1 && value[0] === '*' || value.length <= d.max && value.every((x) => typeof x === 'string' && WS_ID.test(x)) && new Set(value).size === value.length) ? null : `${key} must list at most ${d.max} workspace ids, each once, or ['*'] for every one`;
|
|
132
|
+
case 'order': {
|
|
133
|
+
// pm/order-model.js keeps a layout this small (trim)
|
|
134
|
+
const SORTS = ['mine', 'turn', 'date', 'stage', 'name'];
|
|
135
|
+
const keys = (a, n) => Array.isArray(a) && a.length <= n && a.every((x) => typeof x === 'string' && x.length > 0 && x.length <= 200 && !/[\u0000-\u001f]/.test(x));
|
|
136
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) return `${key} must be { sort, top, inis }`;
|
|
137
|
+
if (!SORTS.includes(value.sort)) return `${key}.sort must be one of ${SORTS.join(', ')}`;
|
|
138
|
+
if (!keys(value.top, 200)) return `${key}.top must list at most 200 keys`;
|
|
139
|
+
if (!value.inis || typeof value.inis !== 'object' || Array.isArray(value.inis)) return `${key}.inis must map a product to its initiatives`;
|
|
140
|
+
const ps = Object.entries(value.inis);
|
|
141
|
+
if (ps.length > 100 || !ps.every(([k, v]) => k.length <= 200 && keys(v, 300))) return `${key}.inis must hold at most 100 products of 300 initiatives each`;
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
130
144
|
case 'templates': {
|
|
131
145
|
if (!value || typeof value !== 'object' || Array.isArray(value)) return `${key} must name the templates`;
|
|
132
146
|
const ids = Object.keys(value);
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* metric-drafts-ui-test.js — the metrics Claude drafts, as the program panel and the initiative view show them (feedback batch 15 item 1;
|
|
4
|
+
* canvas Iq9Program, Iq9Initiative). Serves the real Board page from the real server; Project Ascent comes from fixtures/program-ascent.js, and
|
|
5
|
+
* GET /api/metric-drafts and its POSTs are stubbed here in the contract's shape (keep-all marks every open row kept, undo puts one back).
|
|
6
|
+
* P the program's proposed goal leads the panel: the goal line, checkpoint chips, Built from with the drafted ticket as a pill, one line of
|
|
7
|
+
* why; Discuss in Home, Edit and ✓ are icon-only with a label · K ✓ keeps all; the Goal row of chips with a dot (ok, off) and Undo ·
|
|
8
|
+
* U Undo makes it a proposal again · Z nothing drafted, nothing shown · I the initiative at Discover: the proposed success measure under
|
|
9
|
+
* the stage card, Proves it worked, Early signal and Guardrail as Now → Target; ✓ keeps all; the folded "Success measure · Set before the
|
|
10
|
+
* build · 3" with Undo · S the type scale only · H on a phone. PMOS_SHOTS=<dir> also saves the screenshots. */
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const { spawn } = require('child_process');
|
|
14
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
15
|
+
const T = require('./test-run').configure({ name: 'metric-drafts-ui' });
|
|
16
|
+
const BP = require('./lib/board-premium.js');
|
|
17
|
+
const F = require('./fixtures/board-premium-facts.js');
|
|
18
|
+
const A = require('./fixtures/program-ascent.js');
|
|
19
|
+
|
|
20
|
+
const BASE = T.BASE;
|
|
21
|
+
const SHOTS = process.env.PMOS_SHOTS || '';
|
|
22
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
23
|
+
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { let v; try { v = await fn(); } catch { v = null; } if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
24
|
+
const results = [];
|
|
25
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 700) : ''}`); };
|
|
26
|
+
let srv = null; let browser = null;
|
|
27
|
+
const finish = async (code) => {
|
|
28
|
+
if (browser) await browser.close().catch(() => {});
|
|
29
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
30
|
+
T.killTmux();
|
|
31
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
32
|
+
console.log(`\n${results.length - bad}/${results.length} metric-drafts-ui assertions passed`);
|
|
33
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
34
|
+
};
|
|
35
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
36
|
+
|
|
37
|
+
/* the drafts, in the contract's row shape (metric-drafts-contract.md) */
|
|
38
|
+
const PROGRAM = () => ({
|
|
39
|
+
title: 'Project Ascent', src: 'from the charter and its 3 initiatives', sub: '',
|
|
40
|
+
rows: [
|
|
41
|
+
{ id: 'g', group: 'Program goal', name: 'Sign-ins on CIAM, all products', type: 'Percentage', now: 12, nowTxt: '12%', target: 100, targetTxt: '100%', by: '2028-06-30',
|
|
42
|
+
why: 'idpf is 80% of all sign-ins, so it carries the goal. I check it every morning once you keep it.', source: 'Amplitude', ticket: null,
|
|
43
|
+
checkpoints: [{ by: '2027-02-27', target: 40, label: 'Legacy IdP off' }, { by: '2027-03-20', target: 85, label: 'All microsites' }], state: 'open' },
|
|
44
|
+
{ id: 'r1', group: 'Rolls up from', name: 'idpf · sign-ins on CIAM', type: 'Percentage', now: 15, nowTxt: '15%', target: 100, targetTxt: '100%', by: '2027-02-27', why: '', source: 'Amplitude', ticket: null, state: 'open' },
|
|
45
|
+
{ id: 'r2', group: 'Rolls up from', name: 'Microsites · sign-ins on CIAM', type: 'Percentage', now: null, nowTxt: '', target: 100, targetTxt: '100%', by: '2027-03-20', why: 'No event counts it yet.', source: '', ticket: { key: 'MS-212', text: 'MS-212 drafted' }, state: 'open' },
|
|
46
|
+
{ id: 'gr', group: 'Guardrail', name: 'Sign-in success', type: 'Stay within', now: 99.6, nowTxt: '99.6%', target: 99, targetTxt: 'stays above 99%', by: null, why: '', source: 'Amplitude', ticket: null, state: 'open' },
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
const INITIATIVE = () => ({
|
|
50
|
+
title: 'Descope feature parity', src: 'from the PRD and the desktop launch', sub: 'Desktop fell 7 points after the same change. 10% of shoppers keep the old login, so the result is fair.',
|
|
51
|
+
rows: [
|
|
52
|
+
{ id: 'gd', group: 'Guardrail', name: 'Checkout conversion', type: 'Stay within', now: 3.1, nowTxt: '3.1%', target: 3.1, targetTxt: '≥ 3.1%', by: null, why: 'A faster login must not cost orders', source: 'Amplitude', ticket: null, state: 'open' },
|
|
53
|
+
{ id: 'pw', group: 'Proves it worked', name: 'Mobile checkout login drop-off', type: 'Percentage', now: 27, nowTxt: '27%', target: 19, targetTxt: '19%', by: '2027-01-15', why: 'Moves your key result “drop-off under 15%”', source: 'Amplitude', ticket: null, state: 'open' },
|
|
54
|
+
{ id: 'es', group: 'Early signal', name: 'Inline form completion', type: 'Percentage', now: null, nowTxt: '', target: 80, targetTxt: '80% week 1', by: null, why: '', source: '', ticket: { key: 'ESHOP-981', text: 'ESHOP-981 drafted' }, state: 'open' },
|
|
55
|
+
],
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
(async () => {
|
|
59
|
+
const exe = process.env.PMOS_CHROME || findBrowser();
|
|
60
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
61
|
+
let chromium;
|
|
62
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
63
|
+
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
64
|
+
await T.waitForServer(BASE);
|
|
65
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
66
|
+
if (SHOTS) fs.mkdirSync(SHOTS, { recursive: true });
|
|
67
|
+
const shot = async (p, name) => { if (SHOTS) { await sleep(450); await p.screenshot({ path: path.join(SHOTS, name + '.png') }); } };
|
|
68
|
+
|
|
69
|
+
const open = async ({ w = 1440, h = 900, drafts = { program: PROGRAM(), initiative: INITIATIVE() }, dark = false } = {}) => {
|
|
70
|
+
const c = await browser.newContext({ viewport: { width: w, height: h }, colorScheme: dark ? 'dark' : 'light' });
|
|
71
|
+
const page = await c.newPage();
|
|
72
|
+
const errors = [], posts = [], gets = [];
|
|
73
|
+
page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
|
|
74
|
+
const json = (r, b) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(b) }), wsOf = (r) => new URL(r.request().url()).searchParams.get('ws') || 'idpf';
|
|
75
|
+
await page.route('**/api/board-premium*', (r) => json(r, { ok: true, state: 'ready', model: BP.build(F.programFacts(wsOf(r))), as_of: Date.now() }));
|
|
76
|
+
await page.route('**/api/programs', (r) => json(r, { ok: true, programs: F.programs() }));
|
|
77
|
+
await page.route('**/api/boards/anchors*', (r) => json(r, { ok: true, anchors: A.ANCHORS[wsOf(r)] || [] }));
|
|
78
|
+
await page.route('**/api/insights-premium*', (r) => json(r, { ok: true, model: { goals: A.GOALS[wsOf(r)] || [] } }));
|
|
79
|
+
await page.route('**/api/boards/items*', (r) => json(r, { ok: true, items: A.ITEMS[wsOf(r)] || [] }));
|
|
80
|
+
await page.route('**/api/programs/*', (r) => json(r, { ok: true }));
|
|
81
|
+
await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: '{"ok":false,"error":"not in this check"}' }));
|
|
82
|
+
// the metric drafts, per scope: the GET answers the rows as they stand; keep-all and undo change them as the server would
|
|
83
|
+
const S = { program: drafts.program, initiative: drafts.initiative };
|
|
84
|
+
await page.route('**/api/metric-drafts**', (r) => {
|
|
85
|
+
const rq = r.request(), u = new URL(rq.url());
|
|
86
|
+
if (rq.method() === 'GET') {
|
|
87
|
+
const scope = u.searchParams.get('scope'), id = u.searchParams.get('id'), d = S[scope];
|
|
88
|
+
gets.push({ scope, id, ws: u.searchParams.get('ws') });
|
|
89
|
+
const rows = d && d.rows ? d.rows : [];
|
|
90
|
+
return json(r, { ok: true, scope, id, title: (d && d.title) || '', when: '2026-10-27', run: { state: rows.length ? 'ready' : 'idle', step: rows.length ? 4 : 0, reads: [] }, rows, head: '', sub: (d && d.sub) || '', src: (d && d.src) || '' });
|
|
91
|
+
}
|
|
92
|
+
const body = JSON.parse(rq.postData() || '{}'), d = S[body.scope];
|
|
93
|
+
posts.push({ path: u.pathname, body });
|
|
94
|
+
if (u.pathname.endsWith('/keep-all')) { const n = d.rows.filter((x) => x.state === 'open').length; d.rows.forEach((x) => { if (x.state === 'open') { x.state = 'kept'; x.rid = 'rid-' + x.id; } }); return json(r, { ok: true, kept: n }); }
|
|
95
|
+
if (u.pathname.endsWith('/undo')) { const x = d.rows.find((y) => y.id === body.row); if (x) { x.state = 'open'; delete x.rid; } return json(r, { ok: true }); }
|
|
96
|
+
return json(r, { ok: true });
|
|
97
|
+
});
|
|
98
|
+
await page.goto(BASE + '/premium-board.html?ws=idpf&program=project-ascent');
|
|
99
|
+
await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'); return !!v && !v.hidden && !!v.querySelector('.pp-vw .czs-sum'); }));
|
|
100
|
+
return { page, ctx: c, errors, posts, gets, S };
|
|
101
|
+
};
|
|
102
|
+
const card = (p) => p.evaluate(() => {
|
|
103
|
+
const c = document.querySelector('#czViewer .pp-vw .md-card'); if (!c) return null;
|
|
104
|
+
return { first: c === c.parentElement.firstElementChild, hd: c.querySelector('.md-hd b').textContent, src: (c.querySelector('.md-src') || {}).textContent || '', gl: c.querySelector('.md-gl').textContent,
|
|
105
|
+
cps: [...c.querySelectorAll('.md-cp')].map((x) => x.textContent), built: [...c.querySelectorAll('.md-ru:not(.q)')].map((x) => [...x.children].map((y) => y.textContent).join(' | ')),
|
|
106
|
+
why: c.querySelector('.md-why').textContent,
|
|
107
|
+
presses: [...c.querySelectorAll('.md-ft .md-ib')].map((b) => ({ label: b.getAttribute('aria-label'), title: b.getAttribute('title'), text: b.textContent.trim(), svg: !!b.querySelector('svg[aria-hidden="true"]'), solid: b.classList.contains('solid'), href: b.getAttribute('href') || '' })) };
|
|
108
|
+
});
|
|
109
|
+
// every font size the parts draw: the type scale only (11, 12, 14, 16, 20, 28 px)
|
|
110
|
+
const sizes = (p, sel) => p.evaluate((s) => [...new Set([...document.querySelectorAll(s + ', ' + s + ' *')].filter((e) => e.childNodes.length && [...e.childNodes].some((n) => n.nodeType === 3 && n.textContent.trim())).map((e) => getComputedStyle(e).fontSize))], sel);
|
|
111
|
+
const SCALE = new Set(['11px', '12px', '14px', '16px', '20px', '28px']);
|
|
112
|
+
|
|
113
|
+
/* ── P: the program's proposed goal ── */
|
|
114
|
+
const D = await open();
|
|
115
|
+
const p = D.page;
|
|
116
|
+
const c = await until(() => card(p));
|
|
117
|
+
ok('P the proposed goal leads the panel body, with where it came from', !!c && c.first && c.hd === 'Proposed goal' && c.src === 'from the charter and its 3 initiatives', JSON.stringify(c));
|
|
118
|
+
ok('P the goal line', !!c && c.gl === 'Sign-ins on CIAM, all products: 12% → 100% by Jun 2028', c && c.gl);
|
|
119
|
+
ok('P checkpoint chips at its milestones, and the guardrail', !!c && c.cps.join(' / ') === '40% at Legacy IdP off · Feb 27 / 85% at All microsites · Mar 20 / Guardrail: Sign-in success · stays above 99%', c && c.cps.join(' / '));
|
|
120
|
+
ok('P Built from: Now and Target, a drafted ticket as a pill', !!c && c.built.join(' / ') === 'idpf · sign-ins on CIAM | 15% | 100% by Feb 27 / Microsites · sign-ins on CIAM | — | Ticket MS-212 drafted'
|
|
121
|
+
&& await p.evaluate(() => !!document.querySelector('#czViewer .md-card .md-ru .md-pill')), c && c.built.join(' / '));
|
|
122
|
+
ok('P one line of why, in Claude\'s words', !!c && c.why === 'idpf is 80% of all sign-ins, so it carries the goal. I check it every morning once you keep it.', c && c.why);
|
|
123
|
+
ok('P Discuss in Home, Edit and a solid ✓ Keep this goal: icon-only, each with a label and a title', !!c && c.presses.map((x) => x.label).join() === 'Discuss the proposed goal in Home,Edit the proposed goal in Home,Keep this goal'
|
|
124
|
+
&& c.presses.every((x) => x.title && !x.text && x.svg) && c.presses[2].solid && /ask=program%3Aproject-ascent/.test(c.presses[0].href) && /^\/premium\.html\?ws=idpf/.test(c.presses[1].href), JSON.stringify(c && c.presses));
|
|
125
|
+
ok('P the read names the program and its product', D.gets.some((g) => g.scope === 'program' && g.id === 'project-ascent' && g.ws === 'idpf'), JSON.stringify(D.gets));
|
|
126
|
+
const ps = await sizes(p, '#czViewer .md-card');
|
|
127
|
+
ok('S the card uses the type scale only', ps.length && ps.every((x) => SCALE.has(x)), ps.join());
|
|
128
|
+
ok('P the rest of the panel is as before: the summary, the goals and the folding rows follow', await p.evaluate(() => { const b = document.querySelector('#czViewer .pp-vw'); return !!b.querySelector('.md-card + .czs-sum') && !!b.querySelector('.czs-sum ~ .pp-goal') && !!b.querySelector('[data-czs-fold="tree"]'); }));
|
|
129
|
+
await shot(p, 'Iq9Program-proposed-built');
|
|
130
|
+
|
|
131
|
+
/* ── K: ✓ keeps all ── */
|
|
132
|
+
await p.click('#czViewer .md-card [data-md="keep"]');
|
|
133
|
+
const kp = await until(() => D.posts.find((x) => x.path === '/api/metric-drafts/keep-all'));
|
|
134
|
+
ok('K ✓ keeps all in one press (POST /api/metric-drafts/keep-all)', !!kp && kp.body.scope === 'program' && kp.body.id === 'project-ascent' && kp.body.ws === 'idpf', JSON.stringify(kp));
|
|
135
|
+
const kept = await until(() => p.evaluate(() => { const g = document.querySelector('#czViewer .pp-vw .md-kept'); if (!g) return null;
|
|
136
|
+
return { first: g === g.parentElement.firstElementChild, per: g.querySelector('.pp-per').textContent, chips: [...g.querySelectorAll('.md-kr')].map((x) => (x.querySelector('.pp-gd.off') ? 'off:' : x.querySelector('.pp-gd') ? 'ok:' : '') + x.textContent),
|
|
137
|
+
undo: (g.querySelector('[data-md="undo"]') || {}).title || '', card: !!document.querySelector('#czViewer .md-card') }; }));
|
|
138
|
+
ok('K the Goal row of chips, each with a dot: ok with a reading, off while it waits on a ticket', !!kept && kept.first && kept.per === 'Goal' && !kept.card
|
|
139
|
+
&& kept.chips.join(' / ') === 'ok:Sign-ins on CIAM, all products12% of 100% · Jun 2028 / ok:idpf · sign-ins on CIAM15% of 100% · Feb 27 / off:Microsites · sign-ins on CIAMwaits on MS-212 / ok:Sign-in successstays above 99%', JSON.stringify(kept));
|
|
140
|
+
ok('K Undo is beside it, icon-only', !!kept && kept.undo === 'Undo');
|
|
141
|
+
ok('K the toast says what happens next, in first person', /I check the goal every morning/.test(await p.evaluate(() => (document.querySelector('#bdToast') || {}).textContent || '')));
|
|
142
|
+
await shot(p, 'Iq9Program-kept-built');
|
|
143
|
+
|
|
144
|
+
/* ── U: Undo ── */
|
|
145
|
+
await p.click('#czViewer .md-kept [data-md="undo"]');
|
|
146
|
+
await until(() => D.posts.filter((x) => x.path === '/api/metric-drafts/undo').length === 4, 5000);
|
|
147
|
+
ok('U Undo puts each kept row back (POST /api/metric-drafts/undo, one per row)', D.posts.filter((x) => x.path === '/api/metric-drafts/undo').map((x) => x.body.row).join() === 'g,r1,r2,gr');
|
|
148
|
+
ok('U the proposal shows again', !!(await until(() => card(p))));
|
|
149
|
+
|
|
150
|
+
/* ── I: the initiative at Discover ── */
|
|
151
|
+
await until(() => p.evaluate(() => { const b = document.querySelector('#czViewer [data-czs-fold="tree"]'); if (b && b.getAttribute('aria-expanded') !== 'true') b.click(); return !!document.querySelector('#czViewer button.pp-open[data-ini="descope-parity"]'); }));
|
|
152
|
+
await p.click('#czViewer button.pp-open[data-ini="descope-parity"]');
|
|
153
|
+
const ic = await until(() => p.evaluate(() => { const c = document.querySelector('#czViewer .iv .md-card'); if (!c) return null;
|
|
154
|
+
return { after: !!(c.previousElementSibling && c.previousElementSibling.classList.contains('iv-sc')), hd: c.querySelector('.md-hd b').textContent, src: c.querySelector('.md-src').textContent,
|
|
155
|
+
rows: [...c.querySelectorAll('.md-mr')].map((r) => [r.querySelector('.md-role').textContent, r.querySelector('.md-nm b').textContent, (r.querySelector('small') || {}).textContent || '', r.querySelector('.md-now').textContent, r.querySelector('.md-to').textContent].join(' | ')),
|
|
156
|
+
why: c.querySelector('.md-why').textContent, presses: [...c.querySelectorAll('.md-ft .md-ib')].map((b) => ({ label: b.getAttribute('aria-label'), title: b.getAttribute('title'), text: b.textContent.trim(), solid: b.classList.contains('solid'), href: b.getAttribute('href') || '' })) }; }));
|
|
157
|
+
ok('I the proposed success measure sits under the stage card, with where it came from', !!ic && ic.after && ic.hd === 'Proposed success measure' && ic.src === 'from the PRD and the desktop launch', JSON.stringify(ic));
|
|
158
|
+
ok('I three groups in order, each Now → Target', !!ic && ic.rows.join(' / ') === 'Proves it worked · 4 weeks after release | Mobile checkout login drop-off | Moves your key result “drop-off under 15%” | 27% | 19% / Early signal · shows in days | Inline form completion | Ticket ESHOP-981 drafted | — | 80% week 1 / Guardrail | Checkout conversion | A faster login must not cost orders | 3.1% | ≥ 3.1%', ic && ic.rows.join(' / '));
|
|
159
|
+
ok('I one line of why', !!ic && /^Desktop fell 7 points/.test(ic.why));
|
|
160
|
+
ok('I Edit and a solid ✓ Keep this success measure: icon-only, each with a label and a title', !!ic && ic.presses.map((x) => x.label).join() === 'Edit the proposed success measure in Home,Keep this success measure'
|
|
161
|
+
&& ic.presses.every((x) => x.title && !x.text) && ic.presses[1].solid && /ask=descope-parity/.test(ic.presses[0].href), JSON.stringify(ic && ic.presses));
|
|
162
|
+
const is = await sizes(p, '#czViewer .iv .md-card');
|
|
163
|
+
ok('S the initiative card uses the type scale only', is.length && is.every((x) => SCALE.has(x)), is.join());
|
|
164
|
+
await shot(p, 'Iq9Initiative-proposed-built');
|
|
165
|
+
await p.click('#czViewer .iv .md-card [data-md="keep"]');
|
|
166
|
+
const ki = await until(() => D.posts.find((x) => x.path === '/api/metric-drafts/keep-all' && x.body.scope === 'initiative'));
|
|
167
|
+
ok('I ✓ keeps all (POST /api/metric-drafts/keep-all, scope initiative)', !!ki && ki.body.id === 'descope-parity', JSON.stringify(ki));
|
|
168
|
+
const kf = await until(() => p.evaluate(() => { const k = document.querySelector('#czViewer .iv .md-kept-i'); if (!k) return null; const f = k.querySelector('[data-md="fold"]');
|
|
169
|
+
return { b: f.querySelector('b').textContent, pill: f.querySelector('.md-ok').textContent, n: f.querySelector('.n').textContent, open: f.getAttribute('aria-expanded'), undo: (k.querySelector('[data-md="undo"]') || {}).title || '', card: !!document.querySelector('#czViewer .iv .md-card') }; }));
|
|
170
|
+
ok('I kept: the folded "Success measure · Set before the build · 3", with Undo', !!kf && kf.b === 'Success measure' && kf.pill === 'Set before the build' && kf.n === '3' && kf.open === 'false' && kf.undo === 'Undo' && !kf.card, JSON.stringify(kf));
|
|
171
|
+
await p.click('#czViewer .iv .md-kept-i [data-md="fold"]');
|
|
172
|
+
const lst = await until(() => p.evaluate(() => { const L = [...document.querySelectorAll('#czViewer .iv .md-kept-i .md-lr')]; return L.length ? L.map((x) => x.textContent) : null; }));
|
|
173
|
+
ok('I the fold opens on its rows', !!lst && lst.join(' / ') === 'Mobile checkout login drop-off27% → 19%, 4 weeks after release / Inline form completionWaits on ESHOP-981 / Checkout conversionStays at ≥ 3.1%', JSON.stringify(lst));
|
|
174
|
+
await shot(p, 'Iq9Initiative-kept-built');
|
|
175
|
+
await p.click('#czViewer .iv .md-kept-i [data-md="undo"]');
|
|
176
|
+
await until(() => D.posts.filter((x) => x.path === '/api/metric-drafts/undo' && x.body.scope === 'initiative').length === 3, 5000);
|
|
177
|
+
ok('I Undo makes it a proposal again', !!(await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv .md-card')))));
|
|
178
|
+
ok('0 no page error (desk)', D.errors.length === 0, D.errors.join(' | '));
|
|
179
|
+
await D.ctx.close();
|
|
180
|
+
|
|
181
|
+
/* ── Z: nothing drafted, nothing shown ── */
|
|
182
|
+
const Z = await open({ drafts: { program: { rows: [] }, initiative: { rows: [] } } });
|
|
183
|
+
await until(() => Z.gets.some((g) => g.scope === 'program'), 4000);
|
|
184
|
+
await sleep(400); // the answer has arrived and drawn: nothing may appear
|
|
185
|
+
ok('Z nothing drafted: no proposal and no Goal row on the program panel', await Z.page.evaluate(() => !document.querySelector('#czViewer .md-card, #czViewer .md-kept')));
|
|
186
|
+
await Z.page.evaluate(() => { const b = document.querySelector('#czViewer [data-czs-fold="tree"]'); if (b && b.getAttribute('aria-expanded') !== 'true') b.click(); });
|
|
187
|
+
await until(() => Z.page.evaluate(() => !!document.querySelector('#czViewer button.pp-open[data-ini="descope-parity"]')));
|
|
188
|
+
await Z.page.click('#czViewer button.pp-open[data-ini="descope-parity"]');
|
|
189
|
+
await until(() => Z.page.evaluate(() => !!document.querySelector('#czViewer .iv')) && Z.gets.some((g) => g.scope === 'initiative'), 6000);
|
|
190
|
+
await sleep(400);
|
|
191
|
+
ok('Z nothing drafted: no success measure on the initiative', await Z.page.evaluate(() => !document.querySelector('#czViewer .md-card, #czViewer .md-kept-i')));
|
|
192
|
+
ok('0 no page error (nothing drafted)', Z.errors.length === 0, Z.errors.join(' | '));
|
|
193
|
+
await Z.ctx.close();
|
|
194
|
+
|
|
195
|
+
/* ── H: a phone, and dark ── */
|
|
196
|
+
const H = await open({ w: 390, h: 844 });
|
|
197
|
+
const hc = await until(() => card(H.page));
|
|
198
|
+
ok('H on a phone: the card fits the width, and its presses are 44 px', !!hc && await H.page.evaluate(() => { const c = document.querySelector('#czViewer .md-card'), r = c.getBoundingClientRect(), b = c.querySelector('[data-md="keep"]').getBoundingClientRect(); return r.right <= innerWidth && c.scrollWidth <= c.clientWidth + 1 && b.width >= 44; }));
|
|
199
|
+
await shot(H.page, 'Iq9Program-phone-built');
|
|
200
|
+
ok('0 no page error (phone)', H.errors.length === 0, H.errors.join(' | '));
|
|
201
|
+
await H.ctx.close();
|
|
202
|
+
if (SHOTS) {
|
|
203
|
+
const K = await open({ dark: true });
|
|
204
|
+
await until(() => card(K.page));
|
|
205
|
+
await shot(K.page, 'Iq9Program-dark-built');
|
|
206
|
+
await K.ctx.close();
|
|
207
|
+
}
|
|
208
|
+
return finish();
|
|
209
|
+
})();
|
|
@@ -34,6 +34,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
34
34
|
const ROWS = [
|
|
35
35
|
F.row('migration', 'Migration — move from Okta to Descope', { owner: 'Wawan', stage: 'Build', start: '2026-10-01', end: '2027-09-05', progress: 20 }),
|
|
36
36
|
F.row('passkey', 'Passkey sign-in', { owner: 'Lee', start: '2026-09-15', end: '2027-02-26', progress: 45 }),
|
|
37
|
+
F.row('otp', 'Email OTP', { owner: 'Lee', start: '2026-11-02', end: '2027-06-09', progress: 10 }),
|
|
37
38
|
];
|
|
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 });
|
|
39
40
|
const ITEMS = [
|
|
@@ -43,6 +44,7 @@ const ITEMS = [
|
|
|
43
44
|
it('migration', 'm-eval', 'Evaluation at 30 days', { end: '2027-07-01' }),
|
|
44
45
|
it('migration', 'm-okta', 'Okta decommissioned', { end: '2027-09-05' }),
|
|
45
46
|
it('passkey', 'p-beta', 'Beta to staff', { end: '2026-12-18' }),
|
|
47
|
+
it('otp', 'o-roll', 'Email OTP rolled out', { end: '2027-05-26', section: 'deliver' }),
|
|
46
48
|
];
|
|
47
49
|
|
|
48
50
|
(async () => {
|
|
@@ -121,6 +123,17 @@ const ITEMS = [
|
|
|
121
123
|
ok('T unpinning the last one writes pinned false', posts[1] && posts[1].task === 'm-okta' && posts[1].pinned === false && c && /2 of 5/.test(c.sub), JSON.stringify(posts));
|
|
122
124
|
await p.keyboard.press('Escape');
|
|
123
125
|
ok('C Escape closes the card', await p.evaluate(() => document.querySelector('#bdPop').hidden));
|
|
126
|
+
// batch 14 item 1: the row's end label and the card say the same thing
|
|
127
|
+
const otp = await p.evaluate(() => { const r = document.querySelector('#ibBody [data-row="board:otp"]'); const e = r && r.querySelector('.tg-end'), l = r && r.querySelector('.tg-endl');
|
|
128
|
+
return { id: e ? e.dataset.msId : null, label: l ? l.textContent.trim() : '', hover: l ? l.title : '', tm: r ? r.querySelectorAll('.tg-tm').length : -1 }; });
|
|
129
|
+
ok('E a milestone in the Deliver stage before the end names the row\'s end, at its own date; the end date is the hover; one ◇ only',
|
|
130
|
+
otp.id === 'o-roll' && otp.label === 'Email OTP rolled out May 26 ’27' && /Initiative ends Jun 9 ’27/.test(otp.hover) && otp.tm === 0, JSON.stringify(otp));
|
|
131
|
+
await p.click('[data-ms-pick="board:passkey"][data-ms-id=""]');
|
|
132
|
+
await p.waitForSelector('#bdPop.bd-pc:not([hidden])', { timeout: 4000 });
|
|
133
|
+
c = await card(p);
|
|
134
|
+
ok('E the plain end ◇ opens a card headed with the row\'s own label, "Deliver Feb 26 ’27"',
|
|
135
|
+
c && c.h === 'Deliver Feb 26 ’27' && c.sub === 'The end of Passkey sign-in · 1 of 1 milestone on the timeline', JSON.stringify(c));
|
|
136
|
+
await p.keyboard.press('Escape');
|
|
124
137
|
ok('C the ◇ press does not open the initiative', await p.evaluate(() => !document.querySelector('.iv-tr')));
|
|
125
138
|
|
|
126
139
|
/* F — the Filter */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* F a program with no milestones: Claude's first suggestions take the place of "Add the first milestone", each with why and its source; ✓ ✎ ✕
|
|
7
7
|
* are icon-only; keep all · W later changes lead Waits on you; ✓ keeps, ✕ drops · C the pencil opens the charter with the change filled in;
|
|
8
8
|
* Save writes it and answers the suggestion; last checked and Check now · Z nothing to suggest, nothing shows · K the ◆ dates are reported once
|
|
9
|
-
* · M Home's
|
|
9
|
+
* · M Home's program card leads with its milestone changes · H on a phone. PMOS_SHOTS=<dir> also saves the screenshots the frames are compared with. */
|
|
10
10
|
const path = require('path');
|
|
11
11
|
const fs = require('fs');
|
|
12
12
|
const { spawn } = require('child_process');
|
|
@@ -142,14 +142,20 @@ const withReview = (open, o = {}) => F.programs().map((p) => ({ ...p, ...(o.empt
|
|
|
142
142
|
|
|
143
143
|
/* ── M: Home's Your move ── */
|
|
144
144
|
const M = await open({ home: true });
|
|
145
|
-
//
|
|
146
|
-
|
|
145
|
+
// the program's milestone changes lead its card on Home (batch 14 item 4: a desktop has no Your day; the greeting opens the calendar)
|
|
146
|
+
await until(() => M.page.evaluate(() => !!document.querySelector('[data-hm-prog]')), 10000);
|
|
147
147
|
const hm = await until(() => M.page.evaluate(() => { const b = document.querySelector('[data-hm-sel="ms:project-ascent"]'); return b ? [...b.querySelectorAll('b, em')].map((x) => x.textContent.trim()).join(' · ') : null; }), 10000);
|
|
148
|
-
ok('M Home\'s
|
|
148
|
+
ok('M Home\'s program card has one line for its milestone changes, first', hm === '3 milestone changes · Pilot live to Dec 2', String(hm));
|
|
149
149
|
if (hm) {
|
|
150
150
|
await M.page.click('[data-hm-sel="ms:project-ascent"]');
|
|
151
151
|
ok('M a tap opens the program, where the changes lead Waits on you', !!(await until(() => M.page.evaluate(() => !!document.querySelector('#czViewer [data-czs-id="needs"] .msg-r')), 8000)));
|
|
152
152
|
}
|
|
153
|
+
// batch 14 item 4: on a desktop the greeting opens the calendar in the Viewer, not Your day
|
|
154
|
+
if (await M.page.$('[data-hm-day]')) {
|
|
155
|
+
await M.page.click('[data-hm-day]');
|
|
156
|
+
const vw = await until(() => M.page.evaluate(() => { const v = document.querySelector('#czViewer'); const t = v && !v.hidden ? v.textContent.replace(/\s+/g, ' ') : ''; return /Calendar|Your move/.test(t) ? t : null; }), 8000);
|
|
157
|
+
ok('D on a desktop the greeting opens the calendar in the Viewer; there is no Your day', vw && /Calendar/.test(vw) && !/Your move/.test(vw), String(vw).slice(0, 200));
|
|
158
|
+
}
|
|
153
159
|
ok('0 no page error on Home', M.errors.length === 0, M.errors.join(' | '));
|
|
154
160
|
await M.ctx.close();
|
|
155
161
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmos-workspace",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.429.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pmos-workspace",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.429.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/workspace/package.json
CHANGED
|
@@ -88,9 +88,11 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
88
88
|
const peekOn = (title) => until(() => p.evaluate((t) => { const k = document.querySelector('#czViewer'); return k && !k.hidden && (document.querySelector('#czViewer .cz-vw-title') || {}).textContent === t && !k.querySelector('.bd-wtag'); }, title));
|
|
89
89
|
const popOn = (re) => until(() => p.evaluate((s) => { const k = document.querySelector('#bdPop'); return k && !k.hidden && new RegExp(s).test(k.textContent) ? k.textContent : null; }, re.source));
|
|
90
90
|
const noDlg = () => p.evaluate(() => !document.querySelector('#dlg.on'));
|
|
91
|
-
/* re-pointed (
|
|
92
|
-
const
|
|
93
|
-
const
|
|
91
|
+
/* re-pointed (batch 14 item 5): the initiative opens in the Viewer, and its ⋯ is the one initiative menu (pm/ini-more.js): the stage presses are its items */
|
|
92
|
+
const vwMenu = async (pg) => { await until(() => pg.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); return !!v && !v.hidden && !!c && c.kind === 'Initiative' && !!v.querySelector('[data-cz-vw="more"]'); })); await pg.click('#czViewer [data-cz-vw="more"]'); await pg.waitForSelector('.cz-vw-menu [role="menuitem"]'); return pg.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.querySelector('span').textContent)); };
|
|
93
|
+
const vwPick = async (pg, label) => { const L = await vwMenu(pg), i = L.indexOf(label); if (i < 0) { await pg.keyboard.press('Escape'); return false; } await pg.locator('.cz-vw-menu [role="menuitem"]').nth(i).click(); return true; };
|
|
94
|
+
const more = async (id, label) => { await until(() => listed(id), 30000); await p.click(`#ibBody .ini2[data-key="board:${id}"]`); return vwPick(p, label); };
|
|
95
|
+
const acts = async (id, label = 'Move to a stage') => (await more(id, label)) && until(() => p.evaluate(() => { const m = document.querySelector('#bdPop'); return !!m && !m.hidden; }));
|
|
94
96
|
const closeAll = async () => { for (let i = 0; i < 4; i++) { if (await p.evaluate(() => (!document.querySelector('#czViewer') || document.querySelector('#czViewer').hidden) && (!document.querySelector('#bdPop') || document.querySelector('#bdPop').hidden))) return; await p.keyboard.press('Escape'); await sleep(100); } };
|
|
95
97
|
await until(() => p.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0), 30000);
|
|
96
98
|
await p.click('#chAsks');
|
|
@@ -143,7 +145,11 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
143
145
|
ok('N4 closing the questions with the shell\'s Close keeps the open ones as the next step, as Later does', await until(() => lines('triage-answers.jsonl').filter((l) => l.kind === 'later').length > later0) && !!(await toastIs(/Kept as the next step of Partner usage per key/)));
|
|
144
146
|
|
|
145
147
|
/* M move and Undo, from the panel's ⋯ (BdActions) */
|
|
146
|
-
|
|
148
|
+
await until(() => listed('pa-one'), 30000); await p.click('#ibBody .ini2[data-key="board:pa-one"]');
|
|
149
|
+
const m1 = await vwMenu(p); await p.keyboard.press('Escape');
|
|
150
|
+
ok('M1 ⋯ offers Move to a stage, Put on hold, Archive and Cancel the initiative, red and last', ['Move to a stage', 'Put on hold', 'Archive'].every((l) => m1.includes(l)) && m1[m1.length - 1] === 'Cancel the initiative', JSON.stringify(m1));
|
|
151
|
+
await closeAll();
|
|
152
|
+
ok('M1 Move to a stage lists the later stages first to move to', await acts('pa-one') && await p.evaluate(() => !!document.querySelector('#bdPop [data-rowact^="mv:"]')), await p.evaluate(() => document.querySelector('#bdPop').textContent));
|
|
147
153
|
await p.keyboard.press('Escape');
|
|
148
154
|
ok('M2 Escape closes the menu and gives the focus back to the Viewer\'s ⋯ button', await until(() => p.evaluate(() => document.querySelector('#bdPop').hidden && document.activeElement.dataset.czVw === 'more')), await p.evaluate(() => document.activeElement.outerHTML.slice(0, 120)));
|
|
149
155
|
await p.keyboard.press('Escape');
|
|
@@ -157,18 +163,19 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
157
163
|
await closeAll();
|
|
158
164
|
|
|
159
165
|
/* L hold, resume, cancel, reopen, archive, restore: each at once, with Undo */
|
|
160
|
-
await
|
|
166
|
+
await more('pa-one', 'Put on hold');
|
|
161
167
|
const hl = await until(() => lines('lifecycle.jsonl').find((l) => l.initiative_id === 'pa-one' && l.state === 'on-hold'));
|
|
162
168
|
ok('L1 Hold records one on-hold line at once, with a check-back day 30 days on, and Undo', !!hl && /^\d{4}-\d{2}-\d{2}$/.test(hl.back || '') && Math.round((Date.parse(hl.back) - Date.now()) / 86400000) >= 29 && !!(await toastIs(/On hold · .* check back/)), JSON.stringify(hl));
|
|
163
169
|
await closeAll();
|
|
164
170
|
ok('L2 the row then says On hold', await until(async () => { const t = await p.evaluate(() => { const b = document.querySelector('#ibBody .ini2[data-key="board:pa-one"]'); return b ? b.textContent : ''; }); return /On hold/.test(t); }, 30000));
|
|
165
|
-
await
|
|
166
|
-
|
|
167
|
-
|
|
171
|
+
await p.click('#ibBody .ini2[data-key="board:pa-one"]');
|
|
172
|
+
const l2 = await vwMenu(p);
|
|
173
|
+
ok('L2 ⋯ offers Resume in place of Put on hold, and no stage moves', l2.includes('Resume') && !l2.includes('Put on hold') && !l2.includes('Move to a stage') && !l2.includes('Move back a stage'), JSON.stringify(l2));
|
|
174
|
+
await p.locator('.cz-vw-menu [role="menuitem"]').nth(l2.indexOf('Resume')).click();
|
|
168
175
|
ok('L3 Resume records an active line', await until(() => { const L = lines('lifecycle.jsonl').filter((l) => l.initiative_id === 'pa-one'); return L.length && L[L.length - 1].state === 'active'; }));
|
|
169
176
|
await closeAll();
|
|
170
177
|
await until(() => p.evaluate(() => { const b = document.querySelector('#ibBody .ini2[data-key="board:pa-one"]'); return b && !/On hold/.test(b.textContent); }), 30000);
|
|
171
|
-
await acts('pa-one'
|
|
178
|
+
await acts('pa-one', 'Cancel the initiative');
|
|
172
179
|
ok('L4 Cancel asks why, with the same chips as Decline, and records nothing yet', !!(await popOn(/Why cancel .*Out of scope.*Already planned.*Not now.*Other/)) && !lines('lifecycle.jsonl').some((l) => l.initiative_id === 'pa-one' && l.state === 'cancelled'));
|
|
173
180
|
await p.click('#bdPop [data-why="Not now"]'); await p.click('#bdPop [data-rowact="cancel-go"]');
|
|
174
181
|
ok('L4 Cancel records a cancelled line with the reason', await until(() => lines('lifecycle.jsonl').some((l) => l.initiative_id === 'pa-one' && l.state === 'cancelled' && l.reason === 'Not now')));
|
|
@@ -180,7 +187,7 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
180
187
|
ok('L6 Reopen records an active line', await until(() => { const L = lines('lifecycle.jsonl').filter((l) => l.initiative_id === 'pa-one'); return L[L.length - 1].state === 'active'; }));
|
|
181
188
|
await closeAll();
|
|
182
189
|
await until(() => listed('pa-one'), 30000);
|
|
183
|
-
await
|
|
190
|
+
await more('pa-one', 'Archive');
|
|
184
191
|
ok('L7 Archive records one archive line at once, with no reason asked', await until(() => lines('boards.jsonl').some((l) => l.kind === 'ini-archive' && l.id === 'pa-one' && l.archived === true)));
|
|
185
192
|
ok('L8 the ⋯ menu\'s item counts it as archived', await until(() => p.evaluate(() => /1 archived/.test((document.querySelector('#bdGone') || {}).textContent || '')), 30000));
|
|
186
193
|
await p.click('#bdToast .bd-undo');
|
|
@@ -196,6 +203,26 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
196
203
|
ok('I0 the expand link lands on Home with the initiative selected, ws and board kept', !!landed, await ip.evaluate(() => location.href));
|
|
197
204
|
// the page holds the Tasks (batch 11 item 20)
|
|
198
205
|
await until(() => ip.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) [data-hi-v]')), 60000);
|
|
206
|
+
/* X the one initiative ⋯ (batch 14 item 5, pm/ini-more.js): Home's page and the Board's panel list the same items in the same order; only
|
|
207
|
+
Home has Open on the Board (the Board is where the other one is) */
|
|
208
|
+
{
|
|
209
|
+
await ip.click('#czViewer:not([hidden]) [data-cz-vw="more"]'); await ip.waitForSelector('.cz-vw-menu [role="menuitem"]');
|
|
210
|
+
const homeM = await ip.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.querySelector('span').textContent));
|
|
211
|
+
if (process.env.PMOS_SHOTS) await ip.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-more-home.png') });
|
|
212
|
+
await ip.keyboard.press('Escape');
|
|
213
|
+
await closeAll(); await p.click('#ibBody .ini2[data-key="board:pa-one"]'); const boardM = await vwMenu(p);
|
|
214
|
+
if (process.env.PMOS_SHOTS) {
|
|
215
|
+
await p.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-more-board.png') }); await p.keyboard.press('Escape');
|
|
216
|
+
await vwPick(p, 'Change workflow'); await sleep(600); await p.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-more-board-wf.png') }); await p.keyboard.press('Escape');
|
|
217
|
+
await vwPick(p, 'Add a stakeholder'); await sleep(400); await p.screenshot({ path: path.join(process.env.PMOS_SHOTS, 'ini-more-board-person.png') }); await p.keyboard.press('Escape');
|
|
218
|
+
}
|
|
219
|
+
await p.keyboard.press('Escape'); await closeAll();
|
|
220
|
+
const { ORDER } = await import('./public/pm/ini-more.js');
|
|
221
|
+
const rank = (l) => ORDER.findIndex((o) => l === o || l.startsWith(o + ' '));
|
|
222
|
+
const inOrder = (L) => L.every((l, i) => rank(l) >= 0 && (i === 0 || rank(l) >= rank(L[i - 1])));
|
|
223
|
+
ok('X1 Home and the Board give the same ⋯ items in the same order (Home adds Open on the Board)', JSON.stringify(homeM.filter((l) => l !== 'Open on the Board')) === JSON.stringify(boardM) && homeM.includes('Open on the Board'), JSON.stringify({ homeM, boardM }));
|
|
224
|
+
ok('X2 the order is the one menu\'s: change it, its place, look at it, end it, then stop it, red and last', inOrder(homeM) && inOrder(boardM) && boardM[0] === 'Change workflow' && boardM[boardM.length - 1] === 'Cancel the initiative' && !boardM.includes('Open in full') && !boardM.includes('Move, hold, cancel or archive'), JSON.stringify(boardM));
|
|
225
|
+
}
|
|
199
226
|
await (async (pg) => { if (await pg.$('#czViewer [data-hi-view="stage"]')) await pg.click('#czViewer [data-hi-view="stage"]'); else await viaMore(pg, 'Stage'); })(ip);
|
|
200
227
|
const bar = await until(() => ip.evaluate(() => { const v = document.querySelector('#czViewer:not([hidden])'); if (!v || !v.querySelector('[data-ov-move]')) return null; const cur = v.querySelector('[data-ov-move][aria-pressed="true"]'); return { moves: [...v.querySelectorAll('[data-ov-move]')].map((x) => x.dataset.ovMove), cur: cur ? cur.dataset.ovMove : '', life: [...v.querySelectorAll('[data-ov-life]')].map((x) => x.dataset.ovLife) }; }), 60000);
|
|
201
228
|
ok('I1 the Overview offers the stages, the current one pressed, and the lifecycle presses', !!bar && bar.moves.length > 1 && !!bar.cur && bar.moves.indexOf(bar.cur) < bar.moves.length - 1 && bar.life.join() === 'on-hold,cancelled', JSON.stringify(bar) + ' ' + (await ip.evaluate(() => (document.querySelector('#czViewer .cz-vw-body') || {}).innerText || 'no Viewer')).slice(0, 400));
|
|
@@ -239,8 +266,8 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
239
266
|
await S.page.click('#chAsks');
|
|
240
267
|
ok('S1 the PMOS-self board names the router in its asks popover and hides New initiative', await until(() => S.page.evaluate(() => /pmos-router/.test((document.querySelector('#bdPop') || {}).textContent || '') && document.querySelector('#newIni').hidden)));
|
|
241
268
|
await S.page.keyboard.press('Escape');
|
|
242
|
-
await S.page.click('#ibBody .ini2'); await
|
|
243
|
-
ok('S2 its
|
|
269
|
+
await S.page.click('#ibBody .ini2'); const s2 = await vwMenu(S.page);
|
|
270
|
+
ok('S2 its ⋯ has no stage move and no workflow to change, and keeps Put on hold', !s2.includes('Move to a stage') && !s2.includes('Move back a stage') && !s2.includes('Moves on by itself') && !s2.includes('Change workflow') && s2.includes('Put on hold'), JSON.stringify(s2));
|
|
244
271
|
await S.ctx.close();
|
|
245
272
|
}
|
|
246
273
|
|
|
@@ -260,7 +287,7 @@ const ALLOWED = /^\/api\/(?:boards\/(?:asks\/(?:add|accept|decline)|move|archive
|
|
|
260
287
|
await until(() => S.page.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0), 30000);
|
|
261
288
|
const f = await S.page.evaluate(() => ({ wide: document.documentElement.scrollWidth > innerWidth + 1, small: [...document.querySelectorAll('#ibBody .ini2, #chAsks, #newIni')].filter((b) => b.offsetParent && (b.getBoundingClientRect().width < 44 || b.getBoundingClientRect().height < 44)).map((b) => b.className + ':' + Math.round(b.getBoundingClientRect().width) + 'x' + Math.round(b.getBoundingClientRect().height)) }));
|
|
262
289
|
ok('F1 at 390 px there is no sideways scroll and every new control is at least 44 px', !f.wide && !f.small.length, JSON.stringify(f));
|
|
263
|
-
await S.page.click('#ibBody .ini2'); await
|
|
290
|
+
await S.page.click('#ibBody .ini2'); await vwPick(S.page, 'Move to a stage');
|
|
264
291
|
const mi = await until(() => S.page.evaluate(() => { const L = [...document.querySelectorAll('#bdPop.sheet:not([hidden]) .bd-mi')]; return L.length ? L.every((b) => b.getBoundingClientRect().height >= 44) && document.documentElement.scrollWidth <= innerWidth + 1 : null; }));
|
|
265
292
|
ok('F2 the action rows are 44 px tall and the open sheet adds no sideways scroll', !!mi);
|
|
266
293
|
await S.ctx.close();
|
|
@@ -102,8 +102,9 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
|
|
|
102
102
|
await p.__ctx.close();
|
|
103
103
|
|
|
104
104
|
p = await scene({ time: at(8, 0), today: [MT('mB', 'Quota review', 13, 0, 14, 0)], needs: [{ key: 'k1', kind: 'due-today', id: i1.id, headline: 'Send the partner onboarding list to Lina' }], name: 'morning' });
|
|
105
|
-
c = await wait(p, /
|
|
106
|
-
|
|
105
|
+
c = await wait(p, /Your morning/);
|
|
106
|
+
// Your day E (YdE1Ready): the day's meetings by time and title, then what of yours is due; no count of what waits
|
|
107
|
+
ok('M5 the morning: lists the meetings and what of yours is due, and counts nothing', c && c.kind === 'morning' && /13:00\s*Quota review/.test(c.text) && /Send the partner onboarding list to Lina/.test(c.text) && !/\d+ items? of yours|this morning/.test(c.text), c && c.text);
|
|
107
108
|
await p.__ctx.close();
|
|
108
109
|
|
|
109
110
|
p = await scene({ time: at(14, 30), today: [MT('mB', 'Quota review', 16, 0, 17, 0)], name: 'work' });
|
|
@@ -112,8 +113,9 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
|
|
|
112
113
|
await p.__ctx.close();
|
|
113
114
|
|
|
114
115
|
p = await scene({ time: at(18, 0), today: [A], needs: [{ key: 'k1', kind: 'overdue', id: i1.id, headline: 'Send the partner onboarding list to Lina', days_late: 1 }], name: 'recap' });
|
|
115
|
-
c = await wait(p, /
|
|
116
|
-
|
|
116
|
+
c = await wait(p, /What today made possible/);
|
|
117
|
+
// Your day E (YdE3Evening): what moved, from phone-day; no counts and no "days late"
|
|
118
|
+
ok('M7 the evening: what today made possible, from phone-day, with no counts and no lateness', c && c.kind === 'recap' && /Sandbox dates agreed/.test(c.text) && /One thing tonight/.test(c.text) && !/\d+ items done|days? late/.test(c.text), c && c.text);
|
|
117
119
|
await p.__ctx.close();
|
|
118
120
|
|
|
119
121
|
p = await scene({ time: at(21, 0), today: [A], name: 'night' });
|
|
@@ -160,7 +162,8 @@ const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'applicati
|
|
|
160
162
|
await p.__ctx.close();
|
|
161
163
|
p = await scene({ time: at(18, 0), today: [A], dayFail: true });
|
|
162
164
|
c = await wait(p, /Today could not be read/);
|
|
163
|
-
|
|
165
|
+
// zero is silence (batch 15 item 3): with nothing of the PM's open the recap says nothing about it, but a failed read is always named
|
|
166
|
+
ok('E2 a failed phone-day read is named in the recap, and claims nothing it could not read', c && /could not be read/.test(c.text) && !/What today made possible/.test(c.text), c && c.text);
|
|
164
167
|
await p.__ctx.close();
|
|
165
168
|
|
|
166
169
|
/* W: desktop width and the POST allow-list */
|
|
@@ -134,6 +134,14 @@ async function context(o = {}) {
|
|
|
134
134
|
await tab.$eval('#rtBar [data-a="hl"]', (b) => b.click());
|
|
135
135
|
ok('T3 Highlight starts the recorder\'s highlight', await until(() => tab.evaluate(() => window.__premiumRecorder._hl === 1)));
|
|
136
136
|
|
|
137
|
+
/* T3b a press that gets no answer (Wawan, 2026-10-27: the clock stuck at 4:48 and the transcript stopped): the clock goes on */
|
|
138
|
+
await tab.evaluate(() => { const R = window.__premiumRecorder; window.__rtPause = R.pause; R.pause = () => new Promise(() => {}); window.__rtBusyMs = 2500; });
|
|
139
|
+
await tab.$eval('#rtBar [data-a="pause"]', (b) => b.click());
|
|
140
|
+
const c0 = await tab.evaluate(() => document.getElementById('rtClock').textContent);
|
|
141
|
+
ok('T3b while a press waits for its answer, the meeting clock still moves', await until(async () => (await tab.evaluate(() => document.getElementById('rtClock').textContent)) !== c0, 5000), c0);
|
|
142
|
+
ok('T3b the press gives up: the button comes back and the tab says to try again', await until(() => tab.evaluate(() => { const b = document.querySelector('#rtBar [data-a="pause"]'); return !!b && !b.disabled && /took too long/.test(document.getElementById('rtMsg').textContent); }), 8000));
|
|
143
|
+
await tab.evaluate(() => { window.__premiumRecorder.pause = window.__rtPause; delete window.__rtBusyMs; });
|
|
144
|
+
|
|
137
145
|
/* T4 the next meeting while this one records: the recording tab asks once */
|
|
138
146
|
await p.evaluate(() => new BroadcastChannel('pmos-rec').postMessage({ id: 'new1', switchTo: { title: 'Rail review', body: { title: 'Rail review' } }, at: Date.now() }));
|
|
139
147
|
ok('T4 the recording tab asks: Stop Design crit and record Rail review?', await until(() => tab.evaluate(() => /Stop Design crit and record Rail review\?/.test(document.getElementById('rtAsk').textContent))));
|
|
@@ -107,9 +107,13 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
107
107
|
const up = await until(() => page.evaluate(() => document.querySelectorAll('#ibBody [data-key]').length > 0), 20000);
|
|
108
108
|
ok('R9 the Board loads', up);
|
|
109
109
|
await page.click('#ibBody .ini2[data-key="board:self-serve-v2"]'); // a phone opens on the List view (premium-uncovered-features, BdPhone)
|
|
110
|
-
/* re-pointed (
|
|
111
|
-
const pk = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); return v && !v.hidden && c && c.kind === 'Initiative' ? { record: !!v.querySelector('[data-pk="record"]'), dlg: !!document.querySelector('#dlg.on')
|
|
112
|
-
|
|
110
|
+
/* re-pointed (batch 14 item 5): the initiative opens in the Viewer's shell A; its ⋯ (the one initiative menu) has The record, as Home's has */
|
|
111
|
+
const pk = await until(() => page.evaluate(() => { const v = document.querySelector('#czViewer'), c = window.czViewer && window.czViewer.current(); return v && !v.hidden && c && c.kind === 'Initiative' ? { record: !!v.querySelector('[data-pk="record"]'), dlg: !!document.querySelector('#dlg.on') } : null; }));
|
|
112
|
+
await page.click('#czViewer [data-cz-vw="more"]'); await page.waitForSelector('.cz-vw-menu [role="menuitem"]');
|
|
113
|
+
const mm = await page.evaluate(() => [...document.querySelectorAll('.cz-vw-menu [role="menuitem"]')].map((b) => b.querySelector('span').textContent));
|
|
114
|
+
ok('R9 an initiative row opens the Board\'s initiative in the Viewer, not the dialog, and its ⋯ has The record and no Open in full', !!pk && !pk.record && !pk.dlg && mm.includes('The record') && !mm.includes('Open in full'), JSON.stringify([pk, mm]));
|
|
115
|
+
await page.locator('.cz-vw-menu [role="menuitem"]').nth(mm.indexOf('The record')).click();
|
|
116
|
+
ok('R9 The record opens the initiative\'s record as a drill-in', await until(() => page.evaluate(() => { const c = window.czViewer && window.czViewer.current(); return !!c && c.kind !== 'Initiative' && !!document.querySelector('#czViewer [data-cz-vw="back"]'); })), await page.evaluate(() => JSON.stringify(window.czViewer.current())));
|
|
113
117
|
ok('R9 no page error on the Board', errors.length === 0, errors.join(' | '));
|
|
114
118
|
await ctx.close();
|
|
115
119
|
}
|
|
@@ -132,8 +132,9 @@ const TICKETS = {
|
|
|
132
132
|
const tk = await until(async () => { const t = await paneText(p, 'jira:PMOS-142'); return t && /Acceptance criteria/.test(t) ? t : null; });
|
|
133
133
|
ok('K1 a card opens its ticket in place of the sprint', !!tk && (await curId(p)) === 'jira:PMOS-142', JSON.stringify(await curId(p)));
|
|
134
134
|
ok('K2 the ticket leads with what holds it (flagged in Jira), then the facts Jira owns: status, sprint, points and priority', /^Blocked/.test(tk) && /Flagged in Jira/.test(tk) && /StatusTo Do/.test(tk) && /SprintSprint 14/.test(tk) && /Points5/.test(tk) && /PriorityHigh/.test(tk) && /Jira owns these\. They change only in Jira\./.test(tk), tk);
|
|
135
|
-
ok('K3 the description is the draft\'s sections, with bold kept and nothing run', /Description ·
|
|
135
|
+
ok('K3 the description is the draft\'s sections, with bold kept and nothing run', /Description · PMOS's copy, Jira may differ/.test(tk) && /User Story/.test(tk) && await p.evaluate(() => !!document.querySelector('#czViewer .tkv .ovd strong') && !document.querySelector('#czViewer .tkv img') && !window.__pwned));
|
|
136
136
|
ok('K4 the folds: acceptance criteria, subtasks as the reading\'s count, and the links from the draft; the where row names the initiative and its epic', /Acceptance criteria2/.test(tk) && /Subtasks1 of 3 done/.test(tk) && /Linked2/.test(tk) && /blocks/.test(tk) && /PMOS-152/.test(tk) && /drafted fromplanning\/prd\/self-serve-v2-prd.md/.test(tk) && /Self-serve onboarding v2Epic Self-serve v2/.test(tk));
|
|
137
|
+
ok('K6 batch 14 item 12: the header names the ticket by its key and title, not the key alone', await until(() => p.evaluate(() => /^PMOS-142 \S/.test(((document.querySelector('#czVwTitle') || {}).textContent || '').trim())), 5000), await p.evaluate(() => (document.querySelector('#czVwTitle') || {}).textContent));
|
|
137
138
|
ok('K5 no comments, history or fields panel: Open in Jira at the foot is the one real link', !/pull request|\bPR\b|builder/i.test(tk) && !/Comments \(/.test(tk) && /Open in Jira$/.test(tk)
|
|
138
139
|
&& await p.evaluate(() => [...document.querySelectorAll('#czViewer .obody.vw a[href]')].every((a) => a.href === 'https://acme.atlassian.net/browse/PMOS-142' && a.target === '_blank' && /noopener/.test(a.rel))));
|
|
139
140
|
await p.evaluate(() => { const f = document.querySelector('#czViewer [data-czs-fold="links"]'); if (f && f.getAttribute('aria-expanded') !== 'true') f.click(); }); // the one ticket Viewer's Linked fold (tk-view.js) opens first
|