create-pmos 0.443.0 → 0.445.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 +2 -2
- 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/payload/state/log.md +1 -1
- package/workspace/adler-moments-test.js +8 -0
- package/workspace/adler-seasons-art-test.js +3 -0
- package/workspace/board-columns-test.js +168 -0
- package/workspace/board-programs-test.js +1 -1
- package/workspace/briefing-premium-board-test.js +91 -8
- package/workspace/briefing-premium-insights-test.js +83 -38
- package/workspace/briefing-premium-test.js +2 -1
- package/workspace/calm-timeline-test.js +3 -1
- package/workspace/changelog.json +24 -0
- package/workspace/goals-clear-ui-test.js +34 -20
- package/workspace/guide/home.md +5 -0
- package/workspace/guide/jira.md +13 -1
- package/workspace/guide/ready-made-dashboards.md +2 -2
- package/workspace/intel-report-ui-test.js +1 -1
- package/workspace/lib/board-fold.js +33 -5
- package/workspace/lib/board-premium.js +1 -1
- package/workspace/lib/console-state.js +5 -1
- package/workspace/lib/engine/boards.js +9 -2
- package/workspace/lib/factory-join.js +46 -14
- package/workspace/lib/freshness.js +14 -1
- package/workspace/lib/initiative-rows.js +38 -4
- package/workspace/lib/issues.js +8 -1
- package/workspace/lib/jira-cli.js +18 -2
- package/workspace/lib/jira-moves.js +119 -0
- package/workspace/lib/jira-tickets.js +23 -4
- package/workspace/lib/notes.js +4 -2
- package/workspace/lib/offloop.js +75 -29
- package/workspace/lib/page-build.js +97 -0
- package/workspace/lib/plan-items.js +24 -3
- package/workspace/lib/plan-tree.js +62 -9
- package/workspace/lib/ready-reports.js +22 -8
- package/workspace/lib/refresh.js +14 -2
- package/workspace/lib/routes-board-premium.js +9 -1
- package/workspace/lib/routes-boards.js +114 -16
- package/workspace/lib/routes-brief-page.js +3 -1
- package/workspace/lib/routes-calendar-import.js +13 -1
- package/workspace/lib/routes-ready-reports.js +28 -5
- package/workspace/lib/task-links.js +12 -1
- package/workspace/lib/workflows-store.js +14 -3
- package/workspace/live-pill-round-test.js +178 -0
- package/workspace/milestone-pins-test.js +1 -1
- package/workspace/okr-goals-ui-test.js +21 -19
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/panels-test.js +375 -0
- package/workspace/premium-rec-tab-test.js +2 -1
- package/workspace/premium-vw-item-test.js +10 -2
- package/workspace/premium-vw-jira-test.js +3 -0
- package/workspace/program-panel-test.js +6 -6
- package/workspace/public/pm/bd-cols.js +149 -0
- package/workspace/public/pm/bd-ini-panel.js +3 -2
- package/workspace/public/pm/bd-pane.js +41 -0
- package/workspace/public/pm/bd-span.js +29 -11
- package/workspace/public/pm/cozy-adler.js +21 -0
- package/workspace/public/pm/cozy-board.css +45 -0
- package/workspace/public/pm/cozy-divider.css +32 -0
- package/workspace/public/pm/cozy-divider.js +45 -0
- package/workspace/public/pm/cozy-insights.css +22 -0
- package/workspace/public/pm/cozy-live-pill.css +17 -22
- package/workspace/public/pm/cozy-live-pill.js +38 -18
- package/workspace/public/pm/cozy-panels.css +80 -0
- package/workspace/public/pm/cozy-panels.js +691 -0
- package/workspace/public/pm/cozy-viewer.js +148 -70
- package/workspace/public/pm/dash-view.js +5 -2
- package/workspace/public/pm/goals-clear.js +9 -2
- package/workspace/public/pm/home-app.js +30 -19
- package/workspace/public/pm/home-ini.js +9 -3
- package/workspace/public/pm/home-today.js +4 -2
- package/workspace/public/pm/ini-edit.js +405 -0
- package/workspace/public/pm/ini-tasks.js +175 -46
- package/workspace/public/pm/ini-versions.js +18 -4
- package/workspace/public/pm/ini-view-model.js +12 -7
- package/workspace/public/pm/ini-view.css +162 -26
- package/workspace/public/pm/ini-view.js +44 -13
- package/workspace/public/pm/ini-wf-model.js +9 -0
- package/workspace/public/pm/ini-wf.js +14 -9
- package/workspace/public/pm/ins-pane.js +55 -0
- package/workspace/public/pm/jira-move.js +50 -0
- package/workspace/public/pm/live-model.js +3 -2
- package/workspace/public/pm/pn-narrow.js +76 -0
- package/workspace/public/pm/premium-board.js +85 -32
- package/workspace/public/pm/premium-insights.js +211 -43
- package/workspace/public/pm/task-card.css +2 -0
- package/workspace/public/pm/task-card.js +4 -1
- package/workspace/public/premium-board.html +2 -0
- package/workspace/ready-dash-ui-test.js +4 -4
- package/workspace/server.js +71 -20
- package/workspace/skills/jira-move.skill +35 -0
- package/workspace/stage-card-tasks-test.js +397 -0
- package/workspace/stage-card-test.js +1 -1
- package/workspace/task-delete-test.js +9 -1
- package/workspace/task-links-test.js +1 -0
- package/workspace/task-milestones-test.js +3 -3
- package/workspace/task-plans-test.js +1 -1
- package/workspace/task-press-test.js +12 -4
- package/workspace/task-views-test.js +166 -13
- package/workspace/test-lists/batch18-live-pill-round.json +10 -0
- package/workspace/test-lists/batch18-panels.json +9 -0
- package/workspace/test-lists/board-columns.json +5 -0
- package/workspace/test-lists/jira-moves.json +11 -0
- package/workspace/test-lists/page-speed-fold.json +5 -0
- package/workspace/test-lists/page-speed-reads.json +5 -0
- package/workspace/test-lists/stage-card-tasks.json +6 -0
- package/workspace/timeline-holds-test.js +1 -1
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
/* stage-card-tasks-test.js — a task changed where it sits in the initiative's Tasks List (feedback batch 18 item 16, agreed A, Wawan
|
|
4
|
+
* 2026-10-28 13:48 "promote to ready for development then build"; main canvas In development, frames StA1Rows to StA10bDragPhone).
|
|
5
|
+
* Serves the real pages (Home's Viewer, premium.html, and the Board's panel, premium-board.html) from the real server. The Board read is a
|
|
6
|
+
* fixture that answers the writes the way the server does: a rename, a stage, a date, a new task and an order show on the next read.
|
|
7
|
+
* S1 the rows: one line, the due day only on a phone, nothing without dates, "◇ Nov 14", + on each open stage and none on the header
|
|
8
|
+
* S2 a title press opens the row in place: the name field, then one line: status, Start – Due, ⋯ (one row at a time; Esc closes)
|
|
9
|
+
* S3 rename: Enter saves (Undo) · S4 the status chip: the five icons only · S5 the date chips: the picker opens on that day
|
|
10
|
+
* S6 ⋯: Milestone, Move to a stage, Open the task card, Delete · S7 a milestone has one date · S8 + adds into its stage, the field stays
|
|
11
|
+
* S9 a Jira row: title and status read-only, "<Status> in Jira · read N min ago", dates editable, no Delete
|
|
12
|
+
* S10 drag on a desktop: to another stage (section + order), inside a stage (order only, kept on the next read)
|
|
13
|
+
* S11 a long press on a phone's title lifts the row · S12 a milestone on the Timeline is its ◇ only; Kanban says "◇ Nov 14"
|
|
14
|
+
* S13 light and dark, phone and desktop: no page error. PMOS_SHOTS=<dir> writes the screens. */
|
|
15
|
+
const path = require('path');
|
|
16
|
+
const { spawn } = require('child_process');
|
|
17
|
+
const { findBrowser } = require('./lib/find-browser');
|
|
18
|
+
const T = require('./test-run').configure({ name: 'stage-card-tasks' });
|
|
19
|
+
const BP = require('./lib/board-premium.js');
|
|
20
|
+
const F = require('./fixtures/board-premium-facts.js');
|
|
21
|
+
const BRP = require('./lib/briefing-premium.js');
|
|
22
|
+
const BRF = require('./fixtures/briefing-premium-facts.js');
|
|
23
|
+
const IP = require('./lib/initiative-premium.js');
|
|
24
|
+
const IF = require('./fixtures/initiative-premium-facts.js');
|
|
25
|
+
|
|
26
|
+
const BASE = T.BASE, SHOTS = process.env.PMOS_SHOTS || '';
|
|
27
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
28
|
+
const until = async (fn, ms = 10000, 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); } };
|
|
29
|
+
const results = [];
|
|
30
|
+
const ok = (name, cond, extra = '') => { results.push({ name, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + String(extra).slice(0, 500) : ''}`); };
|
|
31
|
+
let srv = null; let browser = null;
|
|
32
|
+
const finish = async (code) => {
|
|
33
|
+
if (browser) await browser.close().catch(() => {});
|
|
34
|
+
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
35
|
+
T.killTmux();
|
|
36
|
+
const bad = results.filter((x) => !x.cond).length;
|
|
37
|
+
console.log(`\n${results.length - bad}/${results.length} stage-card-tasks assertions passed`);
|
|
38
|
+
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
39
|
+
};
|
|
40
|
+
process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
41
|
+
|
|
42
|
+
/* the fixture's day is 2026-10-17; Home's self-serve-v2 and the Board's usage-billing get the same tasks */
|
|
43
|
+
const TASKS = () => [
|
|
44
|
+
{ uid: 'task-b1', title: 'Brief support on the device limit', status: 'To do', owner: 'Wawan', start: '2026-10-30', end: '2026-11-06', section: 'build' },
|
|
45
|
+
{ uid: 'task-b2', title: 'IDPF-3387 Refactor the AppAuthService', status: 'To do', owner: 'Ruth Lim', start: '2026-10-27', end: '2026-11-07', section: 'build' },
|
|
46
|
+
{ uid: 'task-b3', title: 'Device limit enforcement', status: 'To do', owner: 'Sam Hu', start: '2026-11-03', end: '2026-11-12', section: 'build' },
|
|
47
|
+
{ uid: 'task-b4', title: 'Session must expire on logout', status: 'To do', owner: 'Sam Hu', section: 'build' },
|
|
48
|
+
{ uid: 'task-b5', title: 'Kick-off notes', status: 'Done', owner: 'Wawan', end: '2026-10-12', section: 'build' },
|
|
49
|
+
{ uid: 'task-d1', title: 'MAGW migration ready', status: 'To do', owner: 'Wawan', end: '2026-11-14', milestone: true, section: 'deliver' },
|
|
50
|
+
];
|
|
51
|
+
const TICKETS = [{ key: 'IDPF-3387', title: 'Refactor the AppAuthService', status: 'In progress', raw: 'In Progress' }];
|
|
52
|
+
|
|
53
|
+
(async () => {
|
|
54
|
+
const exe = findBrowser();
|
|
55
|
+
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
56
|
+
let chromium;
|
|
57
|
+
try { ({ chromium } = require('playwright-core')); } catch { console.log('✗ playwright-core is not installed'); return finish(1); }
|
|
58
|
+
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, '..') }) });
|
|
59
|
+
await T.waitForServer(BASE);
|
|
60
|
+
browser = await chromium.launch({ executablePath: exe });
|
|
61
|
+
|
|
62
|
+
// where: 'home' (premium.html's Viewer) or 'board' (the Board's panel)
|
|
63
|
+
const open = async ({ where = 'home', w = 390, h = 844, theme = 'light', view = 'list' } = {}) => {
|
|
64
|
+
const touch = w < 700, id = where === 'home' ? 'self-serve-v2' : 'usage-billing';
|
|
65
|
+
const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: touch, isMobile: touch, colorScheme: theme });
|
|
66
|
+
await ctx.addInitScript(() => { try { if (localStorage.getItem('cz-pn:board') == null) localStorage.setItem('cz-pn:board', JSON.stringify({ v: 2, share: 0.405 })); } catch { /* none */ } }); // the Board's Viewer at 560 px beside the page (cozy-panels.js keeps only this share), so its Tasks Timeline is wide enough to drag
|
|
67
|
+
await ctx.addInitScript((v) => { localStorage.setItem('pmos.tasks.view', v); localStorage.setItem('pmos.tasks.zoom', 'month'); }, view);
|
|
68
|
+
const page = await ctx.newPage(), errors = [], posts = [];
|
|
69
|
+
// the board's state: the writes land here, and the next read shows them
|
|
70
|
+
const S = { tasks: TASKS(), order: {} };
|
|
71
|
+
const M = () => {
|
|
72
|
+
const m = BP.build(F.facts()); const r = m.rows.find((x) => x.id === id);
|
|
73
|
+
r.tasks = S.tasks.map((t) => { const L = S.order[t.section || ''] || [], i = L.indexOf(t.uid); return { ...t, ...(i >= 0 ? { rank: i } : {}) }; });
|
|
74
|
+
r.track = { ...(r.track || {}), tickets: TICKETS };
|
|
75
|
+
m.jira = { ...(m.jira || {}), readAt: new Date(Date.now() - 4 * 60000).toISOString() };
|
|
76
|
+
return m;
|
|
77
|
+
};
|
|
78
|
+
const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
|
|
79
|
+
page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
|
|
80
|
+
await page.route('**/api/board-premium*', (r) => json(r, { ok: true, state: 'ready', model: M(), as_of: Date.now() }));
|
|
81
|
+
await page.route('**/api/board-trail*', (r) => json(r, { ok: false }, 500));
|
|
82
|
+
await page.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: IP.build(IF.facts()), as_of: Date.now() }));
|
|
83
|
+
await page.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRP.build(BRF.facts()), as_of: Date.now() }));
|
|
84
|
+
await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
|
|
85
|
+
await page.route('**/api/jira/tickets*', (r) => json(r, { ok: false, error: 'not in this check' }));
|
|
86
|
+
await page.route(/\/api\/(boards\/|lifecycle)/, (r) => {
|
|
87
|
+
const rq = r.request(), p = new URL(rq.url()).pathname; if (rq.method() === 'GET') return json(r, { ok: true });
|
|
88
|
+
const b = JSON.parse(rq.postData() || '{}'); posts.push({ path: p, body: b });
|
|
89
|
+
const t = S.tasks.find((x) => x.uid === b.task);
|
|
90
|
+
if (p === '/api/boards/tasks/rename' && t) { const from = t.title; t.title = b.title; return json(r, { ok: true, from }); }
|
|
91
|
+
if (p === '/api/boards/tasks/state' && t) { t.status = b.state; return json(r, { ok: true }); }
|
|
92
|
+
if (p === '/api/boards/tasks/edit' && t) {
|
|
93
|
+
const from = {};
|
|
94
|
+
for (const k of ['start', 'due', 'section', 'milestone']) if (k in b) { const f = k === 'due' ? 'end' : k; from[k] = k === 'milestone' ? !!t.milestone : t[f] || ''; t[f] = b[k]; }
|
|
95
|
+
return json(r, { ok: true, from });
|
|
96
|
+
}
|
|
97
|
+
if (p === '/api/boards/tasks/add') { const uid = 'task-n' + S.tasks.length; S.tasks.push({ uid, title: b.title, status: 'To do', owner: 'Wawan', start: b.start || '', end: b.due || '', section: b.section || '' }); return json(r, { ok: true, item: { uid } }); }
|
|
98
|
+
if (p === '/api/boards/tasks/delete') { S.tasks = S.tasks.filter((x) => x.uid !== b.task); return json(r, { ok: true }); }
|
|
99
|
+
if (p === '/api/boards/tasks/order') { const from = S.order[b.section] || []; S.order[b.section] = b.tasks; return json(r, { ok: true, from }); }
|
|
100
|
+
return json(r, { ok: true });
|
|
101
|
+
});
|
|
102
|
+
if (where === 'home') await page.goto(BASE + '/premium.html?ini=self-serve-v2&ws=w1&board=w1&theme=' + theme);
|
|
103
|
+
else {
|
|
104
|
+
await page.goto(BASE + '/premium-board.html?theme=' + theme);
|
|
105
|
+
await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
|
|
106
|
+
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(); });
|
|
107
|
+
}
|
|
108
|
+
await until(() => page.evaluate((v) => !!document.querySelector(v === 'list' ? '#czViewer .iv-wbs' : '#czViewer :is(.ivt, .iva, .ivk)'), view), 20000);
|
|
109
|
+
// Build and Deliver open (the Board's initiative is in Discover; Home's is in Build)
|
|
110
|
+
await openStage(page, 'build'); await openStage(page, 'deliver');
|
|
111
|
+
await sleep(200);
|
|
112
|
+
return { ctx, page, errors, posts, S };
|
|
113
|
+
};
|
|
114
|
+
const openStage = (pg, key) => pg.evaluate((k) => {
|
|
115
|
+
const rest = document.querySelector('#czViewer .iv-rest[aria-expanded="false"]');
|
|
116
|
+
const h = document.querySelector(`#czViewer .iv-ws[data-iv-sec="${k}"]`);
|
|
117
|
+
if (!h && rest) rest.click();
|
|
118
|
+
const h2 = document.querySelector(`#czViewer .iv-ws[data-iv-sec="${k}"]`); if (h2 && h2.getAttribute('aria-expanded') === 'false') h2.click();
|
|
119
|
+
}, key).then(() => sleep(150)).then(() => pg.evaluate((k) => { const h = document.querySelector(`#czViewer .iv-ws[data-iv-sec="${k}"]`); if (h && h.getAttribute('aria-expanded') === 'false') h.click(); }, key)).then(() => sleep(150));
|
|
120
|
+
const shot = async (pg, name) => { if (SHOTS) await pg.screenshot({ path: path.join(SHOTS, name + '.png') }).catch(() => {}); };
|
|
121
|
+
const lastPost = (A, route) => A.posts.filter((x) => x.path === route).pop();
|
|
122
|
+
const toast = (pg) => pg.evaluate(() => { const t = [...document.querySelectorAll('#bdToast, .cz-toast, #czToast, [class*="toast"]')].find((x) => x.getClientRects().length && getComputedStyle(x).visibility !== 'hidden' && /\S/.test(x.textContent)); return t ? t.textContent.replace(/\s+/g, ' ').trim() : ''; });
|
|
123
|
+
const undo = (pg) => pg.evaluate(() => { const L = [...document.querySelectorAll('button')].filter((x) => x.offsetParent && /^Undo$/.test((x.textContent || '').trim() || x.getAttribute('aria-label') || '')); const b = L.pop() || document.querySelector('#bdToast .bd-undo'); if (b) { b.click(); return L.length ? 'also: ' + L.map((x) => x.parentElement.id || x.parentElement.className).join() : true; } return false; });
|
|
124
|
+
const rowsOf = (pg, key) => pg.evaluate((k) => [...document.querySelectorAll(`#czViewer .iv-wl[data-iv-sec="${k}"] > .iv-tr[data-iv-r]`)].map((r) => r.dataset.ivR), key);
|
|
125
|
+
|
|
126
|
+
/* ── Home, phone ── */
|
|
127
|
+
const A = await open(), p = A.page;
|
|
128
|
+
/* S1 the rows */
|
|
129
|
+
await p.evaluate(() => { const m = document.querySelector('#czViewer .iv-wl[data-iv-sec="build"] > .iv-more'); if (m) m.click(); }); await sleep(200); // the fourth open task
|
|
130
|
+
const R1 = await p.evaluate(() => {
|
|
131
|
+
const row = (u) => document.querySelector(`#czViewer .iv-tr[data-iv-r="${u}"]`);
|
|
132
|
+
const vis = (e) => !!e && getComputedStyle(e).display !== 'none' && e.getBoundingClientRect().width > 0;
|
|
133
|
+
const b1 = row('task-b1'), b4 = row('task-b4'), d1 = row('task-d1'), b2 = row('task-b2');
|
|
134
|
+
const tt = b1 && b1.querySelector('.iv-tt').getBoundingClientRect(), dc = b1 && b1.querySelector('.iv-dc').getBoundingClientRect();
|
|
135
|
+
return {
|
|
136
|
+
oneLine: !!(tt && dc && Math.abs((tt.top + tt.height / 2) - (dc.top + dc.height / 2)) < 6 && b1.getBoundingClientRect().height <= 52),
|
|
137
|
+
phoneDue: b1 && b1.querySelector('.iv-dc').innerText.trim(), startHidden: !vis(b1 && b1.querySelector('.iv-dst')),
|
|
138
|
+
undated: b4 && !b4.querySelector('.iv-dc'), ms: d1 && d1.querySelector('.iv-dc').innerText.trim(), msTitleGlyph: !!(d1 && d1.querySelector('.iv-tn .iv-ms')), msIcon: !!(d1 && d1.querySelector('.iv-dc .iv-dms svg')),
|
|
139
|
+
plus: [...document.querySelectorAll('#czViewer .iv-plus')].map((b) => b.getAttribute('aria-label')), headPlus: !!document.querySelector('#czViewer .iv-th [data-iv-add]'),
|
|
140
|
+
jira: b2 && !!b2.querySelector('.iv-jq.ig-sq') && !b2.querySelector('[data-iv-check]'),
|
|
141
|
+
grips: [...document.querySelectorAll('#czViewer .iv-grip')].filter(vis).length,
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
ok('S1 a phone row is one line: the title, its due day at the right (the start hidden)', R1.oneLine && R1.phoneDue === 'Nov 6' && R1.startHidden, JSON.stringify(R1));
|
|
145
|
+
ok('S1 a row with no dates shows none (zero is silence)', R1.undated, JSON.stringify(R1));
|
|
146
|
+
ok('S1 a milestone row says "◇ Nov 14", its ◇ once (not after the title)', R1.ms === 'Nov 14' && R1.msIcon && !R1.msTitleGlyph, JSON.stringify(R1));
|
|
147
|
+
ok('S1 each open stage has its own icon-only + ("New task in …"); the Tasks header has none', R1.plus.join('|') === 'New task in Build|New task in Deliver' && !R1.headPlus, JSON.stringify(R1));
|
|
148
|
+
ok('S1 a Jira row shows the square for its Jira status, no box; a phone draws no grip', R1.jira && R1.grips === 0, JSON.stringify(R1));
|
|
149
|
+
await shot(p, 'S1-rows-390');
|
|
150
|
+
|
|
151
|
+
/* S2 open in place */
|
|
152
|
+
await p.click('#czViewer [data-iv-edit="task-b1"]');
|
|
153
|
+
// the field takes the focus a frame or more after the row opens (ini-edit.js focusLater): wait for it, a slow runner is late
|
|
154
|
+
await until(() => p.evaluate(() => !!document.activeElement && document.activeElement.matches('#czViewer .iv-ed[data-iv-open="task-b1"] .iv-edn')), 4000);
|
|
155
|
+
const R2 = await until(() => p.evaluate(() => {
|
|
156
|
+
const r = document.querySelector('#czViewer .iv-ed[data-iv-open="task-b1"]'); if (!r) return null;
|
|
157
|
+
const f = r.querySelector('.iv-edn'), line = [...r.querySelectorAll('.iv-edl > *')].map((e) => e.getAttribute('aria-label') || e.textContent.trim());
|
|
158
|
+
const dates = [...r.querySelectorAll('.iv-edd')], more = r.querySelector('[data-iv-more]');
|
|
159
|
+
return { val: f && f.value, focus: document.activeElement === f, line, moreAfter: !!(more && dates.length && more.getBoundingClientRect().left - dates[dates.length - 1].getBoundingClientRect().right < 40), h: Math.round(more.getBoundingClientRect().height) };
|
|
160
|
+
}));
|
|
161
|
+
ok('S2 a title press opens the row in place: the name field, focused', R2 && R2.val === 'Brief support on the device limit' && R2.focus, JSON.stringify(R2));
|
|
162
|
+
ok('S2 one line under it: the status chip, Start – Due, then ⋯ right after the dates', R2 && R2.line.join('|') === 'Status: To do. Change|Start: Oct 30. Change|–|Due: Nov 6. Change|More for this task' && R2.moreAfter, JSON.stringify(R2));
|
|
163
|
+
ok('S2 ⋯ is a 44 px target on a phone', R2 && R2.h >= 44, JSON.stringify(R2));
|
|
164
|
+
await shot(p, 'S2-open-390');
|
|
165
|
+
await p.click('#czViewer [data-iv-edit="task-b3"]');
|
|
166
|
+
const one = await until(() => p.evaluate(() => { const o = [...document.querySelectorAll('#czViewer .iv-ed')].map((r) => r.dataset.ivOpen); return o.length === 1 && o[0] === 'task-b3' ? o : null; }));
|
|
167
|
+
ok('S2 one row is open at a time', !!one, JSON.stringify(one));
|
|
168
|
+
await p.keyboard.press('Escape');
|
|
169
|
+
ok('S2 Esc closes it', await until(() => p.evaluate(() => !document.querySelector('#czViewer .iv-ed')), 3000));
|
|
170
|
+
|
|
171
|
+
/* S3 rename */
|
|
172
|
+
await p.click('#czViewer [data-iv-edit="task-b1"]');
|
|
173
|
+
await until(() => p.evaluate(() => document.activeElement && document.activeElement.matches('.iv-edn')));
|
|
174
|
+
await p.keyboard.press('End'); await p.keyboard.type(' (v2)'); await p.keyboard.press('Enter');
|
|
175
|
+
const rn = await until(() => lastPost(A, '/api/boards/tasks/rename'));
|
|
176
|
+
ok('S3 Enter saves the new name (POST /api/boards/tasks/rename)', rn && rn.body.task === 'task-b1' && rn.body.title === 'Brief support on the device limit (v2)', JSON.stringify(rn));
|
|
177
|
+
const t3 = await until(async () => { const t = await toast(p); return /Renamed/.test(t) ? t : null; }, 4000);
|
|
178
|
+
ok('S3 the toast says Renamed, with Undo; the row closes and shows the new name', /Undo/.test(t3 || '') && await until(() => p.evaluate(() => !document.querySelector('#czViewer .iv-ed') && /\(v2\)/.test(document.querySelector('#czViewer [data-iv-edit="task-b1"]').textContent))), t3);
|
|
179
|
+
await undo(p);
|
|
180
|
+
const ru = await until(() => A.posts.filter((x) => x.path === '/api/boards/tasks/rename').length === 2 ? lastPost(A, '/api/boards/tasks/rename') : null);
|
|
181
|
+
ok('S3 Undo puts the old name back', ru && ru.body.title === 'Brief support on the device limit', JSON.stringify(ru));
|
|
182
|
+
|
|
183
|
+
/* S4 the status chip */
|
|
184
|
+
await p.click('#czViewer [data-iv-edit="task-b1"]');
|
|
185
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv-ed')));
|
|
186
|
+
await p.click('#czViewer .iv-ed .iv-edst');
|
|
187
|
+
const st = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivq-st'); return q ? { n: q.querySelectorAll('[data-ivq-state]').length, ms: !!q.querySelector('.ivq-ms'), del: !!q.querySelector('.ivq-del') } : null; }));
|
|
188
|
+
ok('S4 the status chip opens the task card\'s five status icons only (the ◇ and Delete are in ⋯)', st && st.n === 5 && !st.ms && !st.del, JSON.stringify(st));
|
|
189
|
+
await shot(p, 'S4-status-390');
|
|
190
|
+
await p.click('.tkc.ivq [data-ivq-state="In progress"]');
|
|
191
|
+
const sp = await until(() => lastPost(A, '/api/boards/tasks/state'));
|
|
192
|
+
ok('S4 a status picked there saves at once', sp && sp.body.task === 'task-b1' && sp.body.state === 'In progress', JSON.stringify(sp));
|
|
193
|
+
|
|
194
|
+
/* S5 the date chips: a phone's picker is a bottom sheet; Start opens on the start */
|
|
195
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv-ed [data-f="start"]')));
|
|
196
|
+
await p.click('#czViewer .iv-ed [data-f="start"]');
|
|
197
|
+
const dp = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq.sheet .tkc-dp'); if (!q) return null; const r = q.getBoundingClientRect(); return { on: (q.querySelector('[data-tkc-field].on') || {}).textContent, bottom: Math.round(innerHeight - r.bottom), head: (q.querySelector('.ivd-h b') || {}).textContent, sub: (q.querySelector('.ivd-s') || {}).textContent }; }));
|
|
198
|
+
ok('S5 Start opens the task card\'s picker on the start day, as a bottom sheet on a phone', dp && dp.on === 'StartOct 30' && dp.bottom <= 1 && dp.head === 'Dates' && /Brief support/.test(dp.sub || ''), JSON.stringify(dp));
|
|
199
|
+
await shot(p, 'S5-dates-390');
|
|
200
|
+
await p.click('.tkc.ivq [data-tkc-day="2026-10-28"]');
|
|
201
|
+
const ds = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.start === '2026-10-28' ? x : null; });
|
|
202
|
+
const dueNext = await until(() => p.evaluate(() => (document.querySelector('.tkc.ivq [data-tkc-field].on') || {}).textContent));
|
|
203
|
+
ok('S5 a start picked saves at once, and the next tap is the due day', !!ds && /^Due/.test(dueNext || ''), JSON.stringify({ ds, dueNext }));
|
|
204
|
+
await p.click('.tkc.ivq [data-ivd-x]');
|
|
205
|
+
|
|
206
|
+
/* S6 ⋯ */
|
|
207
|
+
await until(() => p.evaluate(() => !document.querySelector('.tkc.ivq')));
|
|
208
|
+
if (!(await p.$('#czViewer .iv-ed'))) await p.click('#czViewer [data-iv-edit="task-b1"]');
|
|
209
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv-ed [data-iv-more]')));
|
|
210
|
+
await p.click('#czViewer .iv-ed [data-iv-more]');
|
|
211
|
+
const mm = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .ive-m'); return q ? [...q.querySelectorAll('button')].map((b) => b.textContent.trim()) : null; }));
|
|
212
|
+
ok('S6 ⋯ holds Milestone, Move to a stage, Open the task card and Delete task', mm && mm.join('|') === 'Milestone|Move to a stage|Open the task card|Delete task', JSON.stringify(mm));
|
|
213
|
+
await shot(p, 'S6-more-390');
|
|
214
|
+
await p.click('.tkc.ivq [data-ive-mv]');
|
|
215
|
+
const sl = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .ive-m'); const b = q && [...q.querySelectorAll('[data-ive-to]')]; return b && b.length ? b.map((x) => x.textContent.trim() + (x.getAttribute('aria-checked') === 'true' ? '*' : '')) : null; }));
|
|
216
|
+
ok('S6 Move to a stage lists the workflow\'s stages, the task\'s own checked', sl && sl.includes('Build*') && sl.includes('Deliver') && sl[sl.length - 1] === 'Not in a stage', JSON.stringify(sl));
|
|
217
|
+
await p.click('.tkc.ivq [data-ive-to="deliver"]');
|
|
218
|
+
const mv = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.section === 'deliver' ? x : null; });
|
|
219
|
+
const t6 = await until(async () => { const t = await toast(p); return /Moved to Deliver/.test(t) ? t : null; }, 4000);
|
|
220
|
+
const inD = await until(async () => ((await rowsOf(p, 'deliver')).includes('task-b1') ? true : null), 4000);
|
|
221
|
+
ok('S6 a stage picked there moves the task (section), "Moved to Deliver" with Undo, and it shows under Deliver', mv && /Undo/.test(t6 || '') && inD, JSON.stringify({ mv, t6 }));
|
|
222
|
+
await undo(p);
|
|
223
|
+
const mu = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.section === 'build' ? x : null; });
|
|
224
|
+
ok('S6 Undo puts it back in Build', !!mu, JSON.stringify(A.posts.slice(-2)));
|
|
225
|
+
|
|
226
|
+
/* S7 a milestone has one date */
|
|
227
|
+
await until(async () => (await rowsOf(p, 'build')).includes('task-b1'));
|
|
228
|
+
await p.click('#czViewer [data-iv-edit="task-b3"]');
|
|
229
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv-ed [data-iv-more]')));
|
|
230
|
+
await p.click('#czViewer .iv-ed [data-iv-more]');
|
|
231
|
+
await until(() => p.evaluate(() => !!document.querySelector('.tkc.ivq [data-ive-ms]')));
|
|
232
|
+
await p.click('.tkc.ivq [data-ive-ms]');
|
|
233
|
+
const ms = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.milestone === true ? x : null; });
|
|
234
|
+
ok('S7 ⋯ Milestone makes it a milestone and clears its start (one date), keeping the due day', ms && ms.body.task === 'task-b3' && ms.body.start === '' && ms.body.due == null, JSON.stringify(ms));
|
|
235
|
+
const one7 = await until(() => p.evaluate(() => { const r = document.querySelector('#czViewer .iv-ed[data-iv-open="task-b3"]'); if (!r) return null; const d = [...r.querySelectorAll('.iv-edd')]; return d.length === 1 && d[0].dataset.one === '1' ? d[0].getAttribute('aria-label') : null; }));
|
|
236
|
+
ok('S7 the open row then shows one ◇ date chip, no Start and Due', one7 === 'Milestone date: Nov 12. Change', one7);
|
|
237
|
+
await p.click('#czViewer .iv-ed .iv-edd');
|
|
238
|
+
const op7 = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); return q ? { tabs: q.querySelectorAll('[data-tkc-field]').length, head: (q.querySelector('.ivd-h b') || {}).textContent, sub: (q.querySelector('.ivd-s') || {}).textContent } : null; }));
|
|
239
|
+
ok('S7 its picker is one date: "◇ Date", no Start and Due tabs', op7 && op7.tabs === 0 && op7.head === 'Date' && /one date: the milestone/.test(op7.sub || ''), JSON.stringify(op7));
|
|
240
|
+
await shot(p, 'S7-milestone-390');
|
|
241
|
+
await p.click('.tkc.ivq [data-tkc-day="2026-11-13"]');
|
|
242
|
+
const m7 = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.due === '2026-11-13' ? x : null; });
|
|
243
|
+
ok('S7 a day picked saves the due day only, and the picker closes', m7 && m7.body.start == null && await until(() => p.evaluate(() => !document.querySelector('.tkc.ivq')), 2000), JSON.stringify(m7));
|
|
244
|
+
await p.keyboard.press('Escape');
|
|
245
|
+
|
|
246
|
+
await until(async () => /Dates saved/.test(await toast(p)), 3000); // the date's toast lands after its read
|
|
247
|
+
/* S8 + on a stage */
|
|
248
|
+
await p.click('#czViewer .iv-plus[data-iv-plus="build"]');
|
|
249
|
+
await until(() => p.evaluate(() => !!document.activeElement && document.activeElement.matches('#czViewer .iv-addin input')), 4000);
|
|
250
|
+
const f8 = await until(() => p.evaluate(() => { const f = document.querySelector('#czViewer .iv-wl[data-iv-sec="build"] > .iv-addin'); if (!f) return null; const first = f.parentElement.firstElementChild; return { top: first === f, ph: f.querySelector('input').placeholder, focus: document.activeElement === f.querySelector('input'), dates: !!f.parentElement.querySelector('.iv-addd [data-iv-adddt]') }; }));
|
|
251
|
+
ok('S8 + opens the field at the top of that stage, focused, with an optional Dates chip', f8 && f8.top && f8.ph === 'New task in Build' && f8.focus && f8.dates, JSON.stringify(f8));
|
|
252
|
+
await p.keyboard.type('Release note for app teams'); await p.keyboard.press('Enter');
|
|
253
|
+
const ad = await until(() => lastPost(A, '/api/boards/tasks/add'));
|
|
254
|
+
ok('S8 Enter adds the task into that stage (section build)', ad && ad.body.title === 'Release note for app teams' && ad.body.section === 'build', JSON.stringify(ad));
|
|
255
|
+
const t8 = await until(async () => { const t = await toast(p); return /Added to Build/.test(t) ? t : null; }, 4000);
|
|
256
|
+
const k8 = await until(() => p.evaluate(() => { const i = document.querySelector('#czViewer .iv-addin input'); return i && i.value === '' && document.activeElement === i ? true : null; }), 4000);
|
|
257
|
+
ok('S8 the toast says "Added to Build" with Undo; the field stays open, empty and focused', /Undo/.test(t8 || '') && k8, JSON.stringify({ t8, k8 }));
|
|
258
|
+
await shot(p, 'S8-add-390');
|
|
259
|
+
const u8 = await undo(p);
|
|
260
|
+
const du = await until(() => lastPost(A, '/api/boards/tasks/delete'));
|
|
261
|
+
ok('S8 Undo takes the new task out', du && /^task-n/.test(du.body.task || ''), JSON.stringify({ u8, du, last: A.posts.slice(-3) }));
|
|
262
|
+
await p.keyboard.press('Escape');
|
|
263
|
+
ok('S8 Esc closes the field', await until(() => p.evaluate(() => !document.querySelector('#czViewer .iv-addin')), 3000));
|
|
264
|
+
|
|
265
|
+
/* S9 a Jira row */
|
|
266
|
+
await p.click('#czViewer [data-iv-edit="task-b2"]');
|
|
267
|
+
const j9 = await until(() => p.evaluate(() => { const r = document.querySelector('#czViewer .iv-ed[data-iv-open="task-b2"]'); if (!r) return null; return { field: !!r.querySelector('input'), st: !!r.querySelector('.iv-edst'), line: (r.querySelector('.iv-edj') || {}).textContent, dates: r.querySelectorAll('.iv-edd').length }; }));
|
|
268
|
+
ok('S9 a Jira row in place: the title and status read-only, "In Progress in Jira · read 4 min ago", start and due editable', j9 && !j9.field && !j9.st && j9.line === 'In Progress in Jira · read 4 min ago' && j9.dates === 2, JSON.stringify(j9));
|
|
269
|
+
await shot(p, 'S9-jira-390');
|
|
270
|
+
await p.click('#czViewer .iv-ed [data-f="due"]');
|
|
271
|
+
await until(() => p.evaluate(() => !!document.querySelector('.tkc.ivq .tkc-dp')));
|
|
272
|
+
await p.click('.tkc.ivq [data-tkc-day="2026-11-09"]');
|
|
273
|
+
const jd = await until(() => { const x = lastPost(A, '/api/boards/tasks/edit'); return x && x.body.task === 'task-b2' ? x : null; });
|
|
274
|
+
ok('S9 its due day saves to the task, kept in PMOS', jd && jd.body.due === '2026-11-09', JSON.stringify(jd));
|
|
275
|
+
await until(() => p.evaluate(() => !!document.querySelector('#czViewer .iv-ed [data-iv-more]')));
|
|
276
|
+
await p.click('#czViewer .iv-ed [data-iv-more]');
|
|
277
|
+
const jm = await until(() => p.evaluate(() => { const q = document.querySelector('.tkc.ivq .ive-m'); return q ? [...q.querySelectorAll('button')].map((b) => b.textContent.trim()) : null; }));
|
|
278
|
+
ok('S9 its ⋯ has Open the ticket and no Delete; the ◇ is allowed', jm && jm.join('|') === 'Milestone|Move to a stage|Open the ticket', JSON.stringify(jm));
|
|
279
|
+
await p.keyboard.press('Escape'); await p.keyboard.press('Escape');
|
|
280
|
+
|
|
281
|
+
/* S11 a long press on a phone's title lifts the row; a drop on Deliver's header moves it there */
|
|
282
|
+
await until(() => p.evaluate(() => !document.querySelector('.tkc.ivq')));
|
|
283
|
+
{
|
|
284
|
+
const n0 = A.posts.length;
|
|
285
|
+
await p.evaluate(() => document.querySelector('#czViewer .iv-ws[data-iv-sec="deliver"]').scrollIntoView({ block: 'center' })); await sleep(200);
|
|
286
|
+
const at = await p.evaluate(() => { const t = document.querySelector('#czViewer [data-iv-edit="task-b3"]').getBoundingClientRect(), h = document.querySelector('#czViewer .iv-ws[data-iv-sec="deliver"]').getBoundingClientRect(); return { x: t.left + 30, y: t.top + t.height / 2, hx: h.left + 80, hy: h.top + h.height / 2 }; });
|
|
287
|
+
const pre11 = await p.evaluate(() => ({ fly: !!document.querySelector('.iv-fly'), ed: !!document.querySelector('#czViewer .iv-ed, #czViewer .iv-addin'), dl: document.querySelectorAll('.iv-dl').length }));
|
|
288
|
+
const cdp = await p.context().newCDPSession(p);
|
|
289
|
+
await cdp.send('Input.dispatchTouchEvent', { type: 'touchStart', touchPoints: [{ x: at.x, y: at.y }] });
|
|
290
|
+
await sleep(650);
|
|
291
|
+
const lifted = await p.evaluate(() => ({ fly: !!document.querySelector('.iv-fly'), ghost: !!document.querySelector('#czViewer .iv-tr.iv-ghost') }));
|
|
292
|
+
for (let i = 1; i <= 8; i++) { await cdp.send('Input.dispatchTouchEvent', { type: 'touchMove', touchPoints: [{ x: at.x + (at.hx - at.x) * i / 8, y: at.y + (at.hy - at.y) * i / 8 }] }); await sleep(40); }
|
|
293
|
+
const mid = await p.evaluate(([x, y]) => ({ at: (() => { const e = document.elementFromPoint(x, y); return e ? e.className + ' < ' + (e.parentElement || {}).className + ' wbs:' + !!e.closest('.iv-wbs') : null; })(), fly: (document.querySelector('.iv-fly') || {}).className, tgt: (document.querySelector('#czViewer .iv-ws.iv-tgt') || {}).dataset, line: !!document.querySelector('#czViewer .iv-dl:not([hidden])'), tip: (document.querySelector('.iv-dtip') || {}).textContent }), [at.hx, at.hy]);
|
|
294
|
+
await shot(p, 'S11-drag-390');
|
|
295
|
+
await cdp.send('Input.dispatchTouchEvent', { type: 'touchEnd', touchPoints: [] });
|
|
296
|
+
ok('S11 a long press on the title lifts the row: it follows the finger, its slot stays as a dashed ghost', lifted.fly && lifted.ghost, JSON.stringify(lifted));
|
|
297
|
+
ok('S11 over Deliver\'s header the stage lights up and a blue line shows where it lands', mid.tgt && mid.tgt.ivSec === 'deliver' && mid.line && /^Drop: last in Deliver/.test(mid.tip || ''), JSON.stringify({ mid, pre11, at }));
|
|
298
|
+
const mv11 = await until(() => { const x = A.posts.slice(n0).find((y) => y.path === '/api/boards/tasks/edit' && y.body.section === 'deliver'); return x || null; });
|
|
299
|
+
const or11 = await until(() => A.posts.slice(n0).find((y) => y.path === '/api/boards/tasks/order') || null);
|
|
300
|
+
ok('S11 the drop moves it to Deliver (section) and writes the order there, last', mv11 && mv11.body.task === 'task-b3' && or11 && or11.body.section === 'deliver' && or11.body.tasks[or11.body.tasks.length - 1] === 'task-b3', JSON.stringify({ mv11, or11 }));
|
|
301
|
+
ok('S11 the click after the lift opens nothing', await p.evaluate(() => !document.querySelector('#czViewer .iv-ed')));
|
|
302
|
+
}
|
|
303
|
+
ok('S13 Home phone light: no page error', A.errors.length === 0, A.errors.join(' | '));
|
|
304
|
+
await A.ctx.close();
|
|
305
|
+
|
|
306
|
+
/* ── the Board's panel, desktop ── */
|
|
307
|
+
const B = await open({ where: 'board', w: 1440, h: 900 }), q = B.page;
|
|
308
|
+
await q.hover('#czViewer .iv-tr[data-iv-r="task-b1"]');
|
|
309
|
+
const R10 = await q.evaluate(() => { const r = document.querySelector('#czViewer .iv-tr[data-iv-r="task-b1"]'), g = r.querySelector('.iv-grip'); return { grip: !!g && getComputedStyle(g).opacity === '1', dates: r.querySelector('.iv-dc').textContent.replace(/\s+/g, ' ').trim(), av: !!r.querySelector('.iv-rav') }; });
|
|
310
|
+
ok('S10 desktop: a row shows start – due at the right and the owner\'s face; on hover the grip shows', R10.grip && R10.dates === 'Oct 30 – Nov 6' && R10.av, JSON.stringify(R10));
|
|
311
|
+
await shot(q, 'S10-rows-1440');
|
|
312
|
+
// inside the stage: the third row above the first
|
|
313
|
+
const b0 = await rowsOf(q, 'build');
|
|
314
|
+
const drag = async (fromSel, toSel, dy = 0) => {
|
|
315
|
+
const g = await q.evaluate((s) => { const e = document.querySelector(s).getBoundingClientRect(); return { x: e.left + e.width / 2, y: e.top + e.height / 2 }; }, fromSel);
|
|
316
|
+
await q.mouse.move(g.x, g.y); await q.mouse.down();
|
|
317
|
+
const t = await q.evaluate(([s, d]) => { const e = document.querySelector(s).getBoundingClientRect(); return { x: e.left + 60, y: e.top + (d === 'top' ? 4 : e.height / 2) }; }, [toSel, dy]);
|
|
318
|
+
for (let i = 1; i <= 10; i++) { await q.mouse.move(g.x + (t.x - g.x) * i / 10, g.y + (t.y - g.y) * i / 10); await sleep(20); }
|
|
319
|
+
return async () => { await q.mouse.up(); };
|
|
320
|
+
};
|
|
321
|
+
const n1 = B.posts.length;
|
|
322
|
+
const drop1 = await drag(`#czViewer .iv-tr[data-iv-r="${b0[2]}"] .iv-grip`, `#czViewer .iv-tr[data-iv-r="${b0[0]}"]`, 'top');
|
|
323
|
+
const mid1 = await q.evaluate(() => ({ line: !!document.querySelector('#czViewer .iv-dl:not([hidden])'), ghost: !!document.querySelector('#czViewer .iv-ghost'), tgt: (document.querySelector('#czViewer .iv-ws.iv-tgt') || {}).dataset }));
|
|
324
|
+
await shot(q, 'S10-drag-1440');
|
|
325
|
+
await drop1();
|
|
326
|
+
const o1 = await until(() => B.posts.slice(n1).find((x) => x.path === '/api/boards/tasks/order') || null);
|
|
327
|
+
ok('S10 dragging a row up inside its stage shows the ghost, the lit stage and the line; the drop saves the order only', mid1.line && mid1.ghost && mid1.tgt && mid1.tgt.ivSec === 'build' && o1 && o1.body.section === 'build' && o1.body.tasks.slice(0, 3).join() === [b0[2], b0[0], b0[1]].join() && o1.body.tasks.includes('task-b4') && !B.posts.slice(n1).some((x) => x.path === '/api/boards/tasks/edit'), JSON.stringify({ mid1, o1, b0 }));
|
|
328
|
+
const b1 = await until(async () => { const r = await rowsOf(q, 'build'); return r[0] === b0[2] ? r : null; }, 5000);
|
|
329
|
+
ok('S10 the new order shows on the next read (a task-order record)', !!b1, JSON.stringify(b1));
|
|
330
|
+
const t10 = await until(async () => { const t = await toast(q); return /Order saved/.test(t) ? t : null; }, 4000);
|
|
331
|
+
await undo(q);
|
|
332
|
+
const ou = await until(() => { const L = B.posts.filter((x) => x.path === '/api/boards/tasks/order'); return L.length === 2 ? L[1] : null; });
|
|
333
|
+
ok('S10 "Order saved" with Undo; Undo puts the old order back', /Undo/.test(t10 || '') && ou && Array.isArray(ou.body.tasks) && ou.body.tasks.length === 0, JSON.stringify({ t10, ou }));
|
|
334
|
+
// into another stage (once the Undo's read has put the rows back)
|
|
335
|
+
await until(async () => (await rowsOf(q, 'build')).join() === b0.join(), 5000);
|
|
336
|
+
const n2 = B.posts.length;
|
|
337
|
+
const drop2 = await drag('#czViewer .iv-tr[data-iv-r="task-b1"] .iv-grip', '#czViewer .iv-ws[data-iv-sec="deliver"]');
|
|
338
|
+
await drop2();
|
|
339
|
+
const e2 = await until(() => B.posts.slice(n2).find((x) => x.path === '/api/boards/tasks/edit') || null);
|
|
340
|
+
const o2 = await until(() => B.posts.slice(n2).find((x) => x.path === '/api/boards/tasks/order') || null);
|
|
341
|
+
ok('S10 a drop on another stage moves it there (section) and puts it last; status and dates stay', e2 && e2.body.section === 'deliver' && !('start' in e2.body) && !('due' in e2.body) && o2 && o2.body.section === 'deliver' && o2.body.tasks.join() === 'task-d1,task-b1', JSON.stringify({ e2, o2 }));
|
|
342
|
+
// ⋯ › Open the task card opens the one task editor
|
|
343
|
+
await until(async () => (await rowsOf(q, 'deliver')).includes('task-b1')); await sleep(500);
|
|
344
|
+
await q.click('#czViewer [data-iv-edit="task-b1"]');
|
|
345
|
+
const R8 = await until(() => q.evaluate(() => { const r = document.querySelector('#czViewer .iv-ed[data-iv-open="task-b1"]'); if (!r) return null; const d = [...r.querySelectorAll('.iv-edd')], m = r.querySelector('[data-iv-more]'); return { gap: Math.round(m.getBoundingClientRect().left - d[d.length - 1].getBoundingClientRect().right), w: Math.round(r.getBoundingClientRect().width) }; }));
|
|
346
|
+
ok('S2 desktop: ⋯ sits right after the dates, not at the far edge', R8 && R8.gap < 30, JSON.stringify(R8));
|
|
347
|
+
await shot(q, 'S2-open-1440');
|
|
348
|
+
await q.click('#czViewer .iv-ed [data-iv-more]');
|
|
349
|
+
await until(() => q.evaluate(() => !!document.querySelector('.tkc.ivq [data-ive-card]')));
|
|
350
|
+
await shot(q, 'S6-more-1440');
|
|
351
|
+
await q.click('.tkc.ivq [data-ive-card]');
|
|
352
|
+
ok('S6 Open the task card opens the one task editor', await until(() => q.evaluate(() => !!document.querySelector('#czViewer .tkc, #czViewer [data-cz-vw="back"]')), 6000));
|
|
353
|
+
ok('S13 Board desktop light: no page error', B.errors.length === 0, B.errors.join(' | '));
|
|
354
|
+
await B.ctx.close();
|
|
355
|
+
|
|
356
|
+
/* S12 the Timeline and Kanban */
|
|
357
|
+
const C = await open({ where: 'board', w: 1440, h: 900, view: 'timeline' }), c = C.page;
|
|
358
|
+
await c.evaluate(() => { const b = [...document.querySelectorAll('#czViewer .ivt-gh')].find((x) => /Deliver/.test(x.textContent) && x.getAttribute('aria-expanded') === 'false'); if (b) b.click(); });
|
|
359
|
+
const T12 = await until(() => c.evaluate(() => { const d = document.querySelector('#czViewer .ivt [data-ivt-bar="task-d1"]'); return d ? { cls: d.className, one: d.dataset.one, label: (document.querySelector('#czViewer .ivt-ms.lb b') || {}).textContent } : null; }));
|
|
360
|
+
ok('S12 Timeline: a milestone is its ◇ on its date with no bar, the date beside it', T12 && /\bivt-d\b/.test(T12.cls) && /\bms\b/.test(T12.cls) && !/ivt-b/.test(T12.cls) && T12.label === 'Nov 14', JSON.stringify(T12));
|
|
361
|
+
await c.click('#czViewer .ivt [data-ivt-bar="task-d1"]');
|
|
362
|
+
const p12 = await until(() => c.evaluate(() => { const q = document.querySelector('.tkc.ivq .tkc-dp'); return q ? { tabs: q.querySelectorAll('[data-tkc-field]').length, one: !!q.querySelector('.one') } : null; }));
|
|
363
|
+
ok('S12 its press opens the one-date picker', p12 && p12.tabs === 0 && p12.one, JSON.stringify(p12));
|
|
364
|
+
await c.keyboard.press('Escape');
|
|
365
|
+
await shot(c, 'S12-timeline-1440');
|
|
366
|
+
const dms = await c.evaluate(() => { const d = document.querySelector('#czViewer .ivt [data-ivt-bar="task-d1"]').getBoundingClientRect(); return { x: d.left + d.width / 2, y: d.top + d.height / 2 }; });
|
|
367
|
+
await c.mouse.move(dms.x, dms.y); await c.mouse.down();
|
|
368
|
+
for (let i = 1; i <= 6; i++) { await c.mouse.move(dms.x + i * 6, dms.y); await sleep(20); }
|
|
369
|
+
await c.mouse.up();
|
|
370
|
+
const dd = await until(() => { const x = lastPost(C, '/api/boards/tasks/edit'); return x && x.body.task === 'task-d1' ? x : null; });
|
|
371
|
+
ok('S12 dragging the ◇ moves its date (the due day only)', dd && /^2026-11-\d\d$/.test(dd.body.due || '') && dd.body.due !== '2026-11-14' && !('start' in dd.body), JSON.stringify(dd));
|
|
372
|
+
await c.evaluate(() => { localStorage.setItem('pmos.tasks.view', 'kanban'); });
|
|
373
|
+
await c.evaluate(() => document.querySelector('#czViewer [data-iv-vbtn]').click());
|
|
374
|
+
await until(() => c.evaluate(() => !!document.querySelector('.tkc.ivq .ivs')));
|
|
375
|
+
await c.click('.tkc.ivq [data-ivs-view="kanban"]'); await c.keyboard.press('Escape');
|
|
376
|
+
await c.evaluate(() => { const b = document.querySelector('#czViewer [data-iv-kstage]'); if (b) b.click(); });
|
|
377
|
+
await until(() => c.evaluate(() => !!document.querySelector('.tkc.ivq .ivq-m')));
|
|
378
|
+
await c.evaluate(() => { const b = [...document.querySelectorAll('.tkc.ivq .ivq-m button')].find((x) => /Deliver/.test(x.textContent)); if (b) b.click(); });
|
|
379
|
+
const k12 = await until(() => c.evaluate(() => { const d = [...document.querySelectorAll('#czViewer .ivk-d')].find((x) => /MAGW migration ready/.test(x.textContent)); return d ? { date: (d.querySelector('.iv-dc') || {}).innerText, glyph: !!d.querySelector('.iv-dms svg'), title: !!d.querySelector('.iv-tt + .iv-ms') } : null; }));
|
|
380
|
+
ok('S12 Kanban: a milestone card says "◇ Nov 14" (its ◇ once)', k12 && /^Nov \d+$/.test((k12.date || '').trim()) && k12.glyph && !k12.title, JSON.stringify(k12));
|
|
381
|
+
await shot(c, 'S12-kanban-1440');
|
|
382
|
+
ok('S13 Board Timeline and Kanban: no page error', C.errors.length === 0, C.errors.join(' | '));
|
|
383
|
+
await C.ctx.close();
|
|
384
|
+
|
|
385
|
+
/* S13 dark, phone and desktop */
|
|
386
|
+
for (const [where, w, h] of [['home', 390, 844], ['board', 1440, 900], ['home', 1440, 900]]) {
|
|
387
|
+
const D = await open({ where, w, h, theme: 'dark' }), d = D.page;
|
|
388
|
+
await d.click('#czViewer [data-iv-edit="task-b1"]');
|
|
389
|
+
await until(() => d.evaluate(() => !!document.querySelector('#czViewer .iv-ed')));
|
|
390
|
+
const bg = await d.evaluate(() => { const r = document.querySelector('#czViewer .iv-ed'), f = r.querySelector('.iv-edn'); return { row: getComputedStyle(r).backgroundColor, field: getComputedStyle(f).backgroundColor, ink: getComputedStyle(f).color }; });
|
|
391
|
+
ok(`S13 ${where} ${w} dark: the open row and its field take the dark tokens`, bg.row !== 'rgb(255, 255, 255)' && bg.field !== 'rgb(255, 255, 255)' && bg.ink !== 'rgb(0, 0, 0)', JSON.stringify(bg));
|
|
392
|
+
await shot(d, `S13-${where}-${w}-dark`);
|
|
393
|
+
ok(`S13 ${where} ${w} dark: no page error`, D.errors.length === 0, D.errors.join(' | '));
|
|
394
|
+
await D.ctx.close();
|
|
395
|
+
}
|
|
396
|
+
return finish();
|
|
397
|
+
})();
|
|
@@ -186,7 +186,7 @@ async function pure() {
|
|
|
186
186
|
const f = BF.facts(); f.rows = f.rows.map((r) => (r.id === 'self-serve-v2' ? { ...r, stage: 'Build', start: '2026-06-01', end: '2027-02-01', status: 'on track' } : r));
|
|
187
187
|
const B = BP.build(f), row = B.rows.find((x) => x.id === 'self-serve-v2'); row.tasks = TASKS; row.start = '2026-06-01'; row.end = '2027-02-01';
|
|
188
188
|
const A = await open({ w: 1440, h: 900, board: B }), p = A.page;
|
|
189
|
-
if (!(await p.evaluate((v) => document.querySelector(v + ' .iv').getBoundingClientRect().width >= 820, V))) await p.
|
|
189
|
+
if (!(await p.evaluate((v) => document.querySelector(v + ' .iv').getBoundingClientRect().width >= 820, V))) await p.evaluate(() => window.czViewer.wide(true)); // Home's header has ⧉ in place of ⤢ since batch 18 item 15; wide() is the same width
|
|
190
190
|
const mc = await until(() => p.evaluate((v) => { const m = document.querySelector(v + ' .iv-cl > .iv-msc'); if (!m || !m.offsetParent) return null; const rows = [...m.querySelectorAll('.iv-msr')];
|
|
191
191
|
return { head: m.querySelector('.iv-msh').textContent.replace(/\s+/g, ' ').trim(), rows: rows.map((r) => r.className.replace('iv-msr', '').trim() + ':' + r.textContent.replace(/\s+/g, ' ').trim()), tick: m.querySelectorAll('.iv-msr.dn .iv-msk.dn svg').length,
|
|
192
192
|
press: rows.every((r) => r.dataset.ivMs && /Open its task$/.test(r.getAttribute('aria-label'))), after: !!(m.previousElementSibling && m.previousElementSibling.classList.contains('iv-card')) }; }, V));
|
|
@@ -38,6 +38,14 @@ const ITEMS = [
|
|
|
38
38
|
it('scarlet.a1b2c3d4e5', 'WP2 Newsroom pilot plan', { store: 'item', end: '2026-12-11' }),
|
|
39
39
|
];
|
|
40
40
|
|
|
41
|
+
// batch 18 item 16: with quick changes on, a title press opens the row in place; the task card is under its ⋯ (Open the task card)
|
|
42
|
+
const openCard = async (pg, uid, V = '#czViewer') => {
|
|
43
|
+
if (await pg.$(`${V} [data-iv-task="${uid}"]`)) return pg.click(`${V} [data-iv-task="${uid}"]`);
|
|
44
|
+
await pg.click(`${V} [data-iv-edit="${uid}"]`);
|
|
45
|
+
await pg.click(`${V} .iv-ed[data-iv-open="${uid}"] [data-iv-more]`);
|
|
46
|
+
await pg.waitForSelector('.tkc.ivq [data-ive-card]', { timeout: 8000 });
|
|
47
|
+
return pg.click('.tkc.ivq [data-ive-card]');
|
|
48
|
+
};
|
|
41
49
|
(async () => {
|
|
42
50
|
const exe = findBrowser();
|
|
43
51
|
if (!exe) { console.log('✗ no Chrome/Chromium on this machine — the suite cannot run'); return finish(1); }
|
|
@@ -115,7 +123,7 @@ const ITEMS = [
|
|
|
115
123
|
await p.click('#ibBody [data-key="board:scarlet"]');
|
|
116
124
|
await p.waitForSelector('.iv-tr', { timeout: 8000 });
|
|
117
125
|
await unfold(p);
|
|
118
|
-
await p
|
|
126
|
+
await openCard(p, 'task-api', '#czViewer');
|
|
119
127
|
await p.waitForSelector('.tkc .seg', { timeout: 8000 }).catch(() => {});
|
|
120
128
|
const row = await p.evaluate(() => {
|
|
121
129
|
const seg = document.querySelector('.tkc .seg'); if (!seg) return null;
|
|
@@ -75,6 +75,7 @@ function model() {
|
|
|
75
75
|
|
|
76
76
|
const open = async (o = {}) => {
|
|
77
77
|
const ctx = await browser.newContext({ viewport: { width: o.w || 1440, height: o.h || 900 } });
|
|
78
|
+
await ctx.addInitScript(() => { try { if (localStorage.getItem('cz-pn:board') == null) localStorage.setItem('cz-pn:board', JSON.stringify({ v: 2, share: 0.405 })); } catch { /* none */ } }); // the Board's Viewer at 560 px beside the page (cozy-panels.js keeps only this share), so its Tasks Timeline is wide enough to drag
|
|
78
79
|
const page = await ctx.newPage();
|
|
79
80
|
const errors = [], posts = [];
|
|
80
81
|
page.on('pageerror', (e) => errors.push(String((e && e.stack) || e)));
|
|
@@ -148,9 +148,9 @@ const ITEMS = [
|
|
|
148
148
|
// every stage open, so each task row is drawn
|
|
149
149
|
const unfold = async (sel) => { for (let i = 0; i < 12; i++) { const b = await p.$(sel); if (!b) break; await b.click(); await p.waitForTimeout(80); } };
|
|
150
150
|
await unfold('.iv-ws[data-iv-fold^="sec:"][aria-expanded="false"]');
|
|
151
|
-
const rows = await p.evaluate(() => [...document.querySelectorAll('.iv-tr')].map((r) => ({ t: (r.querySelector('.iv-tt') || {}).textContent, ms: !!r.querySelector('.iv-ms'), ask: (r.querySelector('.iv-dc.ms') || {}).textContent || '' })));
|
|
151
|
+
const rows = await p.evaluate(() => [...document.querySelectorAll('.iv-tr')].map((r) => ({ t: (r.querySelector('.iv-tt') || {}).textContent, ms: !!r.querySelector('.iv-ms, .iv-dms'), ask: (r.querySelector('.iv-dc.ms') || {}).textContent || '' })));
|
|
152
152
|
const by = (t) => rows.find((x) => x.t === t) || {};
|
|
153
|
-
ok('F the List shows a small ◇
|
|
153
|
+
ok('F the List shows a small ◇ on a milestone task (with its date, batch 18 item 16), none on a plain task', by('Feature delivered').ms && by('KPI evaluated').ms && !by('Ship the article summaries API').ms, JSON.stringify(rows));
|
|
154
154
|
ok('F a milestone with no due date asks for it in a dashed chip', by('Support FAQ').ask === 'Set the due date', JSON.stringify(by('Support FAQ')));
|
|
155
155
|
await p.click('.iv-tr:has(.iv-tt:text-is("Ship the article summaries API")) .iv-car');
|
|
156
156
|
const pick = await p.evaluate(() => { const b = document.querySelector('.ivq-st .ivq-ms'); return b ? { lbl: b.getAttribute('aria-label'), tip: b.getAttribute('title'), pressed: b.getAttribute('aria-pressed'), vr: document.querySelectorAll('.ivq-st .vr').length, text: b.textContent } : null; });
|
|
@@ -167,7 +167,7 @@ const ITEMS = [
|
|
|
167
167
|
await p.waitForSelector('.ivt', { timeout: 5000 });
|
|
168
168
|
await unfold('.ivt-gh[data-iv-fold^="sec:"][aria-expanded="false"]');
|
|
169
169
|
const tv = await p.evaluate(() => ({ ms: [...document.querySelectorAll('.ivt-ms')].map((x) => x.className + '|' + x.textContent), guides: document.querySelectorAll('.ivt-grid i.ms').length, lg: (document.querySelector('.ivt-lg') || {}).textContent || '' }));
|
|
170
|
-
ok('V a milestone
|
|
170
|
+
ok('V a milestone is its ◇ only, no bar (batch 18 item 16), the date beside it; a done one filled', tv.ms.some((x) => /^ivt-ms lb dn\|Dec 11$/.test(x)) && tv.ms.some((x) => /^ivt-ms lb\|Jan 29$/.test(x)) && tv.ms.some((x) => /^ivt-ms lb\|Mar 31$/.test(x)), JSON.stringify(tv));
|
|
171
171
|
ok('V a faint dashed guide drops at each milestone date, and the legend names Milestone', tv.guides === 3 && /Milestone/.test(tv.lg), JSON.stringify(tv));
|
|
172
172
|
await shot(p, 'milestones-viewer-timeline-1440');
|
|
173
173
|
ok('the panel threw nothing', !errors.length, errors.join('\n'));
|
|
@@ -85,7 +85,7 @@ function model() {
|
|
|
85
85
|
await page.route('**/api/task-plans/preview*', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, summary: { added: 0, moved: 1, changed: 1, dropped: 0, conflicts: [], milestones: [], planName: 'Change 1 · faster pilot · Oct 17', notChosen: [] } }) }));
|
|
86
86
|
await page.route('**/api/task-plans/live', (r) => { posts.push({ url: r.request().url(), body: r.request().postDataJSON() }); r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, plan: 'plan-2', name: 'Change 1 · faster pilot', summary: {}, versions: null }) }); });
|
|
87
87
|
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 */ } },
|
|
88
|
-
[{ 'pmos.board.view': 'time', 'pmos.board.span': o.span || 'half', 'pmos.tasks.view': 'timeline', 'pmos.tasks.zoom': 'month', ...(o.store || {}) }]);
|
|
88
|
+
[{ 'pmos.board.tlcols': '[]', 'pmos.board.view': 'time', 'pmos.board.span': o.span || 'half', 'pmos.tasks.view': 'timeline', 'pmos.tasks.zoom': 'month', ...(o.store || {}) }]);
|
|
89
89
|
await page.goto(BASE + '/premium-board.html?ws=w1&board=w1');
|
|
90
90
|
await page.waitForSelector('#ibBody [data-key]', { timeout: 15000 });
|
|
91
91
|
await page.waitForTimeout(500);
|
|
@@ -62,9 +62,17 @@ async function page(url) {
|
|
|
62
62
|
await p.goto(BASE + url);
|
|
63
63
|
return { ctx, p, errors, posts };
|
|
64
64
|
}
|
|
65
|
+
// batch 18 item 16: with quick changes on, a title press opens the row in place; the task card is under its ⋯ (Open the task card)
|
|
66
|
+
const openCard = async (pg, uid, V = '#czViewer') => {
|
|
67
|
+
if (await pg.$(`${V} [data-iv-task="${uid}"]`)) return pg.click(`${V} [data-iv-task="${uid}"]`);
|
|
68
|
+
await pg.click(`${V} [data-iv-edit="${uid}"]`);
|
|
69
|
+
await pg.click(`${V} .iv-ed[data-iv-open="${uid}"] [data-iv-more]`);
|
|
70
|
+
await pg.waitForSelector('.tkc.ivq [data-ive-card]', { timeout: 8000 });
|
|
71
|
+
return pg.click('.tkc.ivq [data-ive-card]');
|
|
72
|
+
};
|
|
65
73
|
// the view's task rows: every stage section opened, so each task the board holds is drawn
|
|
66
74
|
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);
|
|
75
|
+
const titleBtn = (p, uid) => until(async () => { await openSections(p); return p.evaluate((a) => !!document.querySelector(a[0] + ` :is([data-iv-task="${a[1]}"], [data-iv-edit="${a[1]}"])`), [V, uid]); }, 10000);
|
|
68
76
|
// 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
77
|
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
78
|
const t = (v.querySelector('.cz-vw-title') || {}).textContent || '';
|
|
@@ -86,11 +94,11 @@ const back = (p) => p.evaluate(() => { const b = document.querySelector('#czView
|
|
|
86
94
|
const up = await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"] .iv-sc'), V), 30000);
|
|
87
95
|
ok('T0 Home opens the initiative\'s page', up);
|
|
88
96
|
ok('T1 each task\'s title is a press', await titleBtn(hp, 't1') && await titleBtn(hp, 't2'));
|
|
89
|
-
await hp
|
|
97
|
+
await openCard(hp, 't1', V);
|
|
90
98
|
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
99
|
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
100
|
await titleBtn(hp, 't2');
|
|
93
|
-
await hp
|
|
101
|
+
await openCard(hp, 't2', V);
|
|
94
102
|
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
103
|
await shot(hp, 'home-task-press-1440.png');
|
|
96
104
|
ok('T2 ← goes back to the page', await back(hp) && await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V), 5000));
|
|
@@ -110,7 +118,7 @@ const back = (p) => p.evaluate(() => { const b = document.querySelector('#czView
|
|
|
110
118
|
await bp.click(row);
|
|
111
119
|
ok('T4 its panel opens', await until(() => bp.evaluate(() => { const c = window.czViewer && window.czViewer.current(); return !!c && c.kind === 'Initiative'; }), 8000));
|
|
112
120
|
ok('T4 a task\'s title on the panel is a press', await titleBtn(bp, 't2'));
|
|
113
|
-
await bp
|
|
121
|
+
await openCard(bp, 't2', V);
|
|
114
122
|
ok('T4 it opens the one task editor', await editorOf(bp, TASKS[1].title), await bp.evaluate((v) => (document.querySelector(v) || {}).textContent, V));
|
|
115
123
|
await shot(bp, 'board-task-press-1440.png');
|
|
116
124
|
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));
|