create-pmos 0.419.0 → 0.420.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 -18
- 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/scripts/lane-defs.js +14 -1
- package/payload/scripts/workflow-state.js +2 -2
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-board-test.js +9 -13
- package/workspace/changelog.json +12 -0
- package/workspace/fixtures/report-api/draft.json +2 -1
- package/workspace/guide/home.md +2 -0
- package/workspace/home-other-product-test.js +18 -0
- package/workspace/home-rows-test.js +14 -0
- package/workspace/lib/board-premium.js +13 -3
- package/workspace/lib/brief.js +5 -0
- package/workspace/lib/engine/lane-defs.js +14 -1
- package/workspace/lib/engine/workflow-state.js +2 -2
- package/workspace/lib/hold-spans.js +64 -0
- package/workspace/lib/mention-store.js +49 -13
- package/workspace/lib/plan-tree.js +1 -1
- package/workspace/lib/report-draft.js +6 -0
- package/workspace/lib/routes-boards.js +22 -6
- package/workspace/lib/source-reads.js +5 -0
- package/workspace/lib/vendor/scripts/lane-defs.js +14 -1
- package/workspace/lib/vendor/scripts/workflow-state.js +2 -2
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/bd-acts.js +49 -1
- package/workspace/public/pm/bd-ini-panel.js +15 -8
- package/workspace/public/pm/bd-next.js +119 -0
- package/workspace/public/pm/bd-prog.js +1 -1
- package/workspace/public/pm/bd-span.js +117 -22
- package/workspace/public/pm/bd-views.js +7 -5
- package/workspace/public/pm/cozy-board.css +54 -9
- package/workspace/public/pm/cozy-today.css +9 -0
- package/workspace/public/pm/cozy-viewer.js +7 -3
- package/workspace/public/pm/cozy.css +10 -0
- package/workspace/public/pm/home-app.js +39 -13
- package/workspace/public/pm/home-ini.js +42 -11
- package/workspace/public/pm/home-list.js +22 -2
- package/workspace/public/pm/home-mentions.js +1 -1
- package/workspace/public/pm/home-today.js +13 -2
- package/workspace/public/pm/ini-tasks.js +363 -0
- package/workspace/public/pm/ini-view-model.js +19 -11
- package/workspace/public/pm/ini-view.css +160 -0
- package/workspace/public/pm/ini-view.js +39 -8
- package/workspace/public/pm/premium-board.js +54 -17
- package/workspace/public/pm/premium-vw-mtg.js +2 -0
- package/workspace/public/pm/task-card.js +6 -0
- package/workspace/skills/day-check.skill +2 -2
- package/workspace/skills/morning-brief.skill +1 -1
- package/workspace/skills/sources-read.skill +8 -4
- package/workspace/task-press-test.js +120 -0
- package/workspace/task-views-test.js +245 -0
- package/workspace/test-lists/task-press.json +6 -0
- package/workspace/test-lists/task-views.json +6 -0
- package/workspace/test-lists/timeline-holds.json +6 -0
- package/workspace/timeline-holds-test.js +191 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* task-press-test.js — a task's title on the initiative's view opens the task (batch 9 item 5a, Wawan 2026-10-26: "Cannot click the task and
|
|
4
|
+
* see its detail"). The view (pm/ini-view.js) draws the board's row; Home's page and the Board's panel both draw it.
|
|
5
|
+
* T1 Home: a task the initiative's own read holds opens the one task editor (task-card.js), ← back to the page
|
|
6
|
+
* T2 Home: a task only the board's row holds (a breakdown item, a stage task) opens the same editor, not "no longer on" or nothing
|
|
7
|
+
* T3 Home: the check box stays the Done control: it saves the state and opens nothing
|
|
8
|
+
* T4 the Board's panel: a task's title is a press and opens the same editor as a drill-in, ← back to the initiative
|
|
9
|
+
* Serves the real pages from the real server; the reads are fixtures. A 1440 shot of each editor goes to PMOS_SHOTS when it is set. */
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const { spawn } = require('child_process');
|
|
12
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
13
|
+
const T = require('./test-run').configure({ name: 'task-press' });
|
|
14
|
+
const IP = require('./lib/initiative-premium.js');
|
|
15
|
+
const F = require('./fixtures/initiative-premium-facts.js');
|
|
16
|
+
const BP = require('./lib/board-premium.js');
|
|
17
|
+
const BF = require('./fixtures/board-premium-facts.js');
|
|
18
|
+
const BRP = require('./lib/briefing-premium.js');
|
|
19
|
+
const BRF = require('./fixtures/briefing-premium-facts.js');
|
|
20
|
+
|
|
21
|
+
const BASE = T.BASE, SHOTS = process.env.PMOS_SHOTS || '';
|
|
22
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
23
|
+
const until = async (fn, ms = 15000, step = 100) => { const t0 = Date.now(); for (;;) { let v = null; 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, 400) : ''}`); };
|
|
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} task-press assertions passed`);
|
|
33
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
34
|
+
};
|
|
35
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
36
|
+
|
|
37
|
+
const ID = 'self-serve-v2';
|
|
38
|
+
// the board's row holds two tasks: t1 is in the initiative's own read too (fixtures ITEMS), t2 is only on the board (a breakdown item)
|
|
39
|
+
const TASKS = [
|
|
40
|
+
{ uid: 't1', title: 'UAT with five partners', status: 'To do', owner: 'Dara', end: '2026-10-27' },
|
|
41
|
+
{ uid: 't2', title: 'Parity check for the 23 documented rows', status: 'To do', owner: 'Ricky Cheah', end: '2026-11-11', item: true },
|
|
42
|
+
];
|
|
43
|
+
const withTasks = (m) => { (function walk(o) { if (!o || typeof o !== 'object') return; if (Array.isArray(o)) { o.forEach(walk); return; } if (o.id === ID && o.track) o.tasks = TASKS.map((x) => ({ ...x })); Object.values(o).forEach(walk); })(m); return m; };
|
|
44
|
+
const BOARD = withTasks(BP.build(BF.facts()));
|
|
45
|
+
const V = '#czViewer:not([hidden])';
|
|
46
|
+
const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
|
|
47
|
+
const shot = async (p, name) => { if (SHOTS) await p.screenshot({ path: path.join(SHOTS, name) }).catch(() => {}); };
|
|
48
|
+
|
|
49
|
+
async function page(url) {
|
|
50
|
+
const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } });
|
|
51
|
+
const p = await ctx.newPage();
|
|
52
|
+
const errors = [], posts = [];
|
|
53
|
+
p.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
|
|
54
|
+
p.on('request', (rq) => { if (rq.method() === 'POST') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); });
|
|
55
|
+
await p.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: IP.build(F.facts()), as_of: Date.now() }));
|
|
56
|
+
await p.route(/\/api\/board-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BOARD, as_of: Date.now() }));
|
|
57
|
+
await p.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRP.build(BRF.facts()), as_of: Date.now() }));
|
|
58
|
+
await p.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
|
|
59
|
+
await p.route('**/api/board-trail*', (r) => json(r, { ok: false, error: 'not in this check' }, 500));
|
|
60
|
+
await p.route('**/api/boards/items*', (r) => json(r, { ok: true, initiatives: [], items: [] }));
|
|
61
|
+
await p.route('**/api/boards/tasks/**', (r) => json(r, { ok: true }));
|
|
62
|
+
await p.goto(BASE + url);
|
|
63
|
+
return { ctx, p, errors, posts };
|
|
64
|
+
}
|
|
65
|
+
// the view's task rows: every stage section opened, so each task the board holds is drawn
|
|
66
|
+
const openSections = (p) => p.evaluate((v) => { let n = 0; for (const b of document.querySelectorAll(v + ' .iv-ws[aria-expanded="false"], ' + v + ' .iv-grp[aria-expanded="false"]')) { b.click(); n++; } return n; }, V);
|
|
67
|
+
const titleBtn = (p, uid) => until(async () => { await openSections(p); return p.evaluate((a) => !!document.querySelector(a[0] + ` [data-iv-task="${a[1]}"]`), [V, uid]); }, 10000);
|
|
68
|
+
// the one task editor: the initiative's view gave way, the Viewer's title is the task's, and the card (task-card.js) is drawn with its Status row
|
|
69
|
+
const editorOf = (p, title) => until(() => p.evaluate((a) => { const v = document.querySelector(a[0]), c = window.czViewer && window.czViewer.current(); if (!v || !c) return null;
|
|
70
|
+
const t = (v.querySelector('.cz-vw-title') || {}).textContent || '';
|
|
71
|
+
return !v.querySelector('.iv-sc') && t.includes(a[1]) && /Status/.test(v.textContent) && !/no longer on/.test(v.textContent) ? 'ok' : null; }, [V, title]), 8000);
|
|
72
|
+
const back = (p) => p.evaluate(() => { const b = document.querySelector('#czViewer [data-cz-vw="back"]'); if (!b || b.hidden) return false; b.click(); return true; });
|
|
73
|
+
|
|
74
|
+
(async () => {
|
|
75
|
+
const exe = findBrowser();
|
|
76
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
77
|
+
let chromium;
|
|
78
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
79
|
+
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
80
|
+
await T.waitForServer(BASE);
|
|
81
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
82
|
+
|
|
83
|
+
/* Home: the initiative's page in the Viewer */
|
|
84
|
+
const H = await page('/premium.html?ini=' + ID + '&ws=w1&board=w1&theme=light');
|
|
85
|
+
const hp = H.p;
|
|
86
|
+
const up = await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"] .iv-sc'), V), 30000);
|
|
87
|
+
ok('T0 Home opens the initiative\'s page', up);
|
|
88
|
+
ok('T1 each task\'s title is a press', await titleBtn(hp, 't1') && await titleBtn(hp, 't2'));
|
|
89
|
+
await hp.click(`${V} [data-iv-task="t1"]`);
|
|
90
|
+
ok('T1 a task the initiative\'s read holds opens the one task editor', await editorOf(hp, TASKS[0].title), await hp.evaluate((v) => { const c = window.czViewer.current(); return c.kind + ' / ' + document.querySelector(v).textContent.slice(0, 300); }, V));
|
|
91
|
+
ok('T1 ← goes back to the initiative\'s page', await back(hp) && await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V), 5000));
|
|
92
|
+
await titleBtn(hp, 't2');
|
|
93
|
+
await hp.click(`${V} [data-iv-task="t2"]`);
|
|
94
|
+
ok('T2 a task only the board\'s row holds opens the same editor, not a dead end', await editorOf(hp, TASKS[1].title), await hp.evaluate((v) => (document.querySelector(v) || {}).textContent, V));
|
|
95
|
+
await shot(hp, 'home-task-press-1440.png');
|
|
96
|
+
ok('T2 ← goes back to the page', await back(hp) && await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V), 5000));
|
|
97
|
+
await titleBtn(hp, 't1');
|
|
98
|
+
const n0 = H.posts.length;
|
|
99
|
+
await hp.click(`${V} [data-iv-check="t1"]`);
|
|
100
|
+
ok('T3 the check box saves Done and opens nothing', await until(() => H.posts.slice(n0).some((x) => x.path === '/api/boards/tasks/state' && x.body.task === 't1' && x.body.state === 'Done'), 5000)
|
|
101
|
+
&& await hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V), JSON.stringify(H.posts.slice(n0)));
|
|
102
|
+
ok('T0 no page error on Home', H.errors.length === 0, H.errors.join(' | '));
|
|
103
|
+
await H.ctx.close();
|
|
104
|
+
|
|
105
|
+
/* the Board's panel */
|
|
106
|
+
const B = await page('/premium-board.html?theme=light');
|
|
107
|
+
const bp = B.p;
|
|
108
|
+
const row = `.bt-l[data-row="board:${ID}"] .bt-nm`;
|
|
109
|
+
ok('T4 the Board lists the initiative', await until(() => bp.evaluate((s) => !!document.querySelector(s), row), 20000));
|
|
110
|
+
await bp.click(row);
|
|
111
|
+
ok('T4 its panel opens', await until(() => bp.evaluate(() => { const c = window.czViewer && window.czViewer.current(); return !!c && c.kind === 'Initiative'; }), 8000));
|
|
112
|
+
ok('T4 a task\'s title on the panel is a press', await titleBtn(bp, 't2'));
|
|
113
|
+
await bp.click(`${V} [data-iv-task="t2"]`);
|
|
114
|
+
ok('T4 it opens the one task editor', await editorOf(bp, TASKS[1].title), await bp.evaluate((v) => (document.querySelector(v) || {}).textContent, V));
|
|
115
|
+
await shot(bp, 'board-task-press-1440.png');
|
|
116
|
+
ok('T4 ← goes back to the initiative', await back(bp) && await until(() => bp.evaluate(() => { const c = window.czViewer && window.czViewer.current(); return !!c && c.kind === 'Initiative'; }), 5000));
|
|
117
|
+
ok('T4 no page error on the Board', B.errors.length === 0, B.errors.join(' | '));
|
|
118
|
+
await B.ctx.close();
|
|
119
|
+
return finish();
|
|
120
|
+
})().catch((e) => { console.error(e); finish(1); });
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* task-views-test.js — the initiative's Tasks as List, Timeline and Kanban, and a task's status and dates changed where it sits (feedback batch 9
|
|
4
|
+
* item 5b; canvas In development, row "Tasks views": XtvAGrill, XtvA1Status, XtvA1bDone, XtvA2Dates, XtvA3Timeline, XtvA4Kanban,
|
|
5
|
+
* XtvA5PhoneKanban, XtvA6PhoneTimeline, XtvA7BoardPanel). Serves the real Board page from the real server, answers GET /api/board-premium
|
|
6
|
+
* with the model lib/board-premium.js builds from fixtures/board-premium-facts.js plus one initiative's tasks, and captures the writes.
|
|
7
|
+
* V1 the view switch, remembered · V2 the box's one press and its caret · V3 the date press · V4 Timeline · V5 a bar's drag · V6 Kanban
|
|
8
|
+
* V7 a card's drag · V8 Won't do and Archived in the List · V9 the phone. SHOTS_5B=<dir> writes the screens. */
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const { spawn } = require('child_process');
|
|
11
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
12
|
+
const T = require('./test-run').configure({ name: 'task-views' });
|
|
13
|
+
const BP = require('./lib/board-premium.js');
|
|
14
|
+
const F = require('./fixtures/board-premium-facts.js');
|
|
15
|
+
|
|
16
|
+
const BASE = T.BASE;
|
|
17
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
18
|
+
const until = async (fn, ms = 10000, step = 100) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
19
|
+
const results = [];
|
|
20
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
|
|
21
|
+
let srv = null; let browser = null;
|
|
22
|
+
const finish = async (code) => {
|
|
23
|
+
if (browser) await browser.close().catch(() => {});
|
|
24
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
25
|
+
T.killTmux();
|
|
26
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
27
|
+
console.log(`\n${results.length - bad}/${results.length} task-views assertions passed`);
|
|
28
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
29
|
+
};
|
|
30
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
31
|
+
|
|
32
|
+
/* the fixture's day is 2026-10-17; Usage-based billing is in Discover */
|
|
33
|
+
const TASKS = [
|
|
34
|
+
{ uid: 'task-a', title: 'Parity check for the 23 documented rows', status: 'In progress', owner: 'Claude', start: '2026-10-14', end: '2026-10-21', section: 'discover' },
|
|
35
|
+
{ uid: 'task-b', title: 'Establish current behaviour for the 8 unverified rows', status: 'To do', owner: 'Claude', end: '2026-10-21', section: 'discover' },
|
|
36
|
+
{ uid: 'task-c', title: 'Map SDK public methods to v6', status: 'In progress', owner: 'Claude', start: '2026-10-08', end: '2026-10-10', section: 'discover' },
|
|
37
|
+
{ uid: 'task-d', title: 'Stakeholder review with Security', status: 'To do', owner: 'Wawan', section: 'discover' },
|
|
38
|
+
{ uid: 'task-e', title: 'Kick-off notes with the team', status: 'Done', owner: 'Wawan', end: '2026-10-12', section: 'discover' },
|
|
39
|
+
{ uid: 'task-f', title: 'Drop the legacy export', status: "Won't do", owner: 'Wawan', section: 'discover' },
|
|
40
|
+
{ uid: 'task-g', title: 'Old spike notes', status: 'Archived', owner: 'Wawan', section: 'discover' },
|
|
41
|
+
{ uid: 'task-h', title: 'Plan the rollout', status: 'To do', owner: 'Wawan', start: '2026-11-02', end: '2026-11-06', section: 'plan' },
|
|
42
|
+
];
|
|
43
|
+
const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) => x.id === 'usage-billing'); r.tasks = TASKS.map((t) => ({ ...t })); return M; };
|
|
44
|
+
|
|
45
|
+
(async () => {
|
|
46
|
+
const exe = findBrowser();
|
|
47
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
48
|
+
let chromium;
|
|
49
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
50
|
+
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT), PMOS_SELF_ROOT: path.resolve(__dirname, '..') }) });
|
|
51
|
+
await T.waitForServer(BASE);
|
|
52
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
53
|
+
|
|
54
|
+
const open = async ({ w = 1440, h = 900, theme = 'light', touch = false, store = null } = {}) => {
|
|
55
|
+
const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: touch, isMobile: touch });
|
|
56
|
+
if (store) await ctx.addInitScript((s) => { for (const [k, v] of Object.entries(s)) localStorage.setItem(k, v); }, store);
|
|
57
|
+
const page = await ctx.newPage();
|
|
58
|
+
const errors = [], posts = [];
|
|
59
|
+
page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
|
|
60
|
+
await page.route('**/api/board-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: model(), as_of: Date.now() }) }));
|
|
61
|
+
await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'not in this check' }) }));
|
|
62
|
+
await page.route(/\/api\/(boards\/|lifecycle|board-metrics-premium)/, (r) => { const rq = r.request(), pth = new URL(rq.url()).pathname; if (rq.method() !== 'GET') posts.push({ path: pth, body: JSON.parse(rq.postData() || '{}') }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
|
|
63
|
+
await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [] }) }));
|
|
64
|
+
await page.goto(BASE + '/premium-board.html?theme=' + theme);
|
|
65
|
+
await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
|
|
66
|
+
// the initiative's panel, from its row's name
|
|
67
|
+
await page.evaluate(() => { const b = [...document.querySelectorAll('[data-row="board:usage-billing"] .bt-nm, [data-key="board:usage-billing"]')].find((x) => x.offsetParent); if (b) b.click(); });
|
|
68
|
+
await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv .iv-th')));
|
|
69
|
+
return { ctx, page, errors, posts };
|
|
70
|
+
};
|
|
71
|
+
const shot = async (p, name) => { if (process.env.SHOTS_5B) await p.screenshot({ path: path.join(process.env.SHOTS_5B, name + '.png') }); };
|
|
72
|
+
const lastPost = (A, route) => A.posts.filter((x) => x.path === route).pop();
|
|
73
|
+
|
|
74
|
+
const A = await open(), p = A.page;
|
|
75
|
+
/* V1 the switch: List first; icon only, words in aria-label; the last view is remembered */
|
|
76
|
+
const sw = await p.evaluate(() => [...document.querySelectorAll('#czViewer .ivx-sb')].map((b) => b.getAttribute('aria-label') + (b.getAttribute('aria-pressed') === 'true' ? '*' : '') + (b.textContent.trim() ? '+text' : '')).join());
|
|
77
|
+
ok('V1 the Tasks header has the icon-only switch List, Timeline, Kanban; the first time it is List', sw === 'List*,Timeline,Kanban', sw);
|
|
78
|
+
const order = await p.evaluate(() => [...document.querySelector('#czViewer .iv-th').children].map((e) => e.className || e.tagName).join());
|
|
79
|
+
ok('V1 the switch sits before the +', /ivx-seg,iv-ib$/.test(order), order);
|
|
80
|
+
|
|
81
|
+
/* V8 the List: Won't do joins the Done fold, struck through; Archived is a fold after Done, only when there is one */
|
|
82
|
+
await p.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .iv-grp')].find((x) => /^Done/.test(x.textContent)); if (b) b.click(); });
|
|
83
|
+
await sleep(150);
|
|
84
|
+
await p.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .iv-grp')].find((x) => /^Archived/.test(x.textContent)); if (b) b.click(); });
|
|
85
|
+
await sleep(150);
|
|
86
|
+
const L = await p.evaluate(() => {
|
|
87
|
+
const grp = [...document.querySelectorAll('#czViewer .iv-grp')].map((b) => [...b.children].map((c) => c.textContent.trim()).filter(Boolean).join(' '));
|
|
88
|
+
const wo = [...document.querySelectorAll('#czViewer .iv-tr.wo .iv-tt')].map((e) => e.textContent + ':' + getComputedStyle(e).textDecorationLine);
|
|
89
|
+
const ar = [...document.querySelectorAll('#czViewer .iv-tr.ar')].map((e) => e.textContent.replace(/\s+/g, ' ').trim());
|
|
90
|
+
return { grp, wo, ar, count: document.querySelector('#czViewer .iv-th .n').textContent };
|
|
91
|
+
});
|
|
92
|
+
ok('V8 Won\'t do joins the Done fold, struck through', L.grp.includes('Done 2') && L.wo.length === 1 && /Drop the legacy export:line-through/.test(L.wo[0]), JSON.stringify(L));
|
|
93
|
+
ok('V8 Archived folds after Done and counts nowhere else', L.grp.indexOf('Archived 1') === L.grp.indexOf('Done 2') + 1 && L.ar.length === 1 && /Old spike notes/.test(L.ar[0]) && L.count === '5 open · 2 done', JSON.stringify(L));
|
|
94
|
+
|
|
95
|
+
/* V2 one press on the box marks done, with Undo in the toast */
|
|
96
|
+
await p.click('#czViewer [data-iv-check="task-b"]');
|
|
97
|
+
const done = await until(() => { const x = lastPost(A, '/api/boards/tasks/state'); return x && x.body.task === 'task-b' ? x : null; });
|
|
98
|
+
const toast = await until(() => p.evaluate(() => { const t = document.querySelector('#bdToast'); return t && !t.hidden ? t.textContent : null; }));
|
|
99
|
+
ok('V2 one press on the box marks the task done', done && done.body.state === 'Done', JSON.stringify(done));
|
|
100
|
+
ok('V2 the toast says it, with Undo', /^Done: Establish current behaviour/.test(toast || '') && /Undo/.test(toast || ''), toast);
|
|
101
|
+
await p.click('#bdToast .bd-undo');
|
|
102
|
+
const undo = await until(() => { const x = lastPost(A, '/api/boards/tasks/state'); return x && x.body.state === 'To do' ? x : null; });
|
|
103
|
+
ok('V2 Undo puts the old status back', !!undo, JSON.stringify(A.posts.slice(-2)));
|
|
104
|
+
/* the caret on the box opens the task card's five status icons right under it */
|
|
105
|
+
await p.hover('#czViewer [data-iv-check="task-a"]');
|
|
106
|
+
const car = await p.evaluate(() => { const c = document.querySelector('#czViewer [data-iv-stat="task-a"]'); return c ? { op: getComputedStyle(c).opacity, label: c.getAttribute('aria-label') } : null; });
|
|
107
|
+
ok('V2 the box carries a caret on hover that changes the status', car && car.op === '1' && car.label === 'Change the status: Parity check for the 23 documented rows', JSON.stringify(car));
|
|
108
|
+
await p.click('#czViewer [data-iv-stat="task-a"]');
|
|
109
|
+
const pop = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq'); if (!q) return null; const a = document.querySelector('#czViewer [data-iv-stat="task-a"]').getBoundingClientRect(), r = q.getBoundingClientRect();
|
|
110
|
+
return { btns: [...q.querySelectorAll('[data-ivq-state]')].map((b) => (b.getAttribute('aria-label') || b.textContent.trim()) + (b.getAttribute('aria-checked') === 'true' ? '*' : '')).join(), under: Math.round(r.top - a.bottom), dx: Math.round(r.left - a.left) }; }));
|
|
111
|
+
ok('V2 the status picker is the task card\'s five icons, only the current one named, right under the caret', pop && pop.btns === 'To do,In progress*,Done,Won\'t do,Archive' && pop.under >= 0 && pop.under <= 12 && Math.abs(pop.dx) < 40, JSON.stringify(pop));
|
|
112
|
+
await shot(p, 'list-status-1440');
|
|
113
|
+
await p.click('.tkc.ivq [data-ivq-state="Won\'t do"]');
|
|
114
|
+
const wont = await until(() => { const x = lastPost(A, '/api/boards/tasks/state'); return x && x.body.task === 'task-a' ? x : null; });
|
|
115
|
+
ok('V2 a status picked there saves at once', wont && wont.body.state === "Won't do", JSON.stringify(wont));
|
|
116
|
+
|
|
117
|
+
/* V3 the date press opens the task card's start and due picker right under it; an undated row shows a calendar icon on hover only */
|
|
118
|
+
const dbtn = await p.evaluate(() => { const b = document.querySelector('#czViewer .iv-tr [data-iv-date="task-c"]'); const n = document.querySelector('#czViewer .iv-tr [data-iv-date="task-d"]'); return { t: b && b.textContent, w: b && b.classList.contains('w'), none: n && getComputedStyle(n).opacity, nl: n && n.getAttribute('aria-label') }; });
|
|
119
|
+
ok('V3 the dates in a row are a press, amber when late; an undated row\'s calendar icon is hidden until hover', dbtn.t === 'Oct 8 – Oct 10' && dbtn.w && dbtn.none === '0' && /^Add dates: Stakeholder review/.test(dbtn.nl), JSON.stringify(dbtn));
|
|
120
|
+
await p.click('#czViewer .iv-tr [data-iv-date="task-c"]');
|
|
121
|
+
const dp = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); if (!q) return null; return { two: [...q.querySelectorAll('[data-tkc-field]')].map((b) => b.textContent).join('|'), on: (q.querySelector('[data-tkc-field].on') || {}).textContent }; }));
|
|
122
|
+
ok('V3 the start and due picker opens with the due field picked', dp && dp.two === 'StartOct 8|DueOct 10' && dp.on === 'DueOct 10', JSON.stringify(dp));
|
|
123
|
+
await p.click('.tkc.ivq .tkc-dp [data-tkc-day="2026-10-24"]');
|
|
124
|
+
const dd = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.task === 'task-c' ? x : null; });
|
|
125
|
+
ok('V3 a day picked there saves the due day at once', dd && dd.body.due === '2026-10-24' && dd.body.start == null, JSON.stringify(dd));
|
|
126
|
+
const dt = await until(() => p.evaluate(() => { const t = document.querySelector('#bdToast'); return t && !t.hidden && /Dates saved/.test(t.textContent) ? t.textContent : null; }));
|
|
127
|
+
ok('V3 the toast says the dates are saved, with Undo', /Undo/.test(dt || ''), dt);
|
|
128
|
+
await p.click('#bdToast .bd-undo');
|
|
129
|
+
const du = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.due === '2026-10-10' ? x : null; });
|
|
130
|
+
ok('V3 Undo puts the old due day back', !!du, JSON.stringify(A.posts.slice(-2)));
|
|
131
|
+
|
|
132
|
+
/* V4 Timeline: the same groups, bars by start → due, a circle for a due day only, a dashed date press at today, the Today line */
|
|
133
|
+
await p.click('#czViewer [data-iv-view="timeline"]');
|
|
134
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .ivt')));
|
|
135
|
+
await sleep(200);
|
|
136
|
+
const tl = await p.evaluate(() => {
|
|
137
|
+
const T = document.querySelector('#czViewer .ivt'), rows = [...T.querySelectorAll('.ivt-r.k')];
|
|
138
|
+
const bar = (uid) => { const b = T.querySelector(`[data-ivt-bar="${uid}"]`); return b ? b.className.replace(/\s+/g, ' ').trim() : null; };
|
|
139
|
+
const today = T.querySelector('.ivt-today').getBoundingClientRect(), sc = T.querySelector('.ivt-sc'), nw = T.querySelector('.ivt-n').getBoundingClientRect();
|
|
140
|
+
return { groups: [...T.querySelectorAll('.ivt-gh b')].map((b) => b.textContent), rows: rows.map((r) => (r.querySelector('.iv-tt') || {}).textContent || r.textContent.trim()), a: bar('task-a'), b: bar('task-b'), c: bar('task-c'),
|
|
141
|
+
ghost: !!T.querySelector('.ivt-g[data-iv-date="task-d"]'), zoom: document.querySelector('#czViewer [data-iv-zoom]').textContent, seen: today.left > nw.right && today.left < sc.getBoundingClientRect().right,
|
|
142
|
+
lg: document.querySelector('#czViewer .ivt-lg').textContent, arch: /Old spike notes/.test(T.textContent) };
|
|
143
|
+
});
|
|
144
|
+
ok('V4 Timeline keeps the List\'s stage groups', tl.groups.join('|') === 'Triage|Discover|Later: Plan, Prioritize, Build, Deliver, Monitor, Evaluate', JSON.stringify(tl.groups));
|
|
145
|
+
ok('V4 bars by start and due: in progress light blue, late amber; a due day only is a circle; no dates is a dashed date press', /ivt-b/.test(tl.a) && / pr/.test(tl.a) && /ivt-d/.test(tl.b) && /ivt-b lt/.test(tl.c) && tl.ghost, JSON.stringify(tl));
|
|
146
|
+
ok('V4 Weeks is the first zoom; it opens on today, the Today line in view; the legend sits under it', tl.zoom === 'Weeks' && tl.seen && /To do.*In progress.*Late.*Due only.*Jira, read only/.test(tl.lg), JSON.stringify(tl));
|
|
147
|
+
ok('V4 an archived task shows nowhere in Timeline', !tl.arch);
|
|
148
|
+
await shot(p, 'timeline-1440');
|
|
149
|
+
await p.click('#czViewer [data-iv-zoom]');
|
|
150
|
+
await p.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /Months/.test(x.textContent)); if (b) b.click(); });
|
|
151
|
+
const mz = await until(() => p.evaluate(() => { const z = document.querySelector('#czViewer [data-iv-zoom]'); return z && z.textContent === 'Months' ? document.querySelector('#czViewer .ivt').dataset.px : null; }));
|
|
152
|
+
ok('V4 the zoom picker changes Weeks to Months', mz === '4', mz);
|
|
153
|
+
await p.click('#czViewer [data-iv-zoom]');
|
|
154
|
+
await p.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /Weeks/.test(x.textContent)); if (b) b.click(); });
|
|
155
|
+
await until(() => p.evaluate(() => (document.querySelector('#czViewer [data-iv-zoom]') || {}).textContent === 'Weeks'));
|
|
156
|
+
|
|
157
|
+
/* V5 drag a bar: it snaps to days, a tip says the new dates, the save follows with Undo; an end changes only its own day */
|
|
158
|
+
const bb = await p.evaluate(() => { const r = document.querySelector('#czViewer [data-ivt-bar="task-a"]').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2, l: r.left, r: r.right }; });
|
|
159
|
+
await p.mouse.move(bb.x, bb.y); await p.mouse.down(); await p.mouse.move(bb.x + 20, bb.y, { steps: 3 }); await p.mouse.move(bb.x + 42, bb.y, { steps: 3 });
|
|
160
|
+
const tip = await p.evaluate(() => (document.querySelector('#czViewer .ivt-tip') || {}).textContent || null);
|
|
161
|
+
await p.mouse.up();
|
|
162
|
+
const mv = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.task === 'task-a' ? x : null; });
|
|
163
|
+
ok('V5 dragging a bar shows the new dates in a tip, snapped to days', tip === 'Oct 17 → 24', tip);
|
|
164
|
+
ok('V5 the drop saves the new start and due at once', mv && mv.body.start === '2026-10-17' && mv.body.due === '2026-10-24', JSON.stringify(mv));
|
|
165
|
+
ok('V5 the drop does not open the date picker', !(await p.evaluate(() => !!document.querySelector('.tkc.ivq'))));
|
|
166
|
+
await sleep(500);
|
|
167
|
+
const b2 = await p.evaluate(() => { const r = document.querySelector('#czViewer [data-ivt-bar="task-a"] .ivt-gp.r').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2 }; });
|
|
168
|
+
await p.hover('#czViewer [data-ivt-bar="task-a"]');
|
|
169
|
+
await p.mouse.move(b2.x, b2.y); await p.mouse.down(); await p.mouse.move(b2.x + 30, b2.y, { steps: 4 }); await p.mouse.up();
|
|
170
|
+
const end = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.task === 'task-a' && x.body.start == null ? x : null; });
|
|
171
|
+
ok('V5 dragging the end changes only the due day', end && end.body.due === '2026-10-23', JSON.stringify(end));
|
|
172
|
+
await sleep(500);
|
|
173
|
+
await p.click('#czViewer [data-ivt-bar="task-c"]');
|
|
174
|
+
ok('V5 a press on a bar opens the date picker under it', await until(() => p.evaluate(() => !!document.querySelector('.tkc.ivq .tkc-dp')), 2000));
|
|
175
|
+
await p.keyboard.press('Escape');
|
|
176
|
+
ok('V5 Escape closes the picker and leaves the panel open', await p.evaluate(() => !document.querySelector('.tkc.ivq') && !!document.querySelector('#czViewer .ivt')));
|
|
177
|
+
|
|
178
|
+
/* V6 Kanban: one stage at a time (the current first), columns by status, Won't do a folded strip */
|
|
179
|
+
await p.click('#czViewer [data-iv-view="kanban"]');
|
|
180
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .ivk')));
|
|
181
|
+
const kb = await p.evaluate(() => { const K = document.querySelector('#czViewer .ivk'); return { stage: document.querySelector('#czViewer [data-iv-kstage]').textContent, cols: [...K.querySelectorAll('.ivk-c h4')].map((h) => h.textContent).join('|'), wont: K.querySelector('.ivk-w').textContent, cards: [...K.querySelectorAll('.ivk-d .iv-tt')].map((e) => e.textContent), arch: /Old spike notes/.test(K.textContent) }; });
|
|
182
|
+
ok('V6 Kanban opens on the current stage, with columns To do, In progress, Done', kb.stage === 'Discover' && kb.cols === 'To do2|In progress2|Done1', JSON.stringify(kb));
|
|
183
|
+
ok('V6 Won\'t do is a folded strip with its count; archived shows nowhere', kb.wont === "Won't do · 1" && !kb.arch, JSON.stringify(kb));
|
|
184
|
+
await shot(p, 'kanban-1440');
|
|
185
|
+
await p.click('#czViewer [data-iv-kstage]');
|
|
186
|
+
const st = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivq-m'); return q ? [...q.querySelectorAll('[data-ivq-i]')].map((b) => b.textContent.replace(/\s+/g, ' ').trim()) : null; }));
|
|
187
|
+
ok('V6 the stage picker: current stage first, All stages, then the rest, each with its count', st && st.join('|') === 'Discover1 late · 4 open|All stages5 open|Triage|Later stages1 to do', JSON.stringify(st));
|
|
188
|
+
await p.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq [data-ivq-i]')].find((x) => /All stages/.test(x.textContent)); if (b) b.click(); });
|
|
189
|
+
const all = await until(() => p.evaluate(() => (document.querySelector('#czViewer [data-iv-kstage]') || {}).textContent === 'All stages' ? document.querySelectorAll('#czViewer .ivk-d').length : null));
|
|
190
|
+
ok('V6 All stages shows every task but the archived one (Won\'t do stays in its folded strip)', all === 6, String(all));
|
|
191
|
+
|
|
192
|
+
/* V7 drag a card to another column: its status changes */
|
|
193
|
+
await p.dragAndDrop('#czViewer [data-ivk-card="task-b"]', '#czViewer [data-ivk-col="In progress"]');
|
|
194
|
+
const dg = await until(() => { const x = lastPost(A, '/api/boards/tasks/state'); return x && x.body.task === 'task-b' && x.body.state === 'In progress' ? x : null; });
|
|
195
|
+
ok('V7 dragging a card to In progress saves its status', !!dg, JSON.stringify(A.posts.slice(-2)));
|
|
196
|
+
|
|
197
|
+
/* V1 the view is remembered across initiatives and visits */
|
|
198
|
+
const R = await open({ store: await p.evaluate(() => ({ 'pmos.tasks.view': localStorage.getItem('pmos.tasks.view') })) });
|
|
199
|
+
const rem = await R.page.evaluate(() => (document.querySelector('#czViewer .ivx-sb[aria-pressed="true"]') || {}).dataset.ivView);
|
|
200
|
+
ok('V1 the last view is remembered for the PM: the next panel opens on Kanban', rem === 'kanban', rem);
|
|
201
|
+
await R.ctx.close();
|
|
202
|
+
ok('V0 no page error', A.errors.length === 0, A.errors.join(' | '));
|
|
203
|
+
if (process.env.SHOTS_5B) {
|
|
204
|
+
await p.emulateMedia({ colorScheme: 'dark' }); await p.goto(BASE + '/premium-board.html?theme=dark'); await sleep(200);
|
|
205
|
+
}
|
|
206
|
+
await A.ctx.close();
|
|
207
|
+
|
|
208
|
+
/* V9 the phone: Kanban one column a screen with tabs; Timeline puts the title above its bar and does not drag */
|
|
209
|
+
for (const theme of ['light', 'dark']) {
|
|
210
|
+
const Ph = await open({ w: 390, h: 844, theme, touch: true, store: { 'pmos.tasks.view': 'kanban' } }), q = Ph.page;
|
|
211
|
+
const pk = await q.evaluate(() => { const K = document.querySelector('#czViewer .ivk'), t = document.querySelector('#czViewer .ivk-tabs'), c = K && K.querySelector('.ivk-c'); return K ? { tabs: t && getComputedStyle(t).display, tw: [...t.querySelectorAll('button')].map((b) => b.textContent.trim()).join('|'), cw: Math.round(c.getBoundingClientRect().width), kw: Math.round(K.getBoundingClientRect().width), car: getComputedStyle(document.querySelector('#czViewer .iv-car') || document.body).display } : null; });
|
|
212
|
+
if (theme === 'light') {
|
|
213
|
+
ok('V9 phone Kanban: one column a screen, the next peeks, status tabs on top', pk && pk.tabs === 'flex' && pk.tw === 'To do 2|In progress 2|Done 1' && pk.cw < pk.kw && pk.cw > pk.kw * 0.7, JSON.stringify(pk));
|
|
214
|
+
ok('V9 phone: no caret (a long press on the box opens the status picker)', pk && pk.car === 'none', JSON.stringify(pk));
|
|
215
|
+
}
|
|
216
|
+
await shot(q, 'kanban-390-' + theme);
|
|
217
|
+
await q.evaluate(() => document.querySelector('#czViewer [data-iv-view="timeline"]').click());
|
|
218
|
+
await until(() => q.evaluate(() => !!document.querySelector('#czViewer .ivt')));
|
|
219
|
+
await sleep(200);
|
|
220
|
+
const pt = await q.evaluate(() => { const r = document.querySelector('#czViewer .ivt-r.k'), n = r.querySelector('.ivt-n').getBoundingClientRect(), c = r.querySelector('.ivt-c').getBoundingClientRect(); return { above: c.top >= n.bottom - 1, grips: getComputedStyle(document.querySelector('#czViewer .ivt-gp') || document.body).display }; });
|
|
221
|
+
if (theme === 'light') ok('V9 phone Timeline: the title sits above its bar; no drag grips', pt.above && pt.grips === 'none', JSON.stringify(pt));
|
|
222
|
+
await shot(q, 'timeline-390-' + theme);
|
|
223
|
+
if (theme === 'light') {
|
|
224
|
+
// a long press on the box opens the status picker; the click that follows does not mark it done
|
|
225
|
+
await q.evaluate(() => document.querySelector('#czViewer [data-iv-view="list"]').click());
|
|
226
|
+
await until(() => q.evaluate(() => !!document.querySelector('#czViewer [data-iv-check="task-b"]')));
|
|
227
|
+
const n0 = Ph.posts.length;
|
|
228
|
+
const bx = await q.evaluate(() => { const r = document.querySelector('#czViewer [data-iv-check="task-b"]').getBoundingClientRect(); return { x: r.left + r.width / 2, y: r.top + r.height / 2 }; });
|
|
229
|
+
const cdp = await q.context().newCDPSession(q);
|
|
230
|
+
await cdp.send('Input.dispatchTouchEvent', { type: 'touchStart', touchPoints: [{ x: bx.x, y: bx.y }] });
|
|
231
|
+
await sleep(700);
|
|
232
|
+
await cdp.send('Input.dispatchTouchEvent', { type: 'touchEnd', touchPoints: [] });
|
|
233
|
+
await sleep(300);
|
|
234
|
+
const lp = await q.evaluate(() => !!document.querySelector('.tkc.ivq .ivq-st'));
|
|
235
|
+
ok('V9 phone: a long press on the box opens the status picker and marks nothing done', lp && Ph.posts.length === n0, JSON.stringify({ lp, posts: Ph.posts.slice(n0) }));
|
|
236
|
+
await shot(q, 'list-longpress-390');
|
|
237
|
+
}
|
|
238
|
+
await Ph.ctx.close();
|
|
239
|
+
}
|
|
240
|
+
if (process.env.SHOTS_5B) {
|
|
241
|
+
const D = await open({ theme: 'dark', store: { 'pmos.tasks.view': 'timeline' } }); await sleep(200); await shot(D.page, 'timeline-1440-dark');
|
|
242
|
+
await D.page.evaluate(() => document.querySelector('#czViewer [data-iv-view="kanban"]').click()); await sleep(200); await shot(D.page, 'kanban-1440-dark'); await D.ctx.close();
|
|
243
|
+
}
|
|
244
|
+
return finish();
|
|
245
|
+
})();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Batch 9 item 5a (Wawan 2026-10-26: \"Cannot click the task and see its detail\"): a task's title on the initiative's view opens the one task editor, on Home's page and on the Board's panel, also for a task only the board's row holds. Serves the real pages.",
|
|
3
|
+
"modules": [],
|
|
4
|
+
"panels": ["task-press-test.js"],
|
|
5
|
+
"seconds": { "task-press-test.js": 40 }
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Batch 9 item 5b (Wawan agreed option A, 2026-10-26): the initiative's Tasks as List, Timeline and Kanban, and a task's status and dates changed where it sits (the box's caret, the date press, a bar or card drag). Serves the real Board page; the pure half is in ini-view-model.test.js.",
|
|
3
|
+
"modules": [],
|
|
4
|
+
"panels": ["task-views-test.js"],
|
|
5
|
+
"seconds": { "task-views-test.js": 45 }
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Feedback batch 9 item 8 (holds as gaps on the Board timeline; canvas XtiA*): the hold and plain-gap fold, and the timeline's gaps, ⏸ menu, legend, edge tab, program line and phone.",
|
|
3
|
+
"modules": ["hold-spans.test.js"],
|
|
4
|
+
"panels": ["timeline-holds-test.js"],
|
|
5
|
+
"seconds": { "hold-spans.test.js": 1, "timeline-holds-test.js": 40 }
|
|
6
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* timeline-holds-test.js — holds as gaps on the Board timeline (feedback batch 9 item 8; canvas XtiA1Desk, XtiA2Hold, XtiA4Long, XtiA3Phone, XtiAHard,
|
|
4
|
+
* XtiAGrill). Serves the real page from the real server; GET /api/board-premium answers a board built by lib/board-premium.js from rows that carry
|
|
5
|
+
* the holds and the plain gaps lib/routes-boards.js gives (lib/hold-spans.js folds them; hold-spans.test.js checks the fold). The page's clock is
|
|
6
|
+
* the fixture's (17 Oct 2026). POST /api/lifecycle is answered here and its bodies are kept, so a press is checked by what it would write.
|
|
7
|
+
* A the bar breaks: a dotted gap, ⏸ where it stopped, the return date where it starts; the done part skips the gap; a plain gap just breaks
|
|
8
|
+
* L the legend's "On hold" key only while a hold is drawn
|
|
9
|
+
* P the ⏸ press: how long, why, the dates; Resume now writes active; the date icon opens a date field that writes on-hold with the new date
|
|
10
|
+
* H hard cases: no return date (dotted to today, the rest faded, the date field open), passed (late colour), two holds, return after Deliver
|
|
11
|
+
* E the edge tab ahead names the return date · N a hold narrower than 8 px closes up (5 yr) · G the program line is dotted where all members wait
|
|
12
|
+
* M the phone keeps the ⏸ only
|
|
13
|
+
* SHOTS_8=<dir>: the timeline at 1440 and 390, light and dark, and the ⏸ menu, into <dir>. */
|
|
14
|
+
const path = require('path');
|
|
15
|
+
const { spawn } = require('child_process');
|
|
16
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
17
|
+
const T = require('./test-run').configure({ name: 'timeline-holds' });
|
|
18
|
+
const BP = require('./lib/board-premium.js');
|
|
19
|
+
const F = require('./fixtures/board-premium-facts.js');
|
|
20
|
+
|
|
21
|
+
const BASE = T.BASE;
|
|
22
|
+
const results = [];
|
|
23
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
|
|
24
|
+
let srv = null; let browser = null;
|
|
25
|
+
const finish = async (code) => {
|
|
26
|
+
if (browser) await browser.close().catch(() => {});
|
|
27
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
28
|
+
T.killTmux();
|
|
29
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
30
|
+
console.log(`\n${results.length - bad}/${results.length} timeline-holds assertions passed`);
|
|
31
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
32
|
+
};
|
|
33
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
34
|
+
|
|
35
|
+
const held = (from, back, reason) => ({ status: 'on hold', stopped: { state: 'on-hold', reason: reason || '', at: from + 'T09:00:00.000Z', back: back || null } });
|
|
36
|
+
const ROWS = [
|
|
37
|
+
F.row('email-otp', 'Email OTP (passwordless login)', { stage: 'Build', start: '2026-07-01', end: '2027-06-15', progress: 30, holds: [{ from: '2026-10-12', to: null, back: '2027-03-01', reason: 'Waits on the SMS vendor contract' }], ...held('2026-10-12', '2027-03-01', 'Waits on the SMS vendor contract') }),
|
|
38
|
+
F.row('passkey', 'Passkey sign-in', { owner: 'Lee', start: '2026-08-15', end: '2027-02-10', progress: 45 }),
|
|
39
|
+
F.row('recovery-codes', 'Recovery codes', { owner: 'Dara', start: '2026-09-01', end: '2027-03-20', progress: 40, gaps: [{ from: '2026-10-20', to: '2027-01-10' }] }),
|
|
40
|
+
F.row('no-return', 'On hold, no return date', { start: '2026-06-01', end: '2027-04-01', progress: 20, holds: [{ from: '2026-09-01', to: null, back: null, reason: '' }], ...held('2026-09-01', null) }),
|
|
41
|
+
F.row('passed', 'Return date passed', { start: '2026-05-01', end: '2027-02-01', progress: 30, holds: [{ from: '2026-08-10', to: null, back: '2026-10-05', reason: 'Waits on budget' }], ...held('2026-08-10', '2026-10-05', 'Waits on budget') }),
|
|
42
|
+
F.row('two-holds', 'Resumed, two holds', { start: '2026-03-01', end: '2027-03-01', progress: 40, holds: [{ from: '2026-04-01', to: '2026-05-01', back: null, reason: '' }, { from: '2026-06-10', to: '2026-07-01', back: null, reason: '' }] }),
|
|
43
|
+
F.row('after-deliver', 'Return after Deliver', { start: '2026-07-01', end: '2027-03-01', progress: 25, holds: [{ from: '2026-09-15', to: null, back: '2027-05-01', reason: '' }], ...held('2026-09-15', '2027-05-01') }),
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
(async () => {
|
|
47
|
+
const exe = findBrowser();
|
|
48
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
49
|
+
let chromium;
|
|
50
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
51
|
+
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
52
|
+
await T.waitForServer(BASE);
|
|
53
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
54
|
+
|
|
55
|
+
/** The Board on the timeline. o: { w, h, rows, span, dark } */
|
|
56
|
+
const open = async (o = {}) => {
|
|
57
|
+
const ctx = await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 900 }, colorScheme: o.dark ? 'dark' : 'light' });
|
|
58
|
+
const page = await ctx.newPage();
|
|
59
|
+
const errors = [], posts = [];
|
|
60
|
+
page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
|
|
61
|
+
await page.clock.setFixedTime(new Date(F.NOW));
|
|
62
|
+
const rows = (o.rows || ROWS).map((r) => ({ ...r }));
|
|
63
|
+
await page.route('**/api/board-premium*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: BP.build(F.facts({ rows, total: rows.length, columns: [] })), as_of: Date.now() }) }));
|
|
64
|
+
await page.route('**/api/programs', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, programs: [] }) }));
|
|
65
|
+
await page.route('**/api/board-trail*', (r) => r.fulfill({ status: 500, contentType: 'application/json', body: JSON.stringify({ ok: false, error: 'not in this check' }) }));
|
|
66
|
+
await page.route('**/api/lifecycle', (r) => { posts.push(JSON.parse(r.request().postData() || '{}')); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true }) }); });
|
|
67
|
+
await page.addInitScript(([s]) => { try { if (!sessionStorage.getItem('set')) { sessionStorage.setItem('set', '1'); for (const [k, v] of Object.entries(s)) localStorage.setItem(k, v); } } catch { /* none */ } }, [{ 'pmos.board.view': 'time', 'pmos.board.pview': 'time', 'pmos.board.span': o.span || 'year' }]);
|
|
68
|
+
await page.goto(BASE + '/premium-board.html?ws=w1&board=w1');
|
|
69
|
+
await page.waitForSelector('#ibBody [data-row]', { timeout: 15000 });
|
|
70
|
+
await page.waitForTimeout(500);
|
|
71
|
+
return { ctx, page, errors, posts };
|
|
72
|
+
};
|
|
73
|
+
const shots = process.env.SHOTS_8;
|
|
74
|
+
const shot = async (p, name) => { if (shots) await p.screenshot({ path: path.join(shots, name + '.png') }); };
|
|
75
|
+
/** One row's timeline marks, read in the page. */
|
|
76
|
+
const rowOf = (p, title) => p.evaluate((t) => {
|
|
77
|
+
const r = [...document.querySelectorAll('#ibBody [data-row]')].find((x) => x.querySelector('b') && x.querySelector('b').textContent === t); if (!r) return null;
|
|
78
|
+
const pc = (el) => parseFloat(el.style.left);
|
|
79
|
+
return {
|
|
80
|
+
bars: [...r.querySelectorAll('.tg-bar')].map((b) => ({ l: pc(b), w: parseFloat(b.style.width), cls: b.className, done: parseFloat(b.querySelector('b').style.width) })),
|
|
81
|
+
gaps: [...r.querySelectorAll('.tg-gap')].map((g) => ({ l: pc(g), w: parseFloat(g.style.width), cls: g.className })),
|
|
82
|
+
pz: [...r.querySelectorAll('.tg-pz')].map((b) => ({ cls: b.className, label: b.getAttribute('aria-label') })),
|
|
83
|
+
hl: [...r.querySelectorAll('.tg-hl')].map((x) => x.className + '|' + x.textContent),
|
|
84
|
+
end: (r.querySelector('.tg-end') || {}).className || '', lab: [...r.querySelectorAll('.tg-lab')].map((x) => x.textContent),
|
|
85
|
+
tabs: [...r.querySelectorAll('.tg-edge')].map((b) => b.dataset.edge + ':' + b.textContent.trim()),
|
|
86
|
+
};
|
|
87
|
+
}, title);
|
|
88
|
+
|
|
89
|
+
/* A L P H E — desktop, Year */
|
|
90
|
+
{
|
|
91
|
+
const { ctx, page: p, errors, posts } = await open();
|
|
92
|
+
const otp = await rowOf(p, 'Email OTP (passwordless login)');
|
|
93
|
+
ok('A a hold breaks the bar: two pieces with square inner ends, a dotted gap between them, one ⏸ with the hold in its name', otp && otp.bars.length === 2 && /xr/.test(otp.bars[0].cls) && /xl/.test(otp.bars[1].cls) && otp.gaps.length === 1 && otp.pz.length === 1
|
|
94
|
+
&& /^On hold, Oct 12 to Mar 1, 2027, waits on the SMS vendor contract\. Open the hold$/.test(otp.pz[0].label), JSON.stringify(otp));
|
|
95
|
+
ok('A the gap runs from the hold to the return date, where the bar starts again under the return date', otp && Math.abs(otp.gaps[0].l - (otp.bars[0].l + otp.bars[0].w)) < 0.2 && Math.abs(otp.bars[1].l - (otp.gaps[0].l + otp.gaps[0].w)) < 0.2 && otp.hl.join() === 'tg-hl|Mar 1', JSON.stringify(otp));
|
|
96
|
+
ok('A the done part fills the pieces in order and skips the gap: the first piece fills before the second starts', otp && otp.bars[0].done > 0 && (otp.bars[0].done === 100 || otp.bars[1].done === 0), JSON.stringify(otp && otp.bars));
|
|
97
|
+
const rc = await rowOf(p, 'Recovery codes');
|
|
98
|
+
ok('A a plain gap of 4 weeks or more in the dated work just breaks the bar: no dotted line, no ⏸, no label', rc && rc.bars.length === 2 && !rc.gaps.length && !rc.pz.length && !rc.hl.length, JSON.stringify(rc));
|
|
99
|
+
const pk = await rowOf(p, 'Passkey sign-in');
|
|
100
|
+
ok('A a row with no hold and no gap keeps one whole bar', pk && pk.bars.length === 1 && !/x[lr]/.test(pk.bars[0].cls), JSON.stringify(pk));
|
|
101
|
+
const lg = await p.evaluate(() => (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '');
|
|
102
|
+
ok('L the legend names "On hold" while a hold is drawn', /Planned\s*On hold/.test(lg), lg);
|
|
103
|
+
|
|
104
|
+
const nr = await rowOf(p, 'On hold, no return date');
|
|
105
|
+
ok('H no return date: dotted to today, "no return date" at today, the rest of the plan faded', nr && nr.gaps.length === 1 && nr.hl.join() === 'tg-hl|no return date' && nr.bars.length === 2 && /fd/.test(nr.bars[1].cls) && !/fd/.test(nr.bars[0].cls)
|
|
106
|
+
&& /^On hold since Sep 1, no return date\. Set a return date$/.test(nr.pz[0].label), JSON.stringify(nr));
|
|
107
|
+
const ps = await rowOf(p, 'Return date passed');
|
|
108
|
+
ok('H the return date passed: the dotted line runs on to today in the late colour, and the date says how long ago', ps && /late/.test(ps.gaps[0].cls) && /late/.test(ps.pz[0].cls) && ps.hl.join() === 'tg-hl late|Oct 5 · 12 days ago', JSON.stringify(ps));
|
|
109
|
+
const tw = await rowOf(p, 'Resumed, two holds');
|
|
110
|
+
ok('H a resumed hold stays a gap: two holds draw two gaps and three pieces; no return date label on a past hold', tw && tw.gaps.length === 2 && tw.bars.length === 3 && !tw.hl.length && tw.pz.every((x) => /^Was on hold/.test(x.label)), JSON.stringify(tw));
|
|
111
|
+
const ad = await rowOf(p, 'Return after Deliver');
|
|
112
|
+
ok('H the return date falls after Deliver: the ◇ turns amber and says so, and no date moves', ad && /late/.test(ad.end) && ad.lab.join() === 'Mar 1 · Deliver is before the return, May 1' && ad.bars.length === 1, JSON.stringify(ad));
|
|
113
|
+
ok('E the edge tab ahead of a held row names its return date', otp && otp.tabs.includes('r:Mar ’27') && ad.tabs.includes('r:May ’27'), JSON.stringify([otp && otp.tabs, ad && ad.tabs]));
|
|
114
|
+
await shot(p, 'timeline-holds-1440');
|
|
115
|
+
|
|
116
|
+
// P the ⏸ press (XtiA2Hold)
|
|
117
|
+
await p.click('#ibBody [data-row="board:email-otp"] .tg-pz');
|
|
118
|
+
const pop = await p.evaluate(() => { const h = document.querySelector('#bdPop'); return { open: !h.hidden, cls: h.className, h4: (h.querySelector('h4') || {}).textContent, p: (h.querySelector('p') || {}).textContent, btns: [...h.querySelectorAll('.acts button')].map((b) => b.getAttribute('aria-label') + ':' + (b.textContent.trim() === '')) }; });
|
|
119
|
+
ok('P ⏸ opens the floating menu by the button: how long, the dates, why; two icon buttons, resume and change the date', pop.open && /bd-hold/.test(pop.cls) && pop.h4 === 'On hold · 4½ months' && pop.p === 'Oct 12 to Mar 1, 2027. Waits on the SMS vendor contract.' && pop.btns.join() === 'Resume now:true,Change the return date:true', JSON.stringify(pop));
|
|
120
|
+
await shot(p, 'timeline-holds-menu-1440');
|
|
121
|
+
await p.click('#bdPop [data-holdgo="date"]');
|
|
122
|
+
const field = await p.evaluate(() => { const f = document.querySelector('#bdPop input[type="date"]'); return f ? { v: f.value, focus: document.activeElement === f } : null; });
|
|
123
|
+
ok('P the date icon opens a date field with the return date in it', field && field.v === '2027-03-01' && field.focus, JSON.stringify(field));
|
|
124
|
+
await p.fill('#bdPop input[type="date"]', '2027-04-15'); await p.waitForTimeout(400);
|
|
125
|
+
ok('P a new date writes the on-hold line the ⋯ menu writes, with the new return date and the same reason', posts.length === 1 && posts[0].initiative_id === 'email-otp' && posts[0].state === 'on-hold' && posts[0].back === '2027-04-15' && posts[0].reason === 'Waits on the SMS vendor contract', JSON.stringify(posts));
|
|
126
|
+
await p.click('#ibBody [data-row="board:email-otp"] .tg-pz'); await p.click('#bdPop [data-holdgo="resume"]'); await p.waitForTimeout(400);
|
|
127
|
+
ok('P Resume now writes active', posts.length === 2 && posts[1].state === 'active' && posts[1].initiative_id === 'email-otp', JSON.stringify(posts));
|
|
128
|
+
await p.click('#ibBody [data-row="board:no-return"] .tg-pz');
|
|
129
|
+
const nd = await p.evaluate(() => { const h = document.querySelector('#bdPop'); return { h4: (h.querySelector('h4') || {}).textContent, field: !!h.querySelector('input[type="date"]'), focus: document.activeElement && document.activeElement.type === 'date' }; });
|
|
130
|
+
ok('H with no return date the ⏸ press opens with the date field ready', nd.field && nd.focus && /^On hold · /.test(nd.h4), JSON.stringify(nd));
|
|
131
|
+
await p.keyboard.press('Escape');
|
|
132
|
+
await p.click('#ibBody [data-row="board:two-holds"] .tg-pz');
|
|
133
|
+
const past = await p.evaluate(() => { const h = document.querySelector('#bdPop'); return { h4: (h.querySelector('h4') || {}).textContent, acts: h.querySelectorAll('.acts button').length }; });
|
|
134
|
+
ok('P a past hold reads how long it ran, with nothing to press', past.h4 === 'Was on hold · 4 weeks' && past.acts === 0, JSON.stringify(past));
|
|
135
|
+
await p.keyboard.press('Escape');
|
|
136
|
+
ok('the timeline threw nothing', !errors.length, errors.join('\n'));
|
|
137
|
+
await ctx.close();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* L with no hold on screen the legend says nothing about holds */
|
|
141
|
+
{
|
|
142
|
+
const { ctx, page: p } = await open({ rows: ROWS.filter((r) => !r.holds) });
|
|
143
|
+
const lg = await p.evaluate(() => (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '');
|
|
144
|
+
ok('L with no hold drawn, no "On hold" in the legend (zero is silence)', /Planned/.test(lg) && !/On hold/.test(lg), lg);
|
|
145
|
+
await ctx.close();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* N G — through the engine: 5 yr closes up a short past hold; the program line is dotted where every member waits */
|
|
149
|
+
{
|
|
150
|
+
const { ctx, page: p } = await open();
|
|
151
|
+
const r = await p.evaluate(async () => {
|
|
152
|
+
const S = await import('/pm/bd-span.js'), now = new Date(2026, 9, 17);
|
|
153
|
+
const a = { key: 'board:a', id: 'a', title: 'Short hold', start: '2026-01-01', end: '2027-06-01', holds: [{ from: '2026-05-01', to: '2026-05-10', back: null, reason: '' }], track: { key: 'build' } };
|
|
154
|
+
const b = { key: 'board:b', id: 'b', title: 'Held one', start: '2026-07-01', end: '2027-06-01', holds: [{ from: '2026-10-01', to: null, back: '2027-02-01', reason: '' }], track: { key: 'build' } };
|
|
155
|
+
const c = { key: 'board:c', id: 'c', title: 'Held two', start: '2026-08-01', end: '2027-05-01', holds: [{ from: '2026-11-01', to: null, back: '2027-03-01', reason: '' }], track: { key: 'build' } };
|
|
156
|
+
const d = document.createElement('div');
|
|
157
|
+
d.innerHTML = S.timelineHtml([a], { jira: null }, 'y5', { now, trackPx: 1100 }).html;
|
|
158
|
+
const five = { bars: d.querySelectorAll('.tg-bar').length, gaps: d.querySelectorAll('.tg-gap').length };
|
|
159
|
+
d.innerHTML = S.timelineHtml([a], { jira: null }, 'quarter', { now, trackPx: 1100 }).html;
|
|
160
|
+
const quarter = { bars: d.querySelectorAll('.tg-bar').length, gaps: d.querySelectorAll('.tg-gap').length };
|
|
161
|
+
const groups = [{ kind: 'program', key: 'p', program: { id: 'p', title: 'IDPF Feature Expansion', products: [] }, products: [{ name: 'IDPF', rows: [b, c] }], rows: [b, c] }];
|
|
162
|
+
d.innerHTML = S.timelineHtml([b, c], { jira: null }, 'year', { now, groups, trackPx: 1100 }).html;
|
|
163
|
+
const spans = [...d.querySelectorAll('.tg-pg .tg-span')].map((x) => x.className);
|
|
164
|
+
const groups2 = [{ ...groups[0], products: [{ name: 'IDPF', rows: [a, b] }], rows: [a, b] }];
|
|
165
|
+
d.innerHTML = S.timelineHtml([a, b], { jira: null }, 'year', { now, groups: groups2, trackPx: 1100 }).html;
|
|
166
|
+
const solid = [...d.querySelectorAll('.tg-pg .tg-span')].map((x) => x.className);
|
|
167
|
+
return { five, quarter, spans, solid };
|
|
168
|
+
});
|
|
169
|
+
ok('N on 5 yr a nine-day past hold is narrower than 8 px and closes up: one whole bar; on Quarter it is a gap', r.five.bars === 1 && r.five.gaps === 0 && r.quarter.gaps === 1 && r.quarter.bars === 2, JSON.stringify(r));
|
|
170
|
+
ok('G the program line is dotted where every member is on hold, solid where one still works', r.spans.join('|') === 'tg-span|tg-span ho|tg-span' && r.solid.every((x) => x === 'tg-span'), JSON.stringify(r));
|
|
171
|
+
await ctx.close();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* M the phone: ⏸ only, no dates beside it */
|
|
175
|
+
{
|
|
176
|
+
const { ctx, page: p, errors } = await open({ w: 390, h: 844 });
|
|
177
|
+
const m = await p.evaluate(() => ({ pz: document.querySelectorAll('#ibBody .tg-pz').length, hl: document.querySelectorAll('#ibBody .tg-hl').length, scroll: document.documentElement.scrollWidth <= innerWidth + 1 }));
|
|
178
|
+
ok('M the phone keeps the ⏸ in each gap and no date beside it, with no sideways page scroll', m.pz >= 4 && m.hl === 0 && m.scroll, JSON.stringify(m));
|
|
179
|
+
await shot(p, 'timeline-holds-390');
|
|
180
|
+
await p.click('#ibBody [data-row="board:email-otp"] .tg-pz');
|
|
181
|
+
const sh = await p.evaluate(() => { const h = document.querySelector('#bdPop'); return { sheet: h.classList.contains('sheet'), h4: (h.querySelector('h4') || {}).textContent }; });
|
|
182
|
+
ok('M on a phone the ⏸ press opens the same menu as a sheet', sh.sheet && sh.h4 === 'On hold · 4½ months', JSON.stringify(sh));
|
|
183
|
+
await shot(p, 'timeline-holds-menu-390');
|
|
184
|
+
ok('the phone timeline threw nothing', !errors.length, errors.join('\n'));
|
|
185
|
+
await ctx.close();
|
|
186
|
+
}
|
|
187
|
+
if (shots) {
|
|
188
|
+
for (const [w, h, n] of [[1440, 900, 'timeline-holds-1440-dark'], [390, 844, 'timeline-holds-390-dark']]) { const { ctx, page: p } = await open({ w, h, dark: true }); await shot(p, n); await ctx.close(); }
|
|
189
|
+
}
|
|
190
|
+
return finish();
|
|
191
|
+
})();
|