create-pmos 0.421.0 → 0.423.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +25 -25
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/scripts/anchor-resolve.js +93 -15
- package/payload/state/discoveries.md +1 -1
- package/workspace/board-programs-test.js +87 -3
- package/workspace/briefing-premium-adddoc-test.js +1 -1
- package/workspace/briefing-premium-board-test.js +13 -11
- package/workspace/briefing-premium-initiative-test.js +30 -38
- package/workspace/changelog.json +24 -0
- package/workspace/fixtures/report-api/draft.json +2 -1
- package/workspace/guide/briefing-premium.md +2 -1
- package/workspace/guide/home.md +14 -4
- package/workspace/guide/programs.md +5 -3
- package/workspace/guide/workflows.md +5 -1
- package/workspace/home-other-product-test.js +55 -0
- package/workspace/ini-workflow-test.js +4 -4
- package/workspace/lib/board-premium.js +21 -6
- package/workspace/lib/custom-docs.js +65 -3
- package/workspace/lib/doc-live-root.js +37 -0
- package/workspace/lib/engine/anchor-resolve.js +93 -15
- package/workspace/lib/engine/boards.js +30 -2
- package/workspace/lib/engine/intake.js +1 -1
- package/workspace/lib/hold-spans.js +24 -10
- package/workspace/lib/initiative-writer.js +63 -1
- package/workspace/lib/kg.js +1 -1
- package/workspace/lib/plan-items.js +36 -5
- package/workspace/lib/programs.js +11 -3
- package/workspace/lib/report-draft.js +3 -0
- package/workspace/lib/route-modules.js +2 -0
- package/workspace/lib/routes-board-premium.js +28 -0
- package/workspace/lib/routes-boards.js +92 -13
- package/workspace/lib/routes-doc-sheet.js +29 -1
- package/workspace/lib/routes-initiatives.js +12 -0
- package/workspace/lib/routes-programs.js +44 -5
- package/workspace/lib/routes-task-links.js +329 -0
- package/workspace/lib/routes-task-plans.js +333 -0
- package/workspace/lib/split-merge-suggest.js +162 -0
- package/workspace/lib/split-merge.js +379 -0
- package/workspace/lib/task-cli.js +73 -13
- package/workspace/lib/task-items.js +15 -3
- package/workspace/lib/task-links.js +422 -0
- package/workspace/lib/task-plans.js +232 -0
- package/workspace/lib/vendor/scripts/anchor-resolve.js +93 -15
- package/workspace/lib/vendor/scripts/intake.js +1 -1
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-board-actions-test.js +2 -2
- package/workspace/premium-core-doc-issue-test.js +2 -2
- package/workspace/premium-vw-backlog-test.js +3 -3
- package/workspace/premium-vw-doc-test.js +26 -3
- package/workspace/premium-vw-item-test.js +3 -3
- package/workspace/premium-vw-jira-test.js +6 -6
- package/workspace/product-lane-test.js +165 -0
- package/workspace/program-leave-test.js +203 -0
- package/workspace/program-panel-test.js +1 -1
- package/workspace/public/pm/bd-acts.js +5 -2
- package/workspace/public/pm/bd-ini-panel.js +32 -9
- package/workspace/public/pm/bd-prog-panel.js +22 -7
- package/workspace/public/pm/bd-prog.js +6 -1
- package/workspace/public/pm/bd-span.js +234 -30
- package/workspace/public/pm/bd-views.js +3 -2
- package/workspace/public/pm/cozy-board.css +90 -0
- package/workspace/public/pm/cozy-home.css +3 -0
- package/workspace/public/pm/doc-follow.js +36 -0
- package/workspace/public/pm/home-app.js +62 -14
- package/workspace/public/pm/home-ini-model.js +0 -34
- package/workspace/public/pm/home-ini.js +81 -204
- package/workspace/public/pm/home-list.js +2 -2
- package/workspace/public/pm/home-today.js +3 -1
- package/workspace/public/pm/ini-groups.js +228 -0
- package/workspace/public/pm/ini-links.js +561 -0
- package/workspace/public/pm/ini-tasks.js +131 -30
- package/workspace/public/pm/ini-versions.js +348 -0
- package/workspace/public/pm/ini-view-model.js +113 -43
- package/workspace/public/pm/ini-view.css +341 -18
- package/workspace/public/pm/ini-view.js +153 -38
- package/workspace/public/pm/premium-board.js +160 -21
- package/workspace/public/pm/premium-report-read.js +20 -1
- package/workspace/public/pm/premium-shell.js +29 -4
- package/workspace/public/pm/premium-vw-doc.js +46 -11
- package/workspace/public/pm/prog-move.js +69 -0
- package/workspace/public/pm/split-merge.css +77 -0
- package/workspace/public/pm/split-merge.js +265 -0
- package/workspace/public/pm/stage-line.js +414 -0
- package/workspace/public/pm/task-card.css +3 -0
- package/workspace/public/pm/task-card.js +15 -6
- package/workspace/public/pm/wf-page.css +2 -0
- package/workspace/public/pm/wf-page.js +2 -0
- package/workspace/public/pm/wf-stage.js +2 -1
- package/workspace/server.js +15 -1
- package/workspace/split-merge-ui-test.js +175 -0
- package/workspace/stage-card-test.js +12 -11
- package/workspace/task-card-test.js +3 -2
- package/workspace/task-delete-test.js +126 -0
- package/workspace/task-links-test.js +227 -0
- package/workspace/task-milestones-test.js +176 -0
- package/workspace/task-plans-test.js +181 -0
- package/workspace/task-views-test.js +3 -3
- package/workspace/test-lists/bd-ini-panel.json +8 -2
- package/workspace/test-lists/product-lane.json +6 -0
- package/workspace/test-lists/program-leave.json +6 -0
- package/workspace/test-lists/split-merge.json +15 -0
- package/workspace/test-lists/task-delete.json +5 -0
- package/workspace/test-lists/task-links.json +6 -0
- package/workspace/test-lists/task-milestones.json +6 -0
- package/workspace/test-lists/task-plans.json +6 -0
- package/workspace/test-lists/viewer-live-file.json +9 -0
- package/workspace/timeline-holds-test.js +61 -4
- package/workspace/tk-tasks-test.js +173 -57
- package/workspace/workflows-setup-test.js +4 -3
|
@@ -141,9 +141,9 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
|
|
|
141
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
142
|
lg: document.querySelector('#czViewer .ivt-lg').textContent, arch: /Old spike notes/.test(T.textContent) };
|
|
143
143
|
});
|
|
144
|
-
ok('V4 Timeline keeps the List\'s stage groups', tl.groups.join('|') === 'Triage|Discover|
|
|
144
|
+
ok('V4 Timeline keeps the List\'s stage groups, one per stage (batch 11 item 5)', tl.groups.join('|') === 'Triage|Discover|Plan|Prioritize|Build|Deliver|Monitor|Evaluate', JSON.stringify(tl.groups));
|
|
145
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
|
|
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/.test(tl.lg), JSON.stringify(tl));
|
|
147
147
|
ok('V4 an archived task shows nowhere in Timeline', !tl.arch);
|
|
148
148
|
await shot(p, 'timeline-1440');
|
|
149
149
|
await p.click('#czViewer [data-iv-zoom]');
|
|
@@ -184,7 +184,7 @@ const model = () => { const M = BP.build(F.facts()); const r = M.rows.find((x) =
|
|
|
184
184
|
await shot(p, 'kanban-1440');
|
|
185
185
|
await p.click('#czViewer [data-iv-kstage]');
|
|
186
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|
|
|
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|Plan1 open|Prioritize|Build|Deliver|Monitor|Evaluate', JSON.stringify(st));
|
|
188
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
189
|
const all = await until(() => p.evaluate(() => (document.querySelector('#czViewer [data-iv-kstage]') || {}).textContent === 'All stages' ? document.querySelectorAll('#czViewer .ivk-d').length : null));
|
|
190
190
|
ok('V6 All stages shows every task but the archived one (Won\'t do stays in its folded strip)', all === 6, String(all));
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_comment": "feedback batch 6 items 1 and 3 (OvIniA): ONE initiative view on the Board, Home and the phone. The node suite is pure (ini-view-model.js); the browser half is in briefing-premium-board-test.js (the Board's panel) and stage-card-test.js (Home's page).",
|
|
3
|
-
"modules": [
|
|
4
|
-
|
|
3
|
+
"modules": [
|
|
4
|
+
"ini-view-model.test.js",
|
|
5
|
+
"stage-line.test.js"
|
|
6
|
+
],
|
|
7
|
+
"seconds": {
|
|
8
|
+
"ini-view-model.test.js": 1,
|
|
9
|
+
"stage-line.test.js": 1
|
|
10
|
+
}
|
|
5
11
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Feedback batch 11 item 17, milestones on the product lane: a product's head row on the Board timeline rolls up every milestone of its initiatives. The panels suite drives the Board in a browser.",
|
|
3
|
+
"modules": [],
|
|
4
|
+
"panels": ["product-lane-test.js"],
|
|
5
|
+
"seconds": { "product-lane-test.js": 30 }
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "feedback batch 11 item 2 (option A): move an initiative out of its program, or to another, from its ⋯ on the Board panel, the Home page and the phone sheet; the leave takes it off the charter's milestones and Undo puts them back (canvas LpA1More, LpA2Other, LpA3Done, LpA4Phone, LpA5PhoneDone).",
|
|
3
|
+
"modules": ["program-leave.test.js"],
|
|
4
|
+
"panels": ["program-leave-test.js"],
|
|
5
|
+
"seconds": { "program-leave.test.js": 2, "program-leave-test.js": 45 }
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "feedback batch 11 item 14 (option A grilled): split one initiative in two, or merge two, with one Undo; Claude suggests from the tasks (the dot, the card with ✕ ✎ ✓), the split editor and the merge check on the Board and Home (canvas XsmA1Suggest, XsmA1Menu, XsmA2Split, XsmA3SplitDone, XsmA5MergeCheck, XsmA7Closed).",
|
|
3
|
+
"modules": [
|
|
4
|
+
"split-merge-suggest.test.js",
|
|
5
|
+
"split-merge.test.js"
|
|
6
|
+
],
|
|
7
|
+
"seconds": {
|
|
8
|
+
"split-merge-suggest.test.js": 1,
|
|
9
|
+
"split-merge.test.js": 40,
|
|
10
|
+
"split-merge-ui-test.js": 60
|
|
11
|
+
},
|
|
12
|
+
"panels": [
|
|
13
|
+
"split-merge-ui-test.js"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Feedback batch 11 item 16, a Delete for every PMOS task (breakdown items too, never a Jira ticket): the trash in the status picker, with Undo. The panels suite drives the Board's initiative panel in a browser.",
|
|
3
|
+
"panels": ["task-delete-test.js"],
|
|
4
|
+
"seconds": { "task-delete-test.js": 25 }
|
|
5
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Feedback batch 11 item 15, task dependencies: links between tasks, Claude's proposals, the quiet moves, Needs you (lib/task-links.js, lib/routes-task-links.js, pm/ini-links.js). The modules suite folds pure and then serves a scratch server; the panels suite drives the Board's Viewer in a browser.",
|
|
3
|
+
"modules": ["task-links.test.js"],
|
|
4
|
+
"panels": ["task-links-test.js"],
|
|
5
|
+
"seconds": { "task-links.test.js": 8, "task-links-test.js": 45 }
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Feedback batch 11 item 3, several milestones per initiative: a ◇ flag on any task, one ◇ per milestone on the Board timeline and the Viewer Tasks timeline. The modules suite reads the task-milestone lines; the panels suite drives the Board and the Viewer in a browser.",
|
|
3
|
+
"modules": ["task-milestones.test.js"],
|
|
4
|
+
"panels": ["task-milestones-test.js"],
|
|
5
|
+
"seconds": { "task-milestones.test.js": 6, "task-milestones-test.js": 40 }
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Feedback batch 11 item 8, planned versus actual: drafts of an initiative's tasks, saved plans, Make live and its Undo (lib/task-plans.js, lib/routes-task-plans.js). The modules suite folds pure and then serves a scratch server; the panels suite drives the Board and the Viewer in a browser.",
|
|
3
|
+
"modules": ["task-plans.test.js"],
|
|
4
|
+
"panels": ["task-plans-test.js"],
|
|
5
|
+
"seconds": { "task-plans.test.js": 6, "task-plans-test.js": 40 }
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "feedback batch 11 item 1: the Viewer follows chat's edits to the open file, from the initiative's worktree, with no commit (pure + a real git worktree).",
|
|
3
|
+
"modules": [
|
|
4
|
+
"doc-live-file.test.js"
|
|
5
|
+
],
|
|
6
|
+
"seconds": {
|
|
7
|
+
"doc-live-file.test.js": 1
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -10,6 +10,9 @@
|
|
|
10
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
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
12
|
* M the phone keeps the ⏸ only
|
|
13
|
+
* X no activity (batch 11 item 13; XgapA1Board, XgapAHard, XgapA3Phone, XgapAGrill): a plain gap is a hairline with its words, split at today; a hold
|
|
14
|
+
* wins for its dates; » for a skipped stage between two dated ones (on the gap, or at the joint), none at the ends; a narrow » goes to the bar's
|
|
15
|
+
* title; a future gap's press offers + New task with its dates; the legend keys only while drawn; the phone sheet lists the gap and the skip
|
|
13
16
|
* SHOTS_8=<dir>: the timeline at 1440 and 390, light and dark, and the ⏸ menu, into <dir>. */
|
|
14
17
|
const path = require('path');
|
|
15
18
|
const { spawn } = require('child_process');
|
|
@@ -36,7 +39,8 @@ const held = (from, back, reason) => ({ status: 'on hold', stopped: { state: 'on
|
|
|
36
39
|
const ROWS = [
|
|
37
40
|
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
41
|
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' }]
|
|
42
|
+
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', before: 'discover', after: 'build' }],
|
|
43
|
+
warnings: ['Skipped Plan'], stageSpans: [{ stage: 'discover', start: '2026-09-01', due: '2026-10-20' }, { stage: 'build', start: '2027-01-10', due: '2027-03-20' }] }),
|
|
40
44
|
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
45
|
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
46
|
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: '' }] }),
|
|
@@ -83,6 +87,7 @@ const ROWS = [
|
|
|
83
87
|
hl: [...r.querySelectorAll('.tg-hl')].map((x) => x.className + '|' + x.textContent),
|
|
84
88
|
end: (r.querySelector('.tg-end') || {}).className || '', lab: [...r.querySelectorAll('.tg-lab')].map((x) => x.textContent),
|
|
85
89
|
tabs: [...r.querySelectorAll('.tg-edge')].map((b) => b.dataset.edge + ':' + b.textContent.trim()),
|
|
90
|
+
ng: [...r.querySelectorAll('.tg-ng')].map((b) => ({ tag: b.tagName, label: b.getAttribute('aria-label') || '', sk: !!b.querySelector('.tg-sk') })),
|
|
86
91
|
};
|
|
87
92
|
}, title);
|
|
88
93
|
|
|
@@ -95,11 +100,13 @@ const ROWS = [
|
|
|
95
100
|
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
101
|
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
102
|
const rc = await rowOf(p, 'Recovery codes');
|
|
98
|
-
ok('A a plain gap
|
|
103
|
+
ok('A a plain gap in the dated work breaks the bar with a hairline, not a hold\'s dotted line: no ⏸, no label (batch 11 item 13)', rc && rc.bars.length === 2 && !rc.gaps.length && !rc.pz.length && !rc.hl.length
|
|
104
|
+
&& rc.ng.length === 1 && rc.ng[0].tag === 'BUTTON' && rc.ng[0].label === 'Nothing planned, Oct 21 to Jan 9 · 12 wk. Plan skipped' && rc.ng[0].sk, JSON.stringify(rc));
|
|
99
105
|
const pk = await rowOf(p, 'Passkey sign-in');
|
|
100
106
|
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
107
|
const lg = await p.evaluate(() => (document.querySelector('#bdChipset .tg-lgd') || {}).textContent || '');
|
|
102
|
-
ok('L the legend names "On hold" while a hold is drawn', /
|
|
108
|
+
ok('L the legend names "On hold" while a hold is drawn', /To do\s*On hold/.test(lg), lg);
|
|
109
|
+
ok('X the legend names "No activity" and "Skipped" while they are drawn', /On hold\s*No activity\s*Skipped\s*Jira forecast/.test(lg), lg);
|
|
103
110
|
|
|
104
111
|
const nr = await rowOf(p, 'On hold, no return date');
|
|
105
112
|
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)
|
|
@@ -141,7 +148,7 @@ const ROWS = [
|
|
|
141
148
|
{
|
|
142
149
|
const { ctx, page: p } = await open({ rows: ROWS.filter((r) => !r.holds) });
|
|
143
150
|
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)', /
|
|
151
|
+
ok('L with no hold drawn, no "On hold" in the legend (zero is silence)', /To do/.test(lg) && !/On hold/.test(lg), lg);
|
|
145
152
|
await ctx.close();
|
|
146
153
|
}
|
|
147
154
|
|
|
@@ -179,6 +186,50 @@ const ROWS = [
|
|
|
179
186
|
await ctx.close();
|
|
180
187
|
}
|
|
181
188
|
|
|
189
|
+
/* X no activity, through the engine (batch 11 item 13): words split at today, a hold wins, » placement, ends not drawn, a narrow » to the title */
|
|
190
|
+
{
|
|
191
|
+
const { ctx, page: p, errors } = await open();
|
|
192
|
+
const r = await p.evaluate(async () => {
|
|
193
|
+
const S = await import('/pm/bd-span.js'), now = new Date(2026, 9, 17), d = document.createElement('div');
|
|
194
|
+
const draw = (row, sp = 'year', o = {}) => { d.innerHTML = S.timelineHtml([{ key: 'board:x', id: 'x', title: 'X', track: { key: 'build', k: 4 }, ...row }], { jira: null }, sp, { now, trackPx: 1100, ...o }).html;
|
|
195
|
+
return { ng: [...d.querySelectorAll('.tg-ng')].map((b) => ({ tag: b.tagName, label: b.getAttribute('aria-label') || '', sk: !!b.querySelector('.tg-sk'), ahead: b.dataset.ahead === '1' })),
|
|
196
|
+
sk: [...d.querySelectorAll('.tg-sk.on')].map((x) => x.getAttribute('aria-label') || ''), bars: [...d.querySelectorAll('.tg-bar')].map((b) => b.getAttribute('title')), gaps: d.querySelectorAll('.tg-gap').length }; };
|
|
197
|
+
const base = { start: '2026-07-20', end: '2027-02-26' };
|
|
198
|
+
const across = draw({ ...base, gaps: [{ from: '2026-10-01', to: '2026-11-29' }] });
|
|
199
|
+
const past = draw({ ...base, gaps: [{ from: '2026-09-19', to: '2026-10-17' }] });
|
|
200
|
+
const held = draw({ ...base, gaps: [{ from: '2026-09-01', to: '2026-12-01' }], holds: [{ from: '2026-09-01', to: '2026-12-01', back: null, reason: '' }] });
|
|
201
|
+
// Recovery codes (XgapA1Board): Discover, then no activity, then Build; Plan skipped with its reason; Prioritize was done in the gap too
|
|
202
|
+
const SKP = { track: { key: 'build', k: 4, skipped: [2, 3], skipWhy: [{ stage: 'plan', why: 'The security review fixed the scope' }, { stage: 'prioritize', why: '' }] },
|
|
203
|
+
stageSpans: [{ stage: 'discover', start: '2026-07-20', due: '2026-09-18' }, { stage: 'build', start: '2026-10-19', due: '2027-02-26' }] };
|
|
204
|
+
const onGap = draw({ ...base, ...SKP, gaps: [{ from: '2026-09-18', to: '2026-10-19', before: 'discover', after: 'build' }] });
|
|
205
|
+
const joint = draw({ ...base, ...SKP, stageSpans: [{ stage: 'discover', start: '2026-07-20', due: '2026-10-19' }, { stage: 'build', start: '2026-10-19', due: '2027-02-26' }], gaps: [] });
|
|
206
|
+
const ends = draw({ ...base, track: { key: 'build', k: 4, skipped: [0], skipWhy: [] }, stageSpans: [{ stage: 'discover', start: '2026-07-20', due: '2026-09-18' }, { stage: 'build', start: '2026-10-19', due: '2027-02-26' }], gaps: [] });
|
|
207
|
+
const narrow = draw({ ...base, ...SKP, gaps: [{ from: '2026-09-18', to: '2026-10-19', before: 'discover', after: 'build' }] }, 'y5');
|
|
208
|
+
const keys = S.gapKeys([{ ...base, ...SKP, gaps: [{ from: '2026-09-18', to: '2026-10-19' }] }]), none = S.gapKeys([{ ...base }]);
|
|
209
|
+
const lg = S.legendHtml(false, false, keys);
|
|
210
|
+
return { across, past, held, onGap, joint, ends, narrow, keys, none, lg };
|
|
211
|
+
});
|
|
212
|
+
ok('X a gap across today says both: no activity up to yesterday, nothing planned from today', r.across.ng.length === 1 && r.across.ng[0].label === 'No activity, Oct 2 to Oct 16 · 2 wk. Nothing planned, Oct 17 to Nov 28 · 6 wk' && r.across.ng[0].ahead, JSON.stringify(r.across));
|
|
213
|
+
ok('X a past gap says "No activity" and offers no New task', r.past.ng[0].label === 'No activity, Sep 20 to Oct 16 · 4 wk' && !r.past.ng[0].ahead, JSON.stringify(r.past));
|
|
214
|
+
ok('X a hold over the same days wins: its dotted line, no hairline', r.held.gaps === 1 && r.held.ng.length === 0, JSON.stringify(r.held));
|
|
215
|
+
ok('X a skipped stage between two dated ones is one » on the gap; its words name each skip with its reason', r.onGap.ng.length === 1 && r.onGap.ng[0].sk && !r.onGap.sk.length
|
|
216
|
+
&& r.onGap.ng[0].label === 'No activity, Sep 19 to Oct 16 · 4 wk. Nothing planned, Oct 17 to Oct 18 · 2 days. Plan skipped: the security review fixed the scope. Prioritize skipped', JSON.stringify(r.onGap));
|
|
217
|
+
ok('X no gap between the two stages: the » sits on the bar at the joint', r.joint.ng.length === 0 && r.joint.sk.length === 1 && /^Plan skipped: the security review fixed the scope\. Prioritize skipped$/.test(r.joint.sk[0]), JSON.stringify(r.joint));
|
|
218
|
+
ok('X a skip before the first dated stage is not drawn', r.ends.ng.length === 0 && r.ends.sk.length === 0, JSON.stringify(r.ends));
|
|
219
|
+
ok('X on 5 yr the gap is under 24 px: no », its words go to the bar\'s title', r.narrow.ng.every((g) => !g.sk) && r.narrow.bars.some((t) => /Plan skipped: the security review fixed the scope/.test(t)), JSON.stringify(r.narrow));
|
|
220
|
+
ok('X the legend keys No activity and Skipped only while one is drawn', r.keys.gap && r.keys.skip && !r.none.gap && !r.none.skip && /No activity/.test(r.lg) && /Skipped/.test(r.lg), JSON.stringify([r.keys, r.none]));
|
|
221
|
+
// the press: a future gap's card with its words and + New task with its dates
|
|
222
|
+
await p.click('#ibBody [data-row="board:recovery-codes"] .tg-ng');
|
|
223
|
+
const card = await p.evaluate(() => { const c = document.querySelector('.tg-gpc'); return c ? { words: [...c.querySelectorAll('p')].map((x) => x.textContent), add: (c.querySelector('.gp-add') || {}).getAttribute && c.querySelector('.gp-add').getAttribute('aria-label') } : null; });
|
|
224
|
+
ok('X a future gap opens a card with its words and + New task with the gap\'s dates', card && card.words.join('|') === 'Nothing planned, Oct 21 to Jan 9 · 12 wk|Plan skipped' && card.add === 'New task, Oct 21 to Jan 9', JSON.stringify(card));
|
|
225
|
+
await shot(p, 'timeline-gap-card-1440');
|
|
226
|
+
await p.click('.tg-gpc .gp-add'); await p.waitForTimeout(400);
|
|
227
|
+
const add = await p.evaluate(() => { const f = document.querySelector('#ivAddTask'); return f ? f.placeholder : null; });
|
|
228
|
+
ok('X + opens the initiative with New task ready, the gap\'s dates named', add === 'A task for Recovery codes, Oct 21 to Jan 9', String(add));
|
|
229
|
+
ok('X the gap press threw nothing', !errors.length, errors.join('\n'));
|
|
230
|
+
await ctx.close();
|
|
231
|
+
}
|
|
232
|
+
|
|
182
233
|
/* M the phone: ⏸ only, no dates beside it */
|
|
183
234
|
{
|
|
184
235
|
const { ctx, page: p, errors } = await open({ w: 390, h: 844 });
|
|
@@ -189,6 +240,12 @@ const ROWS = [
|
|
|
189
240
|
const sh = await p.evaluate(() => { const h = document.querySelector('#bdPop'); return { sheet: h.classList.contains('sheet'), h4: (h.querySelector('h4') || {}).textContent }; });
|
|
190
241
|
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));
|
|
191
242
|
await shot(p, 'timeline-holds-menu-390');
|
|
243
|
+
const ng = await p.evaluate(() => [...document.querySelectorAll('#ibBody .tg-ng')].map((x) => x.tagName));
|
|
244
|
+
ok('X the phone draws the hairline with no words and no press', ng.length >= 1 && ng.every((t) => t === 'SPAN'), JSON.stringify(ng));
|
|
245
|
+
await p.keyboard.press('Escape'); await p.waitForTimeout(200);
|
|
246
|
+
await p.click('#ibBody .tgq-r[data-row="board:recovery-codes"] > .tg-p', { position: { x: 200, y: 10 } });
|
|
247
|
+
const sh2 = await p.evaluate(() => { const s = document.querySelector('.tg-msp.sh'); return s ? [...s.querySelectorAll('.o')].map((x) => x.textContent.trim()) : null; });
|
|
248
|
+
ok('X tapping the row on a phone opens its sheet, which lists the gap', sh2 && sh2.some((t) => /^Nothing planned · 12 wk/.test(t)), JSON.stringify(sh2));
|
|
192
249
|
ok('the phone timeline threw nothing', !errors.length, errors.join('\n'));
|
|
193
250
|
await ctx.close();
|
|
194
251
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
|
-
/* tk-tasks-test.js — the
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
/* tk-tasks-test.js — the initiative's Tasks section groups its tasks and sends the PRD's tickets to Jira (feedback batch 11 item 20: the old
|
|
4
|
+
* All tasks panel is retired; canvas In development, row "Tasks takes over the old All tasks panel": XtaA1Group, XtaA2Epic, XtaA3Mine,
|
|
5
|
+
* XtaA4NewTask, XtaA5Phone; kit 2, T1 to T3: PgTkDraft, PgTkSend, PgTkSent). Serves the real page from the real server. GET /api/jira/tickets
|
|
6
|
+
* answers the view lib/jira-tickets.js builds from a synthetic repository (two epics, a ticket that lacks text); the writes are caught, so
|
|
7
|
+
* nothing reaches Jira or the repository. Screenshots go to TK_SHOTS when set.
|
|
8
|
+
* G1 the group icon and its menu · T1 By epic by itself, the send icon, the sent state · T2 the drafted ticket · T3 the Send sheet, its one
|
|
9
|
+
* labeled Send · G2 Your groups: drag between, ⋯, New group · G3 Timeline and Kanban draw the groups · G4 the phone · G5 the Board's panel
|
|
10
|
+
* · G6 the old panel is gone, New → A task opens the Tasks field */
|
|
7
11
|
const fs = require('fs');
|
|
8
12
|
const path = require('path');
|
|
9
13
|
const { spawn } = require('child_process');
|
|
@@ -53,8 +57,16 @@ SENT.tickets.find((t) => t.id === 'S2').jira = { status: 'To Do', category: 'tod
|
|
|
53
57
|
SENT.checkedAt = new Date(new Date().setHours(9, 2, 0, 0)).toISOString();
|
|
54
58
|
|
|
55
59
|
const mk = () => IP.build(F.facts());
|
|
56
|
-
|
|
60
|
+
/* the initiative's own tasks, on the Board's row both pages read (the fixture's day is 2026-10-17) */
|
|
61
|
+
const TASKS = [
|
|
62
|
+
{ 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' },
|
|
63
|
+
{ uid: 'task-b', title: 'Stakeholder review with Security', status: 'To do', owner: 'Wawan', section: 'discover' },
|
|
64
|
+
{ uid: 'task-c', title: 'Plan the rollout', status: 'To do', owner: 'Wawan', start: '2026-11-02', end: '2026-11-06', section: 'plan' },
|
|
65
|
+
{ uid: 'task-d', title: 'Kick-off notes with the team', status: 'Done', owner: 'Wawan', end: '2026-10-12', section: 'discover' },
|
|
66
|
+
];
|
|
67
|
+
const BOARD = (() => { const M = BP.build(BF.facts()); const r = M.rows.find((x) => x.id === I); r.tasks = TASKS.map((t) => ({ ...t })); return M; })();
|
|
57
68
|
const BRIEF = BRP.build(BRF.facts());
|
|
69
|
+
const LAYOUT = { ok: true, auto: true, held: [], by: 'stage', names: [], of: {}, stage: {}, sets: [] };
|
|
58
70
|
|
|
59
71
|
(async () => {
|
|
60
72
|
const exe = findBrowser();
|
|
@@ -65,51 +77,80 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
65
77
|
await T.waitForServer(BASE);
|
|
66
78
|
browser = await chromium.launch({ executablePath: exe });
|
|
67
79
|
|
|
68
|
-
|
|
69
|
-
|
|
80
|
+
// the layout answers like lib/initiative-layout.js folds it: a press changes it, and the next read sees the change
|
|
81
|
+
const open = async ({ w = 1440, h = 900, theme = 'light', view = VIEW, layout = {}, page: pg = 'home', touch = false } = {}) => {
|
|
82
|
+
const ctx = await browser.newContext({ viewport: { width: w, height: h }, hasTouch: touch, isMobile: touch });
|
|
70
83
|
const page = await ctx.newPage();
|
|
71
84
|
const errors = [], posts = [];
|
|
72
|
-
let cur = view;
|
|
85
|
+
let cur = view, L = { ...LAYOUT, ...layout };
|
|
73
86
|
page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
|
|
74
87
|
page.on('request', (rq) => { if (rq.method() === 'POST') posts.push({ path: new URL(rq.url()).pathname, body: JSON.parse(rq.postData() || '{}') }); });
|
|
75
88
|
const json = (r, b, status = 200) => r.fulfill({ status, contentType: 'application/json', body: JSON.stringify(b) });
|
|
89
|
+
const press = (b) => {
|
|
90
|
+
if (b.kind === 'by') L = { ...L, by: b.by, picked: true };
|
|
91
|
+
else if (b.kind === 'groups') { const of = {}; for (const [k, v] of Object.entries(L.of)) if (b.names.includes(v)) of[k] = v; L = { ...L, names: b.names, of }; }
|
|
92
|
+
else if (b.kind === 'rename') { const of = {}; for (const [k, v] of Object.entries(L.of)) of[k] = v === b.from ? b.to : v; L = { ...L, names: L.names.map((n) => (n === b.from ? b.to : n)), of }; }
|
|
93
|
+
else if (b.kind === 'place') { const of = { ...L.of }; if (b.group) of[b.task] = b.group; else delete of[b.task]; L = { ...L, of }; }
|
|
94
|
+
else if (b.kind === 'set') L = { ...L, sets: L.sets.concat({ name: b.name, names: b.names }) };
|
|
95
|
+
return L;
|
|
96
|
+
};
|
|
76
97
|
await page.route('**/api/initiative-premium*', (r) => json(r, { ok: true, state: 'ready', model: mk(), as_of: Date.now() }));
|
|
77
98
|
await page.route(/\/api\/board-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BOARD, as_of: Date.now() }));
|
|
78
99
|
await page.route(/\/api\/briefing-premium(\?.*)?$/, (r) => json(r, { ok: true, state: 'ready', model: BRIEF, as_of: Date.now() }));
|
|
79
100
|
await page.route('**/api/briefing-premium/**', (r) => json(r, { ok: true, turns: [], working: false }));
|
|
80
|
-
await page.route(
|
|
101
|
+
await page.route('**/api/board-trail*', (r) => json(r, { ok: false, error: 'not in this check' }, 500));
|
|
102
|
+
await page.route(/\/api\/initiative-layout(\?.*)?$/, (r) => json(r, r.request().method() === 'GET' ? L : press(JSON.parse(r.request().postData() || '{}'))));
|
|
81
103
|
await page.route(/\/api\/jira\/tickets(\?.*)?$/, (r) => json(r, { ...cur, ws: 'w1', pushing: null, checking: null }));
|
|
82
104
|
await page.route(/\/api\/boards\/items(\?.*)?$/, (r) => json(r, { ok: true, ws: 'w1', board: 'w1', jiraProjects: ['IDPF'], items: [], initiatives: [] }));
|
|
105
|
+
await page.route(/\/api\/boards\/tasks\//, (r) => json(r, { ok: true }));
|
|
83
106
|
await page.route(/\/api\/jira\/(push|epic|edit|draft)$/, (r) => json(r, { ok: true, session: 's1', tickets: 7 }));
|
|
107
|
+
if (pg === 'board') {
|
|
108
|
+
await page.goto(BASE + '/premium-board.html?theme=' + theme);
|
|
109
|
+
await until(() => page.evaluate(() => document.querySelectorAll('#ibBody .ini2, #ibBody .bt-l').length > 0), 20000);
|
|
110
|
+
await page.evaluate((id) => { const b = [...document.querySelectorAll(`[data-row="board:${id}"] .bt-nm, [data-key="board:${id}"]`)].find((x) => x.offsetParent); if (b) b.click(); }, I);
|
|
111
|
+
const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv .iv-th')), 20000);
|
|
112
|
+
return { ctx, page, errors, posts, up, set: (v) => { cur = v; } };
|
|
113
|
+
}
|
|
84
114
|
await page.goto(BASE + '/premium.html?ini=' + I + '&ws=w1&board=w1&theme=' + theme);
|
|
85
115
|
const up = await until(() => page.evaluate(() => !!document.querySelector('#czViewer .iv-sc')), 30000);
|
|
86
116
|
return { ctx, page, errors, posts, up, set: (v) => { cur = v; } };
|
|
87
117
|
};
|
|
88
118
|
const V = '#czViewer:not([hidden])';
|
|
89
|
-
const tasks = async (p) => {
|
|
90
|
-
await (async (g) => { const P = '#czViewer:not([hidden]) [data-hi-v="page"]', r = '#hmList [data-hm-sel^="i:"][aria-current="true"]'; for (let i = 0; i < 4 && !(await g.$(P)) && (await g.$('#czViewer:not([hidden]) [data-cz-vw="back"]')); i++) { await g.click('#czViewer [data-cz-vw="back"]'); await g.waitForTimeout(150); } if (await g.$(P)) return; if (await g.$(r)) await g.click(r); else await g.reload(); await g.waitForSelector(P + ' .iv', { timeout: 30000 }); })(p); /* ← back to the initiative's page, else its row, else the address again (an initiative the list does not show) */ await p.click('#czViewer [data-cz-vw="more"]').then(() => p.click('.cz-vw-menu [role="menuitem"]:has(> span:first-child:text-is("All tasks"))')); /* the initiative's page (canvas HbC): its + drills into Tasks */
|
|
91
|
-
return until(() => p.evaluate((v) => !!document.querySelector(v + ' .tk-g .tk-row'), V), 30000);
|
|
92
|
-
};
|
|
93
119
|
const shot = async (p, name) => { if (!SHOTS) return; fs.mkdirSync(SHOTS, { recursive: true }); await sleep(250); await p.screenshot({ path: path.join(SHOTS, name) }); };
|
|
94
120
|
const txt = (p, s) => p.evaluate((q) => ((document.querySelector(q) || {}).textContent || '').replace(/\s+/g, ' ').trim(), s);
|
|
121
|
+
const heads = (p) => p.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs .iv-ws b')].map((b) => b.textContent), V);
|
|
122
|
+
const epics = (p) => until(() => p.evaluate((v) => !!document.querySelector(v + ' .iv-wbs .ig-tk'), V), 20000);
|
|
123
|
+
const lastPost = (A, route) => A.posts.filter((x) => x.path === route).pop();
|
|
95
124
|
|
|
96
|
-
/* T1 · desktop:
|
|
125
|
+
/* G1 · T1 · desktop: the page's Tasks, grouped by epic by itself */
|
|
97
126
|
const A = await open(), p = A.page;
|
|
98
127
|
ok('0 Home draws the initiative', A.up);
|
|
99
|
-
ok('T1
|
|
100
|
-
const
|
|
101
|
-
ok('
|
|
102
|
-
ok('
|
|
103
|
-
ok('T1
|
|
104
|
-
|
|
105
|
-
ok('T1
|
|
106
|
-
ok('T1
|
|
107
|
-
await p.
|
|
108
|
-
ok('T1
|
|
109
|
-
await
|
|
128
|
+
ok('T1 Tasks groups by epic by itself once the tickets are drafted', await epics(p));
|
|
129
|
+
const hd = await p.evaluate((v) => [...document.querySelector(v + ' .iv-th').children].map((e) => (e.getAttribute('aria-label') || e.className || e.tagName) + (e.textContent.trim() && e.matches('button') ? '+text' : '')).join(), V);
|
|
130
|
+
ok('G1 one icon-only "Group tasks by" press in the Tasks header, right side, before the view switch', /Group tasks by,Tasks view,Add a task/.test(hd), hd);
|
|
131
|
+
ok('G1 the group icon shows its grouping is not the default', await p.evaluate((v) => document.querySelector(v + ' [data-ig-by]').classList.contains('on'), V));
|
|
132
|
+
ok('T1 one group per epic, in the PRD\'s order, then Your tasks', (await heads(p)).join('|') === 'Sign-in and sign-up|Sessions, SSO and second factor|Your tasks', JSON.stringify(await heads(p)));
|
|
133
|
+
const sends = await p.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs > :is(.iv-wsw, .iv-ws)')].map((g) => !!g.querySelector('[data-ig-send]')).join(), V);
|
|
134
|
+
ok('T1 each epic has its send icon; Your tasks has none', sends === 'true,true,false', sends);
|
|
135
|
+
ok('T1 an epic\'s count says how many are drafted', /5 drafted/.test(await txt(p, V + ' .iv-wbs > .iv-wsw')));
|
|
136
|
+
ok('T1 a drafted ticket row has no box, reads "Story · M" and opens the draft', await p.evaluate((v) => { const r = document.querySelector(v + ' .ig-tk'); return !!r && r.dataset.igTk === 'S1' && !r.querySelector('.iv-cb') && !!r.querySelector('.ig-tkd') && /Sign-in parity\s*Story · M/.test(r.textContent); }, V));
|
|
137
|
+
ok('T1 the ticket that lacks text carries its marker', await p.evaluate((v) => { const m = document.querySelector(v + ' .ig-tk[data-ig-tk="S5"] .ig-mk.warn'); return !!m && /Missing/.test(m.getAttribute('aria-label')); }, V));
|
|
138
|
+
ok('T1 the card leads Tasks: "N tickets are drafted, not in Jira" with one Send to Jira', /6 tickets are drafted, not in Jira/.test(await txt(p, V + ' .ig-sum')) && (await txt(p, V + ' .ig-sum [data-ig-sendall]')) === 'Send to Jira' && (await p.$$(V + ' [data-ig-sendall]')).length === 1, await txt(p, V + ' .ig-sum'));
|
|
139
|
+
await shot(p, 'tasks-epic-1440.png');
|
|
140
|
+
await p.click(V + ' [data-ig-by]');
|
|
141
|
+
const gm = await until(() => p.evaluate(() => { const m = document.querySelector('.ig-pop [role="menu"]'); return m ? [...m.querySelectorAll('[role^="menuitem"]')].map((b) => b.innerText.replace(/\s+/g, ' ').trim() + (b.getAttribute('aria-checked') === 'true' ? '*' : '')) : null; }));
|
|
142
|
+
ok('G1 the menu: Group by Stage, Epic, Your groups, Owner, Status, then New group; Epic is checked', !!gm && gm.join('|') === 'Stage|Epic 2 epics*|Your groups|Owner|Status|New group', JSON.stringify(gm));
|
|
143
|
+
await shot(p, 'group-menu-1440.png');
|
|
144
|
+
await p.click('.ig-pop [role="menuitemradio"]:has-text("Stage")');
|
|
145
|
+
const by = await until(() => lastPost(A, '/api/initiative-layout'));
|
|
146
|
+
ok('G1 a pick is kept for the workspace: by stage', !!by && by.body.kind === 'by' && by.body.by === 'stage' && by.body.initiative === I && by.body.ws === 'w1', JSON.stringify(by && by.body));
|
|
147
|
+
ok('G1 Stage draws the stages again, with no ticket rows', await until(() => p.evaluate((v) => !document.querySelector(v + ' .ig-tk') && !document.querySelector(v + ' .ig-sum') && [...document.querySelectorAll(v + ' .iv-wbs .iv-ws b')].some((b) => /Discover/.test(b.textContent)), V)));
|
|
148
|
+
await p.click(V + ' [data-ig-by]');
|
|
149
|
+
await p.click('.ig-pop [role="menuitemradio"]:has-text("Epic")');
|
|
150
|
+
await epics(p);
|
|
110
151
|
|
|
111
|
-
/* T3 · the Send sheet from
|
|
112
|
-
await p.click(V + '
|
|
152
|
+
/* T3 · the Send sheet from an epic's send icon */
|
|
153
|
+
await p.click(V + ' [data-ig-send]');
|
|
113
154
|
const sheet = await until(() => p.evaluate(() => { const s = document.querySelector('.tk-sheet'); return s && s.querySelector('[data-tk-go]') ? s.textContent.replace(/\s+/g, ' ') : null; }));
|
|
114
155
|
ok('T3 the sheet names the project and the new epic after the group', !!sheet && /Project\s*IDPF/.test(sheet) && /Epic\s*New: Sign-in and sign-up/.test(sheet), sheet);
|
|
115
156
|
ok('T3 the complete tickets are ticked, the one that lacks text is not', await p.evaluate(() => [...document.querySelectorAll('.tk-sheet [data-tk-tick]')].map((b) => b.getAttribute('aria-checked') + (b.getAttribute('aria-disabled') ? '!' : '')).join() === 'true,true,true,true,false!'));
|
|
@@ -129,7 +170,8 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
129
170
|
ok('T3 the sheet closes after the send', await until(() => p.evaluate(() => !document.querySelector('.tk-sheet'))));
|
|
130
171
|
|
|
131
172
|
/* T2 · one drafted ticket */
|
|
132
|
-
await p
|
|
173
|
+
await epics(p);
|
|
174
|
+
await p.click(V + ' .ig-tk[data-ig-tk="S1"]');
|
|
133
175
|
const dr = await until(() => p.evaluate((v) => { const b = document.querySelector(v + ' .tk-draft'); return b ? b.textContent.replace(/\s+/g, ' ') : null; }, V));
|
|
134
176
|
ok('T2 the drafted ticket: its four fields', !!dr && /Type\s*Story/.test(dr) && /Priority\s*High/.test(dr) && /Estimate\s*M/.test(dr) && /Depends on\s*Nothing/.test(dr), dr);
|
|
135
177
|
ok('T2 User story and Acceptance criteria shown, the criteria numbered', /User story\s*As a customer/.test(dr) && (await p.$$(V + ' .tk-ac')).length === 3);
|
|
@@ -137,7 +179,7 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
137
179
|
ok('T2 one send icon, and ← back to the tasks', !!(await p.$(V + ' [data-tk-send]')) && !!(await p.$('#czViewer [data-cz-vw="back"]')));
|
|
138
180
|
await shot(p, 'draft-1440.png');
|
|
139
181
|
await p.click(V + ' [data-tk-field="priority"]');
|
|
140
|
-
await p.click('.
|
|
182
|
+
await p.click('.ig-pop [role="menuitemradio"]:has-text("Highest")');
|
|
141
183
|
const ed = await until(() => A.posts.find((x) => x.path === '/api/jira/edit'));
|
|
142
184
|
ok('T2 a field changes in place: an edit of the draft, never Jira', !!ed && ed.body.id === 'S1' && ed.body.patch.priority === 'Highest', JSON.stringify(ed));
|
|
143
185
|
await p.click(V + ' [data-tk-fold="flow"]');
|
|
@@ -150,49 +192,123 @@ const BRIEF = BRP.build(BRF.facts());
|
|
|
150
192
|
ok('T2 the send icon opens the sheet with this ticket ticked', await until(() => p.evaluate(() => [...document.querySelectorAll('.tk-sheet [data-tk-tick][aria-checked="true"]')].map((b) => b.dataset.tkTick).join() === 'S1')));
|
|
151
193
|
await p.keyboard.press('Escape');
|
|
152
194
|
await p.click('#czViewer [data-cz-vw="back"]');
|
|
153
|
-
ok('T2 ← returns to the
|
|
154
|
-
await p.click(V + ' [data-
|
|
155
|
-
ok('T3 the
|
|
195
|
+
ok('T2 ← returns to the page\'s Tasks, still pressable', await epics(p));
|
|
196
|
+
await p.click(V + ' [data-ig-sendall]');
|
|
197
|
+
ok('T3 the card\'s Send to Jira opens the same sheet with every group', await until(() => p.evaluate(() => document.querySelectorAll('.tk-sheet .tk-sec').length === 2)));
|
|
198
|
+
await p.keyboard.press('Escape');
|
|
199
|
+
|
|
200
|
+
/* G6 · the old panel is gone */
|
|
201
|
+
await p.click('#czViewer [data-cz-vw="more"]');
|
|
202
|
+
const more = await until(() => p.evaluate(() => { const m = document.querySelector('.cz-vw-menu'); return m ? [...m.querySelectorAll('[role="menuitem"] > span:first-child')].map((s) => s.textContent) : null; }));
|
|
203
|
+
ok('G6 the page\'s ⋯ has no "All tasks"', !!more && !more.includes('All tasks'), JSON.stringify(more));
|
|
156
204
|
await p.keyboard.press('Escape');
|
|
157
205
|
ok('0 no page error', !A.errors.length, A.errors.join(' | '));
|
|
158
206
|
await A.ctx.close();
|
|
159
207
|
|
|
160
|
-
/*
|
|
208
|
+
/* G2 · Your groups: drag a task between them, the group's ⋯, New group */
|
|
161
209
|
{
|
|
162
|
-
const B = await open({
|
|
163
|
-
ok('
|
|
164
|
-
ok('
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
await
|
|
210
|
+
const B = await open({ layout: { by: 'mine', picked: true, names: ['Design', 'Legal'], of: { 'task:task-a': 'Design' }, sets: [{ name: 'Design · Legal', names: ['Design', 'Legal'] }] } }), q = B.page;
|
|
211
|
+
ok('G2 a grouping the PM chose wins over the Epic default', await until(() => q.evaluate((v) => !document.querySelector(v + ' .ig-tk') && [...document.querySelectorAll(v + ' .iv-wbs .iv-ws b')].map((b) => b.textContent).join('|') === 'Design|Legal|Not in a group', V), 20000), JSON.stringify(await heads(q)));
|
|
212
|
+
ok('G2 each of the PM\'s groups has its ⋯; Not in a group has none', await q.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs > .ig-dz')].map((g) => !!g.querySelector('[data-ig-gmore]')).join() === 'true,true,false', V));
|
|
213
|
+
await q.click(V + ' .ig-dz[data-ig-drop=""] [data-iv-fold]');
|
|
214
|
+
await until(() => q.evaluate((v) => !!document.querySelector(v + ' [data-ig-drag="task-b"]'), V));
|
|
215
|
+
await shot(q, 'tasks-mine-1440.png');
|
|
216
|
+
await q.dragAndDrop(V + ' [data-ig-drag="task-b"]', V + ' .ig-dz[data-ig-drop="Legal"] .iv-ws');
|
|
217
|
+
const pl = await until(() => lastPost(B, '/api/initiative-layout'));
|
|
218
|
+
ok('G2 a task dragged onto Legal is placed there, kept for the workspace', !!pl && pl.body.kind === 'place' && pl.body.task === 'task:task-b' && pl.body.group === 'Legal', JSON.stringify(pl && pl.body));
|
|
219
|
+
ok('G2 the toast says "Moved to Legal." with Undo', await until(() => q.evaluate(() => { const t = document.getElementById('hiToast'); return !!t && !t.hidden && /Moved to Legal\./.test(t.textContent) && !!t.querySelector('[data-hi-undo]'); })));
|
|
220
|
+
ok('G2 Legal now holds the task', await until(() => q.evaluate((v) => /Stakeholder review/.test((document.querySelector(v + ' .ig-dz[data-ig-drop="Legal"]') || {}).textContent || ''), V)));
|
|
221
|
+
await q.click('#hiToast [data-hi-undo]');
|
|
222
|
+
const un = await until(() => { const x = lastPost(B, '/api/initiative-layout'); return x && x.body.group === '' ? x : null; });
|
|
223
|
+
ok('G2 Undo puts it back where it was', !!un && un.body.task === 'task:task-b', JSON.stringify(un && un.body));
|
|
224
|
+
await q.click(V + ' [data-ig-gmore="Legal"]');
|
|
225
|
+
const gmm = await until(() => q.evaluate(() => { const m = document.querySelector('.ig-pop [role="menu"]'); return m ? [...m.querySelectorAll('[role="menuitem"]')].map((b) => b.innerText.replace(/\s+/g, ' ').trim()) : null; }));
|
|
226
|
+
ok('G2 a group\'s ⋯: Rename, Delete the group (its tasks stay)', !!gmm && gmm.join('|') === 'Rename|Delete the group Its tasks stay', JSON.stringify(gmm));
|
|
227
|
+
await q.click('.ig-pop [role="menuitem"]:has-text("Rename")');
|
|
228
|
+
await q.fill('.ig-pop input', 'Legal and filing');
|
|
229
|
+
await q.keyboard.press('Enter');
|
|
230
|
+
const rn = await until(() => lastPost(B, '/api/initiative-layout'));
|
|
231
|
+
ok('G2 Rename writes the new name', !!rn && rn.body.kind === 'rename' && rn.body.from === 'Legal' && rn.body.to === 'Legal and filing', JSON.stringify(rn && rn.body));
|
|
232
|
+
await q.click(V + ' [data-ig-by]');
|
|
233
|
+
const gm2 = await until(() => q.evaluate(() => { const m = document.querySelector('.ig-pop [role="menu"]'); return m ? m.textContent.replace(/\s+/g, ' ') : null; }));
|
|
234
|
+
ok('G2 the menu lists Your group sets, then New group', !!gm2 && /Your group sets\s*Design · Legal/.test(gm2) && /New group$/.test(gm2.trim()), gm2);
|
|
235
|
+
await q.click('.ig-pop [role="menuitem"]:has-text("New group")');
|
|
236
|
+
await q.fill('.ig-pop input', 'Filing');
|
|
237
|
+
await q.click('.ig-pop [data-ig-ok]');
|
|
238
|
+
const ng = await until(() => { const x = lastPost(B, '/api/initiative-layout'); return x && x.body.kind === 'groups' ? x : null; });
|
|
239
|
+
ok('G2 New group adds a group to the PM\'s own', !!ng && ng.body.names.join('|') === 'Design|Legal and filing|Filing', JSON.stringify(ng && ng.body));
|
|
240
|
+
await shot(q, 'tasks-mine-after-1440.png');
|
|
241
|
+
|
|
242
|
+
/* G3 · Timeline and Kanban draw the same groups */
|
|
243
|
+
await q.click(V + ' [data-iv-view="timeline"]');
|
|
244
|
+
const tg = await until(() => q.evaluate((v) => { const g = [...document.querySelectorAll(v + ' .ivt-gh b')].map((b) => b.textContent); return g.length ? g : null; }, V));
|
|
245
|
+
ok('G3 Timeline draws the same groups', !!tg && tg.join('|') === 'Design|Legal and filing|Filing|Not in a group', JSON.stringify(tg));
|
|
246
|
+
await shot(q, 'timeline-mine-1440.png');
|
|
247
|
+
await q.click(V + ' [data-iv-view="kanban"]');
|
|
248
|
+
ok('G3 Kanban\'s picker is the group picker: All first', await until(() => q.evaluate((v) => { const b = document.querySelector(v + ' [data-iv-kstage]'); return !!b && b.textContent.trim() === 'All' && /^Group: All/.test(b.getAttribute('aria-label')); }, V)));
|
|
249
|
+
await q.click(V + ' [data-iv-kstage]');
|
|
250
|
+
const kg = await until(() => q.evaluate(() => { const m = document.querySelector('.ivq-m'); return m ? [...m.querySelectorAll('[role="menuitemradio"]')].map((b) => b.querySelector('span:nth-child(2)').textContent) : null; }));
|
|
251
|
+
ok('G3 the picker lists All and each group', !!kg && kg.join('|') === 'All|Design|Legal and filing|Filing|Not in a group', JSON.stringify(kg));
|
|
252
|
+
await q.keyboard.press('Escape');
|
|
253
|
+
await q.click(V + ' [data-iv-view="list"]');
|
|
254
|
+
ok('0 Your groups: no page error', !B.errors.length, B.errors.join(' | '));
|
|
170
255
|
await B.ctx.close();
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* G4 · the phone: the header fits, the group menu is a sheet, the sent state */
|
|
259
|
+
{
|
|
260
|
+
const C = await open({ w: 390, h: 844, view: SENT }), c = C.page;
|
|
261
|
+
ok('G4 phone: the Tasks open grouped by epic', await epics(c));
|
|
262
|
+
const fit = await c.evaluate((v) => { const h = document.querySelector(v + ' .iv-th'), r = h.getBoundingClientRect(); const kids = [...h.children].filter((e) => e.offsetParent); return { over: h.scrollWidth > h.clientWidth + 1, rows: new Set(kids.filter((e) => e.matches('button, .ivx-seg')).map((e) => Math.round(e.getBoundingClientRect().top))).size, right: Math.max(...kids.map((e) => e.getBoundingClientRect().right)) <= r.right + 1, views: [...h.querySelectorAll('.ivx-sb')].filter((b) => b.offsetParent).length }; }, V);
|
|
263
|
+
ok('G4 phone: the header holds the group icon, the view in use and + on one line, nothing cut', !fit.over && fit.rows === 1 && fit.right && fit.views === 1, JSON.stringify(fit));
|
|
264
|
+
await c.click(V + ' .ivx-sb[aria-pressed="true"]');
|
|
265
|
+
const vm = await until(() => c.evaluate(() => { const m = document.querySelector('.ivq-m'); return m ? [...m.querySelectorAll('[role="menuitemradio"]')].map((b) => b.textContent.trim()) : null; }));
|
|
266
|
+
ok('G4 phone: the view icon opens List, Timeline and Kanban', !!vm && vm.join('|') === 'List|Timeline|Kanban', JSON.stringify(vm));
|
|
267
|
+
await c.keyboard.press('Escape');
|
|
268
|
+
const row = await c.evaluate((v) => { const r = document.querySelector(v + ' .ig-tk[data-ig-tk="S1"]'); return r ? { t: r.textContent.replace(/\s+/g, ' ').trim(), sq: (r.querySelector('.ig-sq') || {}).className, av: (r.querySelector('.ivt-av') || {}).textContent, lab: r.querySelector('.ig-sq') && r.querySelector('.ig-sq').getAttribute('aria-label') } : null; }, V);
|
|
269
|
+
ok('T1 after the send: the key, a status square and the assignee', !!row && /IDPF-411 Sign-in parity/.test(row.t) && /doing/.test(row.sq) && row.av === 'Ru' && row.lab === 'In Jira: In Progress', JSON.stringify(row));
|
|
270
|
+
ok('T1 "Jira read at 9:02" is said once', (await c.$$eval(V + ' .ig-read', (n) => n.map((x) => x.textContent))).join() === 'Jira read at 9:02');
|
|
271
|
+
ok('T1 an epic keeps its send icon while a ticket in it is not in Jira', await c.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs > :is(.iv-wsw, .iv-ws)')].slice(0, 2).map((g) => !!g.querySelector('[data-ig-send]')).join() === 'true,true', V));
|
|
272
|
+
await shot(c, 'sent-390.png');
|
|
273
|
+
await c.click(V + ' [data-ig-by]');
|
|
274
|
+
ok('G4 phone: the group menu rises from the bottom as a sheet', await until(() => c.evaluate(() => { const s = document.querySelector('.ig-pop.sheet'); if (!s) return false; const r = s.getBoundingClientRect(); return Math.abs(r.bottom - innerHeight) < 2 && r.left === 0; })));
|
|
275
|
+
await shot(c, 'group-sheet-390.png');
|
|
276
|
+
await c.keyboard.press('Escape');
|
|
277
|
+
await c.click(V + ' [data-ig-send]');
|
|
175
278
|
await until(() => c.evaluate(() => !!document.querySelector('.tk-sheet.phone [data-tk-go]')));
|
|
176
|
-
ok('T3 phone: the sheet rises from the bottom', await c.evaluate(() => { const r = document.querySelector('.tk-sheet').getBoundingClientRect(); return Math.abs(r.bottom - innerHeight) < 2 && r.left === 0; }));
|
|
177
|
-
await shot(c, 'send-390.png');
|
|
279
|
+
ok('T3 phone: the Send sheet rises from the bottom', await c.evaluate(() => { const r = document.querySelector('.tk-sheet').getBoundingClientRect(); return Math.abs(r.bottom - innerHeight) < 2 && r.left === 0; }));
|
|
178
280
|
await c.keyboard.press('Escape');
|
|
179
|
-
|
|
180
|
-
await until(() => c.evaluate((v) => !!document.querySelector(v + ' .tk-draft'), V));
|
|
181
|
-
await shot(c, 'draft-390.png');
|
|
182
|
-
ok('0 phone: no page error', !C.errors.length && !B.errors.length, C.errors.concat(B.errors).join(' | '));
|
|
281
|
+
ok('0 phone: no page error', !C.errors.length, C.errors.join(' | '));
|
|
183
282
|
await C.ctx.close();
|
|
184
283
|
const D = await open({ theme: 'dark' }), d = D.page;
|
|
185
|
-
await
|
|
186
|
-
await shot(d, 'tasks-1440-dark.png');
|
|
284
|
+
await epics(d);
|
|
285
|
+
await shot(d, 'tasks-epic-1440-dark.png');
|
|
187
286
|
await D.ctx.close();
|
|
188
287
|
}
|
|
189
288
|
|
|
190
|
-
/*
|
|
289
|
+
/* G5 · the Board's panel: the same section */
|
|
191
290
|
{
|
|
192
|
-
const E = await open({
|
|
193
|
-
|
|
194
|
-
|
|
291
|
+
const E = await open({ page: 'board' }), e = E.page;
|
|
292
|
+
ok('G5 the Board\'s panel has the group icon and groups by epic by itself', E.up && !!(await e.$(V + ' .iv-th [data-ig-by]')) && await epics(e));
|
|
293
|
+
await e.click(V + ' [data-ig-by]');
|
|
294
|
+
await e.click('.ig-pop [role="menuitemradio"]:has-text("Owner")');
|
|
295
|
+
ok('G5 By owner on the Board: one group per owner', await until(() => e.evaluate((v) => [...document.querySelectorAll(v + ' .iv-wbs .iv-ws b')].map((b) => b.textContent).join('|') === 'Claude|Wawan', V)), JSON.stringify(await heads(e)));
|
|
296
|
+
await shot(e, 'board-owner-1440.png');
|
|
297
|
+
ok('0 Board: no page error', !E.errors.length, E.errors.join(' | '));
|
|
195
298
|
await E.ctx.close();
|
|
196
299
|
}
|
|
300
|
+
|
|
301
|
+
/* G6 · New → A task opens the initiative with the cursor in the Tasks field (XtaA4NewTask) */
|
|
302
|
+
{
|
|
303
|
+
const N = await open({ layout: { by: 'stage', picked: true } }), n = N.page;
|
|
304
|
+
await n.click('[data-hm-new]');
|
|
305
|
+
await n.click('#hmMenu [data-hm-mi]:has-text("A task")').catch(() => n.click('[data-hm-mi]:has-text("A task")'));
|
|
306
|
+
await n.click('[data-hm-mi]:has-text("Self-serve onboarding v2")');
|
|
307
|
+
ok('G6 New → A task: the page with the Tasks field open, the cursor in it', await until(() => n.evaluate(() => { const f = document.querySelector('#czViewer [data-hi-v="page"] #ivAddTask'); return !!f && document.activeElement === f; }), 15000));
|
|
308
|
+
ok('G6 no old Tasks view: no #ovTask anywhere', !(await n.$('#ovTask')));
|
|
309
|
+
await shot(n, 'new-task-1440.png');
|
|
310
|
+
ok('0 New → A task: no page error', !N.errors.length, N.errors.join(' | '));
|
|
311
|
+
await N.ctx.close();
|
|
312
|
+
}
|
|
197
313
|
finish();
|
|
198
314
|
})();
|