create-pmos 0.536.0 → 0.538.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 +81 -33
- 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/board-columns-test.js +11 -10
- package/workspace/board-programs-test.js +27 -24
- package/workspace/board-publish-ui-test.js +19 -15
- package/workspace/board-shared-ui-test.js +16 -13
- package/workspace/board-workflows-test.js +26 -32
- package/workspace/briefing-premium-board-test.js +70 -50
- package/workspace/briefing-premium-insights-test.js +24 -31
- package/workspace/briefing-premium-metrics-test.js +2 -2
- package/workspace/calm-timeline-test.js +1 -1
- package/workspace/changelog.json +80 -0
- package/workspace/ev-everywhere-test.js +4 -5
- package/workspace/fixtures/board-premium-facts.js +1 -1
- package/workspace/fixtures/board-workflows-facts.js +7 -1
- package/workspace/fixtures/initiative-premium-facts.js +1 -1
- package/workspace/fixtures/insights-premium-facts.js +6 -6
- package/workspace/fixtures/program-ascent.js +1 -1
- package/workspace/guide/adler.md +2 -2
- package/workspace/guide/agent-capabilities.md +38 -6
- package/workspace/guide/board.md +20 -2
- package/workspace/guide/claude-proposes.md +1 -1
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/index.md +3 -3
- package/workspace/guide/intelligence-okr-goals.md +18 -7
- package/workspace/guide/lifecycle.md +2 -2
- package/workspace/guide/programs.md +2 -2
- package/workspace/guide/reports-needs-you.md +5 -5
- package/workspace/guide/settings.md +14 -11
- package/workspace/guide/workflows.md +3 -3
- package/workspace/guide/your-impact.md +1 -1
- package/workspace/lib/agent-team.js +262 -0
- package/workspace/lib/ai-cli.js +36 -4
- package/workspace/lib/bg-queue.js +9 -4
- package/workspace/lib/board-premium.js +6 -3
- package/workspace/lib/goal-source.js +77 -0
- package/workspace/lib/grill-runs.js +6 -3
- package/workspace/lib/headless.js +36 -4
- package/workspace/lib/idle-lab-engine.js +7 -6
- package/workspace/lib/initiative-premium.js +6 -3
- package/workspace/lib/insights-premium.js +1 -1
- package/workspace/lib/job-graph.js +191 -0
- package/workspace/lib/okr-goals.js +3 -0
- package/workspace/lib/orchestrator-keeprate.js +108 -7
- package/workspace/lib/pmos-verbs.js +3 -0
- package/workspace/lib/proposal-runs.js +8 -5
- package/workspace/lib/proposals.js +32 -2
- package/workspace/lib/report-slots.js +14 -10
- package/workspace/lib/routes-boards.js +2 -2
- package/workspace/lib/routes-insights-premium.js +11 -4
- package/workspace/lib/routes-premium-dashboards.js +20 -6
- package/workspace/lib/routes-proposals.js +10 -5
- package/workspace/lib/routes-your-move.js +6 -7
- package/workspace/lib/status-proof.js +45 -0
- package/workspace/lib/status-signal.js +4 -2
- package/workspace/lib/task-links.js +3 -1
- package/workspace/lib/team-cli.js +164 -0
- package/workspace/lib/team-runs.js +244 -0
- package/workspace/lib/verify-runs.js +112 -0
- package/workspace/okr-goals-ui-test.js +10 -13
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-vw-backlog-test.js +2 -2
- package/workspace/premium-vw-jira-test.js +2 -2
- package/workspace/public/pm/bd-acts.js +30 -45
- package/workspace/public/pm/bd-ini-panel.js +38 -27
- package/workspace/public/pm/bd-publish.js +1 -1
- package/workspace/public/pm/bd-span.js +2 -1
- package/workspace/public/pm/bd-views.js +7 -5
- package/workspace/public/pm/bd-wf.js +5 -28
- package/workspace/public/pm/c3-ini-ui.js +9 -7
- package/workspace/public/pm/cozy-board.css +75 -31
- package/workspace/public/pm/cozy-insights.css +18 -0
- package/workspace/public/pm/cozy-nav.js +2 -2
- package/workspace/public/pm/cozy-search.js +29 -7
- package/workspace/public/pm/cozy-settings.js +39 -20
- package/workspace/public/pm/home-data.js +3 -1
- package/workspace/public/pm/home-ini-model.js +15 -1
- package/workspace/public/pm/home-ini.js +9 -3
- package/workspace/public/pm/ini-tail.js +61 -0
- package/workspace/public/pm/ini-view-model.js +10 -7
- package/workspace/public/pm/premium-board.js +119 -119
- package/workspace/public/pm/premium-insights.js +95 -112
- package/workspace/public/pm/premium-report-intel.js +3 -2
- package/workspace/public/pm/readonly.js +4 -3
- package/workspace/public/pm/stage-chip.js +2 -1
- package/workspace/public/pm/status-proof.js +43 -0
- package/workspace/public/premium-board.html +14 -35
- package/workspace/public/premium-intelligence.html +7 -9
- package/workspace/server.js +35 -1
- package/workspace/sort-order-test.js +10 -8
- package/workspace/test-files.json +4 -2
- package/workspace/test-lists/agent-team.json +9 -0
- package/workspace/test-lists/job-graph.json +11 -0
- package/workspace/test-lists/status-proof.json +5 -0
- package/workspace/workflows-setup-test.js +3 -2
- package/workspace/public/premium-chat.html +0 -14
- package/workspace/public/premium-initiative.html +0 -15
- package/workspace/public/premium-work.html +0 -14
|
@@ -52,32 +52,35 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
|
|
|
52
52
|
const errs = []; const p = await ctx.newPage(); p.on('pageerror', (e) => errs.push(e.message));
|
|
53
53
|
const reqs = []; ctx.on('request', (r) => reqs.push(new URL(r.url()).pathname));
|
|
54
54
|
await p.addInitScript(() => { try { localStorage.setItem('pmos.board.view', 'list'); localStorage.setItem('pmos.board.grouping', 'program'); } catch (e) { /* none */ } });
|
|
55
|
-
await p.goto(T.BASE + url); await p.waitForSelector('#
|
|
55
|
+
await p.goto(T.BASE + url); await p.waitForSelector('#bdView', { timeout: 15000 }).catch(() => {}); await p.waitForTimeout(700);
|
|
56
56
|
return { ctx, p, errs, reqs };
|
|
57
57
|
};
|
|
58
58
|
const reset = (o = {}) => { Object.assign(W, { yours: [], teams: [], names: [], posts: [], reads: 0, joinAnswer: null }, o); };
|
|
59
59
|
|
|
60
|
+
// Shared with me is the View chip's last item since UI grill U2; its number sits beside its words
|
|
61
|
+
const shared = async (p) => { await p.click('#bdView'); await p.click('#bdViewMenu [data-vshared]'); };
|
|
62
|
+
const shN = (p) => p.evaluate(() => { document.querySelector('#bdView').click(); const k = document.querySelector('#bdViewMenu [data-vshared] .k'); const t = k ? k.textContent : ''; document.querySelector('#bdView').click(); return t; });
|
|
60
63
|
console.log('A the tab and its number');
|
|
61
64
|
reset();
|
|
62
65
|
let s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
|
|
63
|
-
ok('A1 Shared is
|
|
64
|
-
ok('A2 opening the tab with nothing joined asks nothing of any host beyond the read, and shows one sentence and the invite field', await (async () => { await s.p
|
|
65
|
-
ok('A3 the
|
|
66
|
+
ok('A1 Shared with me is the View chip\'s last item (UI grill U2), and has no number when there is nothing', (await s.p.evaluate(() => !!document.querySelector('#bdViewMenu [data-vshared]'))) && (await shN(s.p)) === '');
|
|
67
|
+
ok('A2 opening the tab with nothing joined asks nothing of any host beyond the read, and shows one sentence and the invite field', await (async () => { await shared(s.p); await s.p.waitForSelector('#shInvite'); return /Boards your teams share show up here/.test(await s.p.locator('#cShared').textContent()) && (await s.p.locator('#cShared .bdsh-card').count()) === 0; })());
|
|
68
|
+
ok('A3 the initiatives are hidden while it is open, and pressing Shared with me again brings them back', await s.p.locator('#cIni').isHidden() && (await (async () => { await shared(s.p); return (await s.p.locator('#cShared').isHidden()) && (await s.p.locator('#cIni').isVisible()); })()));
|
|
66
69
|
await s.ctx.close();
|
|
67
70
|
reset({ yours: MINE, names: ['Product'] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
|
|
68
|
-
ok('A4 at load the number is your own open links, from this computer only (no host was asked)', (await s.p
|
|
71
|
+
ok('A4 at load the number is your own open links, from this computer only (no host was asked)', (await shN(s.p)) === '2' && W.reads === 0, await shN(s.p));
|
|
69
72
|
await s.ctx.close();
|
|
70
73
|
{
|
|
71
74
|
const pack = Pack.buildPack({ ws: 'idpf', board: 'idpf', selection: [{ kind: 'product', id: 'idpf' }], meta: { by: 'W', at: 'x', ends: 'y', viewer: 'test' }, answers: { [BOARD]: { ok: true, state: 'ready', model, as_of: 1 }, '/api/programs': { ok: true, programs: F.programs() } } });
|
|
72
75
|
const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } }); const reqs = []; ctx.on('request', (r) => reqs.push(new URL(r.url()).pathname));
|
|
73
76
|
await ctx.route((u) => new URL(u).pathname === '/__pack/p.json', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify(pack) }));
|
|
74
77
|
const p = await ctx.newPage(); await p.goto(T.BASE + '/premium-board.html?ws=idpf&board=idpf&pack=/__pack/p.json'); await p.waitForSelector('.tg-n.ini2', { timeout: 15000 }).catch(() => {}); await p.waitForTimeout(600);
|
|
75
|
-
ok('A5 the read-only Board does not draw
|
|
78
|
+
ok('A5 the read-only Board does not draw Shared with me and asks nothing of /api/board-publish', (await p.evaluate(() => !document.querySelector('#bdViewMenu [data-vshared]'))) && !reqs.some((u) => /board-publish/.test(u)));
|
|
76
79
|
await ctx.close();
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
console.log('B join');
|
|
80
|
-
reset(); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p
|
|
83
|
+
reset(); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await shared(s.p); await s.p.waitForSelector('#shInvite');
|
|
81
84
|
W.joinAnswer = { status: 400, body: { ok: false, error: 'This is not an invite link. It looks like https://boards.example.com/join#Team.password.' } };
|
|
82
85
|
await s.p.fill('#shInvite', 'hello'); await s.p.click('[data-sh="join"]'); await s.p.waitForSelector('[role="alert"]');
|
|
83
86
|
ok('B1 a refused invite shows the sentence under the field and keeps what was pasted', /not an invite link/.test(await s.p.locator('#cShared [role="alert"]').textContent()) && (await s.p.inputValue('#shInvite')) === 'hello' && W.posts[0].body.invite === 'hello');
|
|
@@ -87,11 +90,11 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
|
|
|
87
90
|
const last = W.posts[W.posts.length - 1].body;
|
|
88
91
|
ok('B2 the typed way sends the host, team and password, and a lockout is shown with its minutes', last.host === 'https://boards.pm-os.app' && last.team === 'Product' && last.password === 'harbor-lime-47');
|
|
89
92
|
W.joinAnswer = null; await s.p.click('[data-sh="paste"]'); await s.p.fill('#shInvite', 'https://boards.test/join#Product.harbor-lime-47'); await s.p.click('[data-sh="join"]'); await s.p.waitForSelector('.bdsh-list');
|
|
90
|
-
ok('B3 a join that works reads the team and shows its list; the tab gets its number', (await s.p
|
|
93
|
+
ok('B3 a join that works reads the team and shows its list; the tab gets its number', (await shN(s.p)) === '3' && /Joined Product/.test(await s.p.locator('#bdToast').textContent()), await shN(s.p));
|
|
91
94
|
await s.ctx.close();
|
|
92
95
|
|
|
93
96
|
console.log('C the list');
|
|
94
|
-
reset({ yours: MINE, names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p
|
|
97
|
+
reset({ yours: MINE, names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await shared(s.p); await s.p.waitForSelector('.bdsh-list');
|
|
95
98
|
const chips = await s.p.locator('#cShared .bdsh-top .bd-chip').allTextContents();
|
|
96
99
|
ok('C1 the chips are All, Yours and one per team; counts leave out an ended copy, and your own link published to a team is one copy, not two', JSON.stringify(chips.map((x) => x.trim())) === JSON.stringify(['All 4', 'Yours 2', 'Product 4']), JSON.stringify(chips));
|
|
97
100
|
const names = await s.p.locator('#cShared .bdsh-list .bdsh-nm').allTextContents();
|
|
@@ -122,7 +125,7 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
|
|
|
122
125
|
|
|
123
126
|
console.log('D a team that cannot be read');
|
|
124
127
|
const BAD = { team: 'Growth', host: 'boards.test', ok: false, kind: 'password', error: 'The team password no longer works. Ask for a new invite link.' };
|
|
125
|
-
reset({ yours: [], names: ['Product', 'Growth'], teams: [JSON.parse(JSON.stringify(TEAM_OK)), BAD] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p
|
|
128
|
+
reset({ yours: [], names: ['Product', 'Growth'], teams: [JSON.parse(JSON.stringify(TEAM_OK)), BAD] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await shared(s.p); await s.p.waitForSelector('.bdsh-ban');
|
|
126
129
|
ok('D1 the failing team shows one line that says why, with the key to paste a new invite; no old rows, and the other team still draws', /Growth cannot be read\. The team password no longer works/.test(await s.p.locator('.bdsh-ban').textContent()) && (await s.p.locator('#cShared .bdsh-list .bdsh-nm').count()) === 3 && (await s.p.locator('.bdsh-ban [data-sh="repaste"]').getAttribute('aria-label')) === 'Paste a new invite link');
|
|
127
130
|
ok('D2 its chip has no count', (await s.p.locator('[data-sh-sel="Growth"]').textContent()).trim() === 'Growth');
|
|
128
131
|
await s.p.click('.bdsh-ban .bdsh-ib'); await s.p.waitForSelector('#shInvite');
|
|
@@ -133,7 +136,7 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
|
|
|
133
136
|
await s.ctx.close();
|
|
134
137
|
|
|
135
138
|
console.log('E leave');
|
|
136
|
-
reset({ yours: [], names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await s.p
|
|
139
|
+
reset({ yours: [], names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf'); await shared(s.p); await s.p.waitForSelector('.bdsh-list'); await s.p.click('[data-sh-sel="Product"]');
|
|
137
140
|
ok('E1 a team\'s chip adds Paste a new invite link and Leave team', (await s.p.locator('.bdsh-tl .bdsh-ib').evaluateAll((els) => els.map((e) => e.getAttribute('aria-label')))).join('|') === 'Paste a new invite link|Leave team');
|
|
138
141
|
await s.p.click('[data-sh-leave="Product"]');
|
|
139
142
|
ok('E2 the first press asks once, says what leaving does, and sends nothing', (await s.p.locator('[data-sh-leave]').getAttribute('aria-label')) === 'Sure, leave Product' && /only forgets the team's password on this computer/.test(await s.p.locator('#cShared').textContent()) && !W.posts.some((x) => x.p.endsWith('/leave')));
|
|
@@ -144,7 +147,7 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
|
|
|
144
147
|
console.log('F reads');
|
|
145
148
|
reset({ yours: [], names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(1440, 900, '/premium-board.html?ws=idpf&board=idpf');
|
|
146
149
|
ok('F1 nothing is read from a host at load', W.reads === 0);
|
|
147
|
-
await s.p
|
|
150
|
+
await shared(s.p); await s.p.waitForSelector('.bdsh-list'); const first = W.reads; await s.p.waitForTimeout(1500);
|
|
148
151
|
ok('F2 opening the tab reads once and nothing polls', first === 1 && W.reads === 1, W.reads);
|
|
149
152
|
await s.p.locator('#cShared .bdsh-read [data-sh="refresh"]').click(); await s.p.waitForTimeout(500);
|
|
150
153
|
ok('F3 Refresh reads again', W.reads === 2, W.reads);
|
|
@@ -152,7 +155,7 @@ const iso = (ms) => new Date(Date.now() + ms).toISOString();
|
|
|
152
155
|
|
|
153
156
|
console.log('G a phone');
|
|
154
157
|
reset({ yours: MINE, names: ['Product'], teams: [JSON.parse(JSON.stringify(TEAM_OK))] }); s = await open(390, 844, '/premium-board.html?ws=idpf&board=idpf');
|
|
155
|
-
ok('G1 on a phone Shared is
|
|
158
|
+
ok('G1 on a phone Shared with me is the last item of the view button (batch 28 item 3, BhA; no Docs chip), and it opens Shared', await (async () => { await s.p.waitForSelector('#bdView'); await s.p.click('#bdView'); const last = await s.p.evaluate(() => { const m = document.querySelector('#bdViewMenu'); const b = [...m.querySelectorAll('button')].pop(); return !document.getElementById('chDocs') && !document.getElementById('chShared') && b && b.hasAttribute('data-vshared') && /Shared with me/.test(b.textContent); }); await s.p.click('#bdViewMenu [data-vshared]'); await s.p.waitForSelector('.bdsh-list .bdsh-card'); return last; })());
|
|
156
159
|
const g = await s.p.evaluate(() => ({ side: document.documentElement.scrollWidth > innerWidth + 1, cards: document.querySelectorAll('#cShared .bdsh-card').length }));
|
|
157
160
|
ok('G2 a row is a card that fits the phone, with no sideways scroll', g.cards === 4 && !g.side, JSON.stringify(g));
|
|
158
161
|
const small = await s.p.locator('#cShared button:visible').evaluateAll((els) => els.filter((e) => e.getBoundingClientRect().height < 34).map((e) => e.className + ':' + Math.round(e.getBoundingClientRect().height)));
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
/* board-workflows-test.js — the Board with workflows (workflows-per-initiative, workstream B; canvas WfABoard, WfABoardOne, WfATrack, WfAElse,
|
|
4
4
|
* WfAPhone). Serves the real page from the real server and answers GET /api/board-premium with the model lib/board-premium.js builds from
|
|
5
5
|
* fixtures/board-workflows-facts.js (four workflows, one row in Won't do) and GET /api/workflows with its definitions.
|
|
6
|
-
* W1
|
|
7
|
-
* one workflow ·
|
|
6
|
+
* W1 no workflow chips (batch 28 item 3, canvas BhA: the Board picks no workflow, on a phone or a desktop) · W2 By stage, All · W3 By stage,
|
|
7
|
+
* a board on one workflow · W4 a drag names the workflow's stage · W5 the track, All · W6 the track, one workflow · W7 the List and Filter ·
|
|
8
|
+
* W8 the phone · W9 a board with only Product feature · W10 dark, and no page error.
|
|
8
9
|
* The screenshots of the same views come from board-wf-shot.js (not a suite). */
|
|
9
10
|
const path = require('path');
|
|
10
11
|
const { spawn } = require('child_process');
|
|
@@ -56,12 +57,11 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
56
57
|
};
|
|
57
58
|
const q = (p, fn, arg) => p.evaluate(fn, arg);
|
|
58
59
|
|
|
59
|
-
/* W1 + W2 By stage, All */
|
|
60
|
+
/* W1 + W2 By stage, All. A pick an older Board stored (pmos.board.wf) is ignored */
|
|
60
61
|
{
|
|
61
|
-
const { ctx, page: p } = await open();
|
|
62
|
-
const chips = await q(p, () =>
|
|
63
|
-
ok('W1
|
|
64
|
-
&& chips[1][1] === '7' && chips[3][2] === 'Tender only, 2' && chips[0][1] === 'All', JSON.stringify(chips));
|
|
62
|
+
const { ctx, page: p } = await open({ pick: 'tender' });
|
|
63
|
+
const chips = await q(p, () => document.querySelectorAll('.bd-wfchips, [data-wfpick], .bd-wfedit').length);
|
|
64
|
+
ok('W1 no workflow chips on By stage, and an old stored pick narrows nothing (batch 28 item 3)', chips === 0, String(chips));
|
|
65
65
|
const cols = await q(p, () => [...document.querySelectorAll('#ibBody .bd-kb > .bd-kh, #ibBody .bd-kb > .bd-kstrip')].map((h) => h.getAttribute('aria-label')));
|
|
66
66
|
ok('W2 All draws To do, In progress and Done, then Won\'t do as a folded strip', JSON.stringify(cols) === JSON.stringify(['To do, 1. Fold the column', 'In progress, 10. Fold the column', 'Done, 21. Fold the column', 'Show Won\'t do, 1']), JSON.stringify(cols));
|
|
67
67
|
const wide = await q(p, () => { const c = document.querySelector('#ibBody .bd-kc.wide'); return c ? { label: c.getAttribute('aria-label'), titles: [...c.querySelectorAll('.bd-bc .t')].map((t) => t.textContent), cols: getComputedStyle(c).gridTemplateColumns.split(' ').length } : null; });
|
|
@@ -73,18 +73,15 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
73
73
|
ok('W2 the Won\'t do strip opens to its cards', JSON.stringify(ended) === '["Catering contract"]', JSON.stringify(ended));
|
|
74
74
|
await ctx.close();
|
|
75
75
|
}
|
|
76
|
-
/* W3 + W4 one workflow
|
|
76
|
+
/* W3 + W4 a board on one workflow: its own stages are the columns */
|
|
77
77
|
{
|
|
78
|
-
const { ctx, page: p, posts } = await open();
|
|
79
|
-
await p.
|
|
80
|
-
const s = await q(p, () => ({ on: (document.querySelector('#ibBody .bd-wfchips .bd-chip.on') || {}).textContent, edit: (document.querySelector('#ibBody .bd-wfedit') || {}).getAttribute && document.querySelector('#ibBody .bd-wfedit').getAttribute('href'),
|
|
78
|
+
const { ctx, page: p, posts } = await open({ facts: W.tenderOnly() });
|
|
79
|
+
const s = await q(p, () => ({ chips: document.querySelectorAll('[data-wfpick]').length,
|
|
81
80
|
heads: [...document.querySelectorAll('#ibBody .bd-kb > .bd-kh .l, #ibBody .bd-kb > .bd-kstrip span')].map((x) => x.textContent), strips: [...document.querySelectorAll('#ibBody .bd-kb > .bd-kstrip span')].map((x) => x.textContent),
|
|
82
|
-
cats: [...document.querySelectorAll('#ibBody .bd-kcat')].map((x) => x.textContent)
|
|
83
|
-
ok('W3
|
|
84
|
-
ok('W3 its own stages are the columns, then Won\'t do', JSON.stringify(s.heads.map((x) => x.trim())) === JSON.stringify(['Triage', 'Requirements', 'RFP out', 'Bids', 'Evaluate bids', 'Award', 'Contract', 'Review', 'Won\'t do']), JSON.stringify(s.heads));
|
|
81
|
+
cats: [...document.querySelectorAll('#ibBody .bd-kcat')].map((x) => x.textContent) }));
|
|
82
|
+
ok('W3 its own stages are the columns, then Won\'t do, with nothing to pick', s.chips === 0 && JSON.stringify(s.heads.map((x) => x.trim())) === JSON.stringify(['Triage', 'Requirements', 'RFP out', 'Bids', 'Evaluate bids', 'Award', 'Contract', 'Review', 'Won\'t do']), JSON.stringify(s));
|
|
85
83
|
ok('W3 the empty stages start as strips', ['Triage', 'RFP out', 'Evaluate bids', 'Contract', 'Review'].every((x) => s.strips.includes(x)) && !s.strips.includes('Bids'), JSON.stringify(s.strips));
|
|
86
84
|
ok('W3 the category bar sits under the stages', JSON.stringify(s.cats) === JSON.stringify(['To do', 'In progress', 'Done']), JSON.stringify(s.cats));
|
|
87
|
-
ok('W3 the pick is remembered', s.stored === 'tender', s.stored);
|
|
88
85
|
// W4 a card dragged to another stage of its workflow moves there by the stage's name
|
|
89
86
|
await q(p, () => {
|
|
90
87
|
const c = document.querySelector('#ibBody .bd-bc[data-key="board:office-network"]'), to = document.querySelector('#ibBody .bd-kc[data-wfstage="bids"]');
|
|
@@ -96,12 +93,6 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
96
93
|
await until(() => posts.some((x) => x.path === '/api/boards/move'), 3000);
|
|
97
94
|
const mv = posts.find((x) => x.path === '/api/boards/move');
|
|
98
95
|
ok('W4 a drag to another stage of the workflow moves the initiative there by that stage\'s name', mv && mv.body.id === 'office-network' && mv.body.to === 'Bids', JSON.stringify(posts));
|
|
99
|
-
await p.reload(); await until(() => p.evaluate(() => document.querySelectorAll('#ibBody .ini2').length > 0), 20000);
|
|
100
|
-
const kept = await q(p, () => (document.querySelector('#ibBody .bd-wfchips .bd-chip.on') || {}).textContent || '');
|
|
101
|
-
ok('W3 after a reload the Board still shows the picked workflow', kept.trim() === 'Tender · 2', kept);
|
|
102
|
-
await p.click('#ibBody [data-wfpick=""]'); await sleep(150);
|
|
103
|
-
const all = await q(p, () => ({ on: (document.querySelector('#ibBody .bd-wfchips .bd-chip.on') || {}).textContent, stored: localStorage.getItem('pmos.board.wf') }));
|
|
104
|
-
ok('W1 All goes back to the categories', all.on === 'All' && all.stored === 'all', JSON.stringify(all));
|
|
105
96
|
await ctx.close();
|
|
106
97
|
}
|
|
107
98
|
/* W5 + W6 the track */
|
|
@@ -118,13 +109,20 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
118
109
|
ok('W5 each row draws its own stages in their band: done, the current one with its name, a milestone as ◆', JSON.stringify(t.bandsPF) === JSON.stringify(['dn', 'dn,dn,nw,-,m,-', '-']) && /^Bids · /.test(t.em || '') && t.icon === 'Tender', JSON.stringify(t));
|
|
119
110
|
ok('W5 a stage PMOS judged not to run is drawn as skipped, with the reason', /^Approve skipped: No bids needed/.test(t.skip || ''), JSON.stringify(t.skip));
|
|
120
111
|
ok('W5 a Product feature row keeps its eight steps across the bands', JSON.stringify(t.sso) === JSON.stringify(['dn', 'dn,dn,dn,dn,m nw,-', 'm']), JSON.stringify(t.sso));
|
|
121
|
-
await p.
|
|
112
|
+
ok('W1 no workflow chips on the track', await q(p, () => document.querySelectorAll('[data-wfpick]').length === 0));
|
|
113
|
+
await ctx.close();
|
|
114
|
+
}
|
|
115
|
+
{
|
|
116
|
+
const { ctx, page: p } = await open({ view: 'track', facts: W.tenderOnly() });
|
|
122
117
|
const o = await q(p, () => ({ head: [...document.querySelectorAll('.bt-h .bt-cells [role="columnheader"] .bt-hl')].map((x) => x.textContent), n: document.querySelector('.bt-h .bt-cells').style.getPropertyValue('--n'), rows: [...document.querySelectorAll('.bt-l')].map((r) => r.dataset.row), cur: (document.querySelector('.bt-l[data-row="board:print-fleet"] .sc.c') || {}).title }));
|
|
123
|
-
ok('W6 one workflow
|
|
124
|
-
ok('W6
|
|
125
|
-
await
|
|
118
|
+
ok('W6 a board on one workflow: the header is its stage names, as the eight steps are today', JSON.stringify(o.head) === JSON.stringify(['Triage', 'Requirements', 'RFP out', 'Bids', 'Evaluate bids', 'Award', 'Contract', 'Review']) && o.n === '8', JSON.stringify(o));
|
|
119
|
+
ok('W6 its initiatives show, each at its own stage', JSON.stringify(o.rows) === '["board:office-network","board:print-fleet"]' && /^Bids · /.test(o.cur || ''), JSON.stringify(o));
|
|
120
|
+
await ctx.close();
|
|
121
|
+
}
|
|
122
|
+
{
|
|
123
|
+
const { ctx, page: p } = await open({ view: 'track', facts: W.pfOnly() });
|
|
126
124
|
const f = await q(p, () => ({ head: [...document.querySelectorAll('.bt-h .bt-cells [role="columnheader"] .bt-hl')].map((x) => x.textContent).join('|'), help: !!document.querySelector('.bt-h [data-steps]') }));
|
|
127
|
-
ok('W6 Product feature
|
|
125
|
+
ok('W6 a board on Product feature only: the track is the eight steps with their help, as before', f.head === 'Triage|Discover|Plan|Prioritize|Build|Deliver|Monitor|Evaluate' && f.help, JSON.stringify(f));
|
|
128
126
|
await ctx.close();
|
|
129
127
|
}
|
|
130
128
|
/* W7 the List and Filter */
|
|
@@ -140,11 +138,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
140
138
|
ok('W7 sorting by Workflow puts Product feature first, then the others by name', byWf[0] === 'Product feature' && byWf.indexOf('Migration') > byWf.lastIndexOf('Product feature') && byWf.indexOf('Tender') > byWf.indexOf('Procurement'), JSON.stringify(byWf));
|
|
141
139
|
await p.click('#bdFilter'); await sleep(200);
|
|
142
140
|
const fl = await q(p, () => { const pop = document.querySelector('#bdPop'); return { txt: pop ? pop.textContent : '', wf: [...document.querySelectorAll('#bdPop [data-fwf]')].map((b) => b.textContent) }; });
|
|
143
|
-
ok('W7 Filter
|
|
144
|
-
await p.click('#bdPop [data-fwf="tender"]'); await sleep(200);
|
|
145
|
-
const nar = await q(p, () => ({ rows: [...document.querySelectorAll('.bd-lt[data-row] .bd-ltn b')].map((b) => b.textContent), showing: (document.querySelector('#bdShowing') || {}).textContent || '' }));
|
|
146
|
-
ok('W7 picking Tender in Filter narrows the List and says so in the Showing bar', JSON.stringify(nar.rows.sort()) === '["Office network tender","Print fleet tender"]' && /Workflow: Tender/.test(nar.showing), JSON.stringify(nar));
|
|
147
|
-
await p.click('#bdPop [data-fwf="tender"]').catch(() => {}); await sleep(150);
|
|
141
|
+
ok('W7 Filter has Category and no Workflow group (batch 28 item 3: the Board picks no workflow)', !/Workflow/.test(fl.txt) && /Category/.test(fl.txt) && !/Kind/.test(fl.txt) && fl.wf.length === 0, JSON.stringify(fl));
|
|
148
142
|
await p.evaluate(() => { const b = document.querySelector('#bdPop [data-flt="cats"][data-v="todo"]'); if (b) b.click(); }); await sleep(200);
|
|
149
143
|
const cat = await q(p, () => ({ rows: [...document.querySelectorAll('.bd-lt[data-row] .bd-ltn b')].map((b) => b.textContent), showing: (document.querySelector('#bdShowing') || {}).textContent || '' }));
|
|
150
144
|
ok('W7 a Category in Filter narrows the List to it', JSON.stringify(cat.rows) === '["Laptop refresh"]' && /Category: To do/.test(cat.showing), JSON.stringify(cat));
|
|
@@ -156,7 +150,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
|
|
|
156
150
|
const ph = await q(p, () => ({ secs: [...document.querySelectorAll('#ibBody .bd-pcat')].map((b) => [b.textContent.trim(), b.getAttribute('aria-expanded')]), rows: [...document.querySelectorAll('#ibBody .bd-pcats .bd-lrow')].length,
|
|
157
151
|
more: (document.querySelector('#ibBody [data-pmore]') || {}).textContent, icons: [...document.querySelectorAll('#ibBody .bd-pcats .bd-lrow .wfi')].length, chips: document.querySelectorAll('#ibBody .bd-wfchips [data-wfpick]').length }));
|
|
158
152
|
ok('W8 the phone shows category sections, In progress open, Won\'t do at the foot', JSON.stringify(ph.secs) === JSON.stringify([['To do1', 'false'], ['In progress10', 'true'], ['Done21', 'false'], ['Won\'t do1', 'false']]), JSON.stringify(ph));
|
|
159
|
-
ok('W8 a section lists five rows, then "N more"; each row carries its workflow icon;
|
|
153
|
+
ok('W8 a section lists five rows, then "N more"; each row carries its workflow icon; no workflow chips on a phone (batch 28 item 3)', ph.rows === 5 && ph.more === '5 more' && ph.icons === 5 && ph.chips === 0 && !(await q(p, () => !!document.querySelector('.bd-wfchips'))), JSON.stringify(ph));
|
|
160
154
|
await p.click('#ibBody [data-pcat="todo"]'); await sleep(150);
|
|
161
155
|
await p.click('#ibBody [data-pmore="doing"]'); await sleep(150);
|
|
162
156
|
const ph2 = await q(p, () => ({ todo: document.querySelector('#ibBody [data-pcat="todo"]').getAttribute('aria-expanded'), rows: [...document.querySelectorAll('#ibBody .bd-pcats .bd-lrow')].length, stored: localStorage.getItem('pmos.board.pcats') }));
|