create-pmos 0.396.0 → 0.398.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/scripts/nine-stages.js +49 -20
- package/payload/state/discoveries.md +1 -1
- package/payload/state/log.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +103 -74
- package/workspace/briefing-premium-board-test.js +316 -154
- package/workspace/briefing-premium-calendar-2-test.js +135 -195
- package/workspace/briefing-premium-calendar-3-test.js +143 -413
- package/workspace/briefing-premium-calendar-test.js +86 -185
- package/workspace/briefing-premium-doc-edit-test.js +95 -83
- package/workspace/briefing-premium-initiative-test.js +166 -294
- package/workspace/briefing-premium-insights-test.js +351 -214
- package/workspace/briefing-premium-metrics-test.js +53 -118
- package/workspace/briefing-premium-products-test.js +40 -27
- package/workspace/briefing-premium-sources-test.js +91 -52
- package/workspace/briefing-premium-test.js +150 -633
- package/workspace/briefing-premium-work-test.js +88 -269
- package/workspace/changelog.json +24 -0
- package/workspace/fixtures/board-premium-facts.js +2 -1
- package/workspace/fixtures/board-premium-jira.js +28 -0
- package/workspace/fixtures/board-premium-trail.js +32 -0
- package/workspace/fixtures/initiative-premium-facts.js +2 -1
- package/workspace/fixtures/initiatives-api/list.json +30 -42
- package/workspace/fixtures/initiatives-api/roadmap.json +40 -56
- package/workspace/fixtures/initiatives-api/sheet.json +10 -14
- package/workspace/fixtures/insights-premium-facts.js +11 -2
- package/workspace/fixtures/premium-viewer-fixtures.js +182 -0
- package/workspace/guide/briefing-premium.md +3 -1
- package/workspace/guide/home.md +47 -0
- package/workspace/guide/index.md +2 -0
- package/workspace/guide/lifecycle.md +51 -0
- package/workspace/home-shot.js +38 -0
- package/workspace/lib/agent-roles.js +71 -0
- package/workspace/lib/board-premium.js +160 -3
- package/workspace/lib/board-trail.js +223 -0
- package/workspace/lib/engine/boards.js +15 -14
- package/workspace/lib/engine/nine-stages.js +49 -20
- package/workspace/lib/engine/signals/detectors.js +13 -11
- package/workspace/lib/home-work-item.js +58 -0
- package/workspace/lib/insights-goals.js +196 -0
- package/workspace/lib/insights-premium.js +126 -1
- package/workspace/lib/insights-records.js +101 -0
- package/workspace/lib/jira-tickets.js +1 -1
- package/workspace/lib/route-modules.js +4 -0
- package/workspace/lib/routes-board-premium.js +3 -2
- package/workspace/lib/routes-board-trail.js +33 -0
- package/workspace/lib/routes-home-desk.js +176 -0
- package/workspace/lib/routes-initiatives.js +1 -1
- package/workspace/lib/routes-insights-premium.js +19 -3
- package/workspace/lib/routes-insights-records.js +129 -0
- package/workspace/lib/routes-notes.js +1 -0
- package/workspace/lib/routes-viewer.js +108 -0
- package/workspace/lib/transcript-steps.js +123 -0
- package/workspace/lib/vendor/scripts/nine-stages.js +49 -20
- package/workspace/lib/viewer-meeting.js +205 -0
- package/workspace/lib/viewer-report.js +89 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/premium-agreed-viewer-shots.js +76 -0
- package/workspace/premium-board-actions-test.js +85 -73
- package/workspace/premium-briefing-depth-test.js +66 -53
- package/workspace/premium-chat-attach-test.js +54 -63
- package/workspace/premium-chat-chart-tab-test.js +35 -36
- package/workspace/premium-chat-context-test.js +22 -19
- package/workspace/premium-chat-goal-view-test.js +28 -26
- package/workspace/premium-chat-notes-test.js +29 -33
- package/workspace/premium-chat-report-tab-test.js +35 -25
- package/workspace/premium-chat-term-test.js +16 -14
- package/workspace/premium-chat-viewer-test.js +60 -53
- package/workspace/premium-core-doc-issue-test.js +50 -41
- package/workspace/premium-html-viewer-test.js +17 -18
- package/workspace/premium-phone-card-test.js +8 -2
- package/workspace/premium-phone-room-test.js +42 -31
- package/workspace/premium-report-read-test.js +115 -197
- package/workspace/premium-viewer-download-test.js +19 -22
- package/workspace/premium-viewer-flicker-test.js +11 -16
- package/workspace/premium-viewer-share-test.js +6 -9
- package/workspace/premium-viewer-test.js +41 -60
- package/workspace/premium-vw-backlog-test.js +53 -31
- package/workspace/premium-vw-cal-test.js +82 -123
- package/workspace/premium-vw-copy-test.js +17 -33
- package/workspace/premium-vw-doc-test.js +12 -11
- package/workspace/premium-vw-item-test.js +50 -48
- package/workspace/premium-vw-jira-test.js +55 -26
- package/workspace/premium-vw-meet-test.js +118 -187
- package/workspace/premium-vw-notes-test.js +85 -107
- package/workspace/premium-vw-rec-test.js +72 -193
- package/workspace/premium-vw-slides-test.js +46 -50
- package/workspace/premium-welcome-test.js +3 -2
- package/workspace/premium-work-depth-test.js +63 -51
- package/workspace/public/pm/bd-acts.js +305 -0
- package/workspace/public/pm/bd-span.js +224 -0
- package/workspace/public/pm/bd-stages.js +47 -0
- package/workspace/public/pm/c3-doc-sheet.js +1 -1
- package/workspace/public/pm/c3-md.js +3 -395
- package/workspace/public/pm/c3-phone-detail.js +1 -1
- package/workspace/public/pm/c3-phone-model.js +3 -68
- package/workspace/public/pm/chat-term.js +3 -3
- package/workspace/public/pm/cozy-board.css +640 -0
- package/workspace/public/pm/cozy-home.css +580 -0
- package/workspace/public/pm/cozy-home.js +172 -0
- package/workspace/public/pm/cozy-initiative.css +138 -0
- package/workspace/public/pm/cozy-insights.css +421 -0
- package/workspace/public/pm/cozy-md.js +396 -0
- package/workspace/public/pm/cozy-nav.js +65 -0
- package/workspace/public/pm/cozy-placeholder.js +26 -0
- package/workspace/public/pm/cozy-viewer.css +143 -0
- package/workspace/public/pm/cozy-viewer.js +144 -0
- package/workspace/public/pm/cozy-vw.css +485 -0
- package/workspace/public/pm/cozy.css +254 -0
- package/workspace/public/pm/home-adddoc.js +48 -0
- package/workspace/public/pm/home-app.js +905 -0
- package/workspace/public/pm/home-around.js +515 -0
- package/workspace/public/pm/home-chat.js +459 -0
- package/workspace/public/pm/home-data.js +312 -0
- package/workspace/public/pm/home-draft.js +68 -0
- package/workspace/public/pm/home-more.js +249 -0
- package/workspace/public/pm/home-phone-card.js +109 -0
- package/workspace/public/pm/home-work.js +519 -0
- package/workspace/public/pm/lifecycle-lens-model.js +45 -27
- package/workspace/public/pm/lifecycle-lens.js +22 -11
- package/workspace/public/pm/phone-moment.js +69 -0
- package/workspace/public/pm/pm-work-view.js +1 -1
- package/workspace/public/pm/premium-attach.js +4 -0
- package/workspace/public/pm/premium-board.js +544 -253
- package/workspace/public/pm/premium-brief.js +1 -1
- package/workspace/public/pm/premium-chart-tab.js +110 -62
- package/workspace/public/pm/premium-chat.js +17 -10
- package/workspace/public/pm/premium-deck.js +3 -3
- package/workspace/public/pm/premium-first.js +25 -21
- package/workspace/public/pm/premium-initiative-head.js +138 -0
- package/workspace/public/pm/premium-initiative.js +28 -4
- package/workspace/public/pm/premium-insights.js +950 -440
- package/workspace/public/pm/premium-meeting.js +61 -549
- package/workspace/public/pm/premium-notes.js +1 -1
- package/workspace/public/pm/premium-report-frame.css +20 -0
- package/workspace/public/pm/premium-report-read.js +509 -480
- package/workspace/public/pm/premium-report-tab.js +87 -63
- package/workspace/public/pm/premium-shell.js +107 -124
- package/workspace/public/pm/premium-viewer.js +27 -1
- package/workspace/public/pm/premium-vw-cal.js +187 -48
- package/workspace/public/pm/premium-vw-doc.css +6 -0
- package/workspace/public/pm/premium-vw-doc.js +40 -2
- package/workspace/public/pm/premium-vw-file.js +2 -2
- package/workspace/public/pm/premium-vw-jira-model.js +22 -5
- package/workspace/public/pm/premium-vw-jira.css +11 -0
- package/workspace/public/pm/premium-vw-jira.js +11 -4
- package/workspace/public/pm/premium-vw-meet.js +6 -83
- package/workspace/public/pm/premium-vw-mtg.js +731 -0
- package/workspace/public/pm/premium-vw-notes.js +56 -69
- package/workspace/public/pm/premium-vw-open.js +35 -0
- package/workspace/public/pm/premium-vw-page.js +16 -0
- package/workspace/public/pm/premium-vw-rec.js +11 -215
- package/workspace/public/pm/premium-vw-slides.css +5 -0
- package/workspace/public/pm/premium-vw-slides.js +44 -8
- package/workspace/public/pm/term-view.js +22 -0
- package/workspace/public/premium-board.html +57 -64
- package/workspace/public/premium-chat.html +7 -33
- package/workspace/public/premium-initiative.html +8 -41
- package/workspace/public/premium-insights.html +63 -62
- package/workspace/public/premium-viewer.html +20 -0
- package/workspace/public/premium-work.html +6 -72
- package/workspace/public/premium.html +21 -66
- package/workspace/public/vendor/nunito-var.woff2 +0 -0
- package/workspace/server.js +25 -3
- package/workspace/test-files.json +1 -0
- package/workspace/test-lists/home-libs.json +9 -0
- package/workspace/test-lists/premium-agreed-viewer.json +9 -0
- package/workspace/test-lists/premium-report-read.json +1 -1
- package/workspace/test-lists/premium-vw-agreed.json +9 -0
- package/workspace/test-lists/premium-vw-notes.json +1 -1
- package/workspace/third-party/README.md +1 -0
- package/workspace/public/pm/premium-work.js +0 -719
- package/workspace/public/pm/premium.js +0 -1133
|
@@ -136,7 +136,8 @@ const BRIEFING = { ok: true, items: [{ title: 'Refund reason codes needs an anch
|
|
|
136
136
|
|
|
137
137
|
/* R7 the first-Briefing card, and Undo */
|
|
138
138
|
const C = await open({ url: '/premium.html?ws=w1&first=imp1', tools: { calendar: { started: true }, inbox: { error: 'No connection for Inbox.' } } });
|
|
139
|
-
|
|
139
|
+
// premium-agreed-design: Home has no columns; the card sits at the top of Home's list (the scroller of #hmList, above the Elsewhere foot), plain, with its Waiting for design marker
|
|
140
|
+
ok('R7 the card sits at the top of Home\'s list with the import\'s item, its initiative and its file', await until(() => C.page.evaluate(() => { const c = document.querySelector('#wlFirst'); const l = document.querySelector('#hmList > .hm-lsc'); return !!c && !!l && c.parentElement === l && [...l.children].filter((x) => !x.hidden).indexOf(c) === 0 && /Waiting for design/.test(c.textContent) && /Refund reason codes needs an anchor/.test(c.textContent) && /payments board/.test(c.textContent) && /refund-codes-prd\.md:1/.test(c.textContent); })));
|
|
140
141
|
ok('R7 the card lists the ticked tools: one being read, one with its reason', await C.page.evaluate(() => /Calendar is being read in an agent session/.test(document.querySelector('#wlFirst').textContent) && /No connection for Inbox\./.test(document.querySelector('#wlFirst').textContent) && !/Slack|Jira/.test(document.querySelector('#wlFirst').textContent)));
|
|
141
142
|
await click(C.page, '#wlUndo');
|
|
142
143
|
ok('R7 Undo this import retracts that import and returns to the found step', await until(() => C.S.undone.length === 1) && JSON.stringify(C.S.undone[0]) === '{"ws":"w1","import_id":"imp1"}' && await until(() => C.page.url().includes('/premium-welcome.html?ws=w1&step=found')) && await heading(C.page, /What PMOS found/));
|
|
@@ -146,7 +147,7 @@ const BRIEFING = { ok: true, items: [{ title: 'Refund reason codes needs an anch
|
|
|
146
147
|
ok('R7 a Briefing with no items says nothing needs the PM and lists nothing', await until(() => E.page.evaluate(() => { const c = document.querySelector('#wlFirst'); return !!c && /Nothing needs you right now/.test(c.textContent) && !c.querySelector('ol'); })));
|
|
147
148
|
await E.ctx.close();
|
|
148
149
|
const N = await open({ url: '/premium.html?ws=w1' });
|
|
149
|
-
ok('R7 without first=
|
|
150
|
+
ok('R7 without first= Home has no first card', await until(() => N.page.evaluate(() => document.querySelectorAll('#hmList .hm-r').length > 0)) && await N.page.evaluate(() => !document.querySelector('#wlFirst')));
|
|
150
151
|
await N.ctx.close();
|
|
151
152
|
|
|
152
153
|
/* R8 not now, R9 already imported */
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
/* premium-work-depth-test.js — My work depth on premium (initiative premium-work-depth; planning/prd/premium-work-depth-prd.md W1 to W12).
|
|
4
4
|
* The real page from the real server. Most checks answer GET /api/my-work-premium with the model lib/my-work-premium.js builds from a fixture and record every
|
|
5
5
|
* press the page makes, so the only POSTs allowed are the listed routes, each with the launch nonce. The last block drives the real routes over a scratch state folder.
|
|
6
|
-
* W2 edit · W3 steps · W4 Not before · W5 Someday · W6 Focus and jobs · W7 the agent · W8 keys and swipe · W9 Undo · W11 refusals · W12 floors
|
|
6
|
+
* W2 edit · W3 steps · W4 Not before · W5 Someday · W6 Focus and jobs · W7 the agent · W8 keys and swipe · W9 Undo · W11 refusals · W12 floors
|
|
7
|
+
* Re-pointed to the Agreed design (initiative premium-agreed-design): /premium-work.html is Home now, and My work is a minimal card in the Home
|
|
8
|
+
* Viewer marked "Waiting for design" (pm/home-work.js), opened from the place menu: More, My work. Your list holds the Work queue's rows; a row
|
|
9
|
+
* opens the item in the same card (its fields sheet, its agent, its draft or source), and Focus and jobs opens the same way. Back, or Escape,
|
|
10
|
+
* goes back to the list. The presses, the routes and the keys and swipe are the same as on the old page. */
|
|
7
11
|
const fs = require('fs');
|
|
8
12
|
const path = require('path');
|
|
9
13
|
const { spawn } = require('child_process');
|
|
@@ -63,18 +67,23 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
63
67
|
};
|
|
64
68
|
await page.route('**/api/pm-items/**', rec); await page.route('**/api/pm-jobs/**', rec); await page.route('**/api/my-work/**', rec);
|
|
65
69
|
await page.route('**/api/briefing-premium/**', (r) => r.fulfill({ contentType: 'application/json', body: JSON.stringify({ ok: true, turns: [], working: false }) }));
|
|
66
|
-
await page.goto(BASE + '/premium
|
|
67
|
-
|
|
70
|
+
await page.goto(BASE + '/premium.html?theme=' + theme);
|
|
71
|
+
await until(() => page.evaluate(() => !!document.querySelector('#czFab')), 15000);
|
|
72
|
+
await page.click('#czFab'); await page.click('[data-cz-more]');
|
|
73
|
+
await page.locator('#hmMenu button').filter({ hasText: 'My work' }).first().click();
|
|
74
|
+
const up = await until(() => page.evaluate(() => document.querySelectorAll('#czViewer:not([hidden]) .mw-list .wrow').length > 0), 20000);
|
|
68
75
|
return { ctx, page, errors, posts, up, replies, setModel: (m) => { current = m; }, refuse: (f) => { fail = f; }, last: () => posts[posts.length - 1] };
|
|
69
76
|
};
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
77
|
+
// re-pointed for premium-agreed-design: the item (or Focus and jobs) is "open" while its view is drawn in the My work card, and "closed" when the card is back on the list
|
|
78
|
+
const rowDlg = () => !!document.querySelector('#czViewer:not([hidden]) .mw-sub');
|
|
79
|
+
const dlgOn = (p) => until(() => p.evaluate(rowDlg));
|
|
80
|
+
const dlgOff = (p) => until(() => p.evaluate(rowDlg).then((x) => !x));
|
|
81
|
+
/* Your list holds every row of the queue but Kept and Done: bring the Your list tab up before pressing a row (each press redraws the list, so the button is found again) */
|
|
82
|
+
const showKey = (p, key) => p.evaluate((key) => { const has = () => document.querySelector(`.mw-list .wrow[data-key="${key}"], .mw-wait .wrow[data-key="${key}"]`); if (has()) return true; const y = document.querySelector('#czViewer [data-tab="yours"]'); if (y) y.click(); return !!has(); }, key);
|
|
83
|
+
const qTab = async (p) => { await p.click('#czViewer [data-tab="yours"]'); };
|
|
84
|
+
/* Escape closes the fields sheet first, then the item view */
|
|
85
|
+
const escAll = async (p) => { await p.keyboard.press('Escape'); if (await p.evaluate(rowDlg)) { await sleep(100); await p.keyboard.press('Escape'); } await dlgOff(p); };
|
|
86
|
+
const openKey = async (p, key) => { await showKey(p, key); await p.locator(`.mw-list .wrow[data-key="${key}"] .wrh`).first().click(); await dlgOn(p); await sleep(300); };
|
|
78
87
|
const undoOf = async (p, direct) => { await until(() => p.evaluate(() => /Undo/.test(document.querySelector('#toast').textContent))); if (direct) { /* the Undo window is 8 s; on a loaded runner the real-server steps before this can outlast it, so press the button itself rather than race the toast's fade */ await p.evaluate(() => document.querySelector('#toast .undo').click()); } else await p.locator('#toast .undo').click(); await sleep(250); };
|
|
79
88
|
|
|
80
89
|
const A = await open();
|
|
@@ -85,17 +94,17 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
85
94
|
const wait = async (fn) => until(fn, 5000);
|
|
86
95
|
|
|
87
96
|
/* W6 Focus: one quiet chip in the Work queue head; Accept and Not today are in its dialog (premium-calmer-first-screen) */
|
|
88
|
-
const bar = await p.evaluate(() => { const b = document.querySelector('#xFocus .xfq'); return { say: b.getAttribute('aria-label'), text: b.textContent, inHead: !!b.closest('
|
|
89
|
-
ok('W6 the Focus chip names the first suggestion and why, from the record, and sits
|
|
97
|
+
const bar = await p.evaluate(() => { const b = document.querySelector('#xFocus .xfq'); return { say: b.getAttribute('aria-label'), text: b.textContent, inHead: !!b.closest('.mw-list .mw-head'), solid: [...document.querySelectorAll('#xFocus .pri, .mw-list [data-fx]')].length, tag: [...document.querySelectorAll('.mw-list .xfc.sug')].map((x) => x.closest('.wrow').dataset.key) }; });
|
|
98
|
+
ok('W6 the Focus chip names the first suggestion and why, from the record, and sits at the head of Your list with no Accept on the list', /to walk in with a decision ready/.test(bar.say) && /Suggested · /.test(bar.say) && /1 due today/.test(bar.say) && /^Focus\s*1 suggested$/.test(bar.text) && bar.inHead && bar.solid === 0, JSON.stringify(bar));
|
|
90
99
|
ok('W6 the suggested item\'s row carries a quiet "Suggested focus" tag', bar.tag.join() === 'work:item-bbbbbbbbbbb2', JSON.stringify(bar));
|
|
91
|
-
await p.locator('#xFocus [data-xf="more"]').click(); await dlgOn(p); await sleep(
|
|
100
|
+
await p.locator('#xFocus [data-xf="more"]').click(); await dlgOn(p); await sleep(300);
|
|
92
101
|
await p.locator('[data-fx="acc"][data-k="job:job-1"]').click();
|
|
93
102
|
ok('W6 Accept posts the suggestion to focus/accept with its own fields', await wait(() => A.last() && A.last().path === '/api/pm-items/focus/accept'
|
|
94
103
|
&& JSON.stringify(Object.keys(A.last().body).sort()) === JSON.stringify(['item_ids', 'job', 'key', 'title', 'why']) && A.last().body.key === 'job:job-1' && A.last().body.item_ids.join() === 'item-bbbbbbbbbbb2' && A.last().body.job === 'job-1'), JSON.stringify(A.last()));
|
|
95
104
|
await undoOf(p);
|
|
96
105
|
ok('W9 Undo of Accept posts focus/clear for that key', A.last().path === '/api/pm-items/focus/clear' && A.last().body.key === 'job:job-1' && Object.keys(A.last().body).join() === 'key', JSON.stringify(A.last()));
|
|
97
|
-
const fd = await p.evaluate(() => ({ title: document.querySelector('#
|
|
98
|
-
ok('W6 See all lists the suggestion with the item it covers, and the PM\'s jobs with open counts', fd.title === 'Focus and jobs' && /to walk in with a decision ready/.test(fd.text) && /Prepare for the Design review/.test(fd.text) && /When a design review is on the calendar, I want to walk in with a decision ready, so the review ends with a disposition\./.test(fd.text) && /1 open item/.test(fd.text) &&
|
|
106
|
+
const fd = await p.evaluate(() => ({ title: document.querySelector('#czVwTitle').textContent, text: document.querySelector('.mw-fj').textContent, wait: !!document.querySelector('.mw-fj .hx-wait'), add: document.querySelector('[data-fx="jadd"]').disabled }));
|
|
107
|
+
ok('W6 See all lists the suggestion with the item it covers, and the PM\'s jobs with open counts', fd.title === 'Focus and jobs' && /to walk in with a decision ready/.test(fd.text) && /Prepare for the Design review/.test(fd.text) && /When a design review is on the calendar, I want to walk in with a decision ready, so the review ends with a disposition\./.test(fd.text) && /1 open item/.test(fd.text) && fd.wait, JSON.stringify(fd));
|
|
99
108
|
ok('W6 Add the job stays off until the line has when, I want and so', fd.add && await p.evaluate(async () => { const i = document.querySelector('#xjIn'); i.value = 'when a launch slips'; i.dispatchEvent(new Event('input', { bubbles: true })); return document.querySelector('[data-fx="jadd"]').disabled; }));
|
|
100
109
|
await p.fill('#xjIn', 'when a launch slips, I want the owner named, so the date holds');
|
|
101
110
|
ok('W6 …and turns on when it has all three', await p.evaluate(() => !document.querySelector('[data-fx="jadd"]').disabled));
|
|
@@ -109,7 +118,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
109
118
|
{ const m = mk((v) => { v.focus = { suggestions: [], accepted: [{ key: 'job:job-1', title: 'to walk in with a decision ready', why: '1 due today', item_ids: ['item-bbbbbbbbbbb2'], job: 'job-1' }], dismissed: [] }; });
|
|
110
119
|
const R = await open({ model: m }); const t = await R.page.evaluate(() => ({ bar: document.querySelector('#xFocus .xfq').getAttribute('aria-label'), tag: [...document.querySelectorAll('.xfc')].map((x) => x.closest('.wrow').dataset.key) }));
|
|
111
120
|
ok('W6 an accepted group is named on the bar and tags its Today row with Focus', /Your focus today/.test(t.bar) && t.tag.join() === 'work:item-bbbbbbbbbbb2', JSON.stringify(t));
|
|
112
|
-
await R.page.locator('#xFocus [data-xf="more"]').click(); await dlgOn(R.page); await sleep(
|
|
121
|
+
await R.page.locator('#xFocus [data-xf="more"]').click(); await dlgOn(R.page); await sleep(300);
|
|
113
122
|
await R.page.click('[data-fx="clr"]');
|
|
114
123
|
ok('W6 Clear posts focus/clear, and Undo accepts the group again with the same fields', await until(() => R.last() && R.last().path === '/api/pm-items/focus/clear') && (await undoOf(R.page), R.last().path === '/api/pm-items/focus/accept' && R.last().body.key === 'job:job-1' && R.last().body.item_ids.join() === 'item-bbbbbbbbbbb2'), JSON.stringify(R.last()));
|
|
115
124
|
await R.ctx.close(); }
|
|
@@ -138,7 +147,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
138
147
|
const sbtn = await txt('[data-p="xt"][data-k="steps"]');
|
|
139
148
|
ok('W3 the Who does it field counts the item\'s steps and names who does them', /Who does it/.test(sbtn) && /You, Agent drafts · 2 steps/.test(sbtn), sbtn);
|
|
140
149
|
await field(p, 'steps');
|
|
141
|
-
const st = await p.evaluate(() => ({ items: [...document.querySelectorAll('.xsteps li .xst')].map((x) => x.textContent), pressed: [...document.querySelectorAll('.xsteps [aria-pressed="true"]')].map((x) => x.textContent), h: [...document.querySelectorAll('.xpan .
|
|
150
|
+
const st = await p.evaluate(() => ({ items: [...document.querySelectorAll('.xsteps li .xst')].map((x) => x.textContent), pressed: [...document.querySelectorAll('.xsteps [aria-pressed="true"]')].map((x) => x.textContent), h: [...document.querySelectorAll('.xpan .hx-b, .xpan input')].map((b) => Math.round(b.getBoundingClientRect().height)) }));
|
|
142
151
|
ok('W3 each step shows who does it, from the record', st.items.join('|') === 'List the open questions|Send the agenda to the team' && st.pressed.join() === 'You,Agent drafts' && st.h.every((x) => x >= 44), JSON.stringify(st));
|
|
143
152
|
A.replies['/api/pm-items/steps/who'] = { ok: true, who: 'agent-drafts', forced: true };
|
|
144
153
|
await p.click('[data-p="xwho"][data-sid="step-2"][data-v="agent-does"]');
|
|
@@ -146,16 +155,16 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
146
155
|
await p.fill('#xsIn', 'Book the room');
|
|
147
156
|
await p.click('[data-p="xsadd"]');
|
|
148
157
|
ok('W3 Add posts the item and the text to steps/add', await wait(() => A.last().path === '/api/pm-items/steps/add' && A.last().body.id === 'item-bbbbbbbbbbb2' && A.last().body.text === 'Book the room' && Object.keys(A.last().body).sort().join() === 'id,text'), JSON.stringify(A.last()));
|
|
149
|
-
ok('W3 the
|
|
158
|
+
ok('W3 the item stays open and the typed step is cleared', await until(() => p.evaluate(() => !!document.querySelector('.mw-it') && !!document.querySelector('#xsIn') && document.querySelector('#xsIn').value === '')), await p.evaluate(() => ((document.querySelector('#czViewer:not([hidden]) .cz-vw-body') || {}).textContent || 'no Viewer').slice(0, 300)));
|
|
150
159
|
const n1 = pc(); await p.click('[data-p="xsadd"]'); await sleep(250);
|
|
151
160
|
ok('W3 Add with no text posts nothing', pc() === n1);
|
|
152
161
|
await p.keyboard.press('Escape');
|
|
153
|
-
ok('W3 Escape closes the fields sheet first and leaves the
|
|
162
|
+
ok('W3 Escape closes the fields sheet first and leaves the item open', await until(() => p.evaluate(() => document.querySelector('#iSheet').hidden && document.querySelector('#iTog').getAttribute('aria-expanded') === 'false' && !!document.querySelector('#czViewer:not([hidden]) .mw-it'))));
|
|
154
163
|
await escAll(p);
|
|
155
164
|
|
|
156
165
|
/* W4 Not before */
|
|
157
166
|
await openKey(p, 'work:item-ccccccccccc1');
|
|
158
|
-
ok('W4 an item with a Not before day says it on the When field', /Not before 18 Oct/.test(await txt('#card .ffd[data-k="when"]')));
|
|
167
|
+
ok('W4 an item with a Not before day says it on the When field', /Not before 18 Oct/.test(await txt('#card .ffd[data-k="when"]')), await p.evaluate(() => ((document.querySelector('#czViewer:not([hidden]) .cz-vw-body') || {}).textContent || 'no Viewer').slice(0, 300)));
|
|
159
168
|
await more(p); await p.click('[data-p="xt"][data-k="defer"]');
|
|
160
169
|
const dq = await p.evaluate(() => [...document.querySelectorAll('[data-p="xdq"]')].map((b) => [b.textContent, b.dataset.v].join('=')));
|
|
161
170
|
ok('W4 Tomorrow, Monday and In a week are dates from the server\'s day (Fri 16 Oct)', dq.join() === 'Tomorrow=2026-10-17,Monday=2026-10-19,In a week=2026-10-23', dq.join());
|
|
@@ -190,7 +199,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
190
199
|
await p.fill('#agAsk', 'Draft your reply: partial refunds, short');
|
|
191
200
|
await p.click('[data-p="ag-brief"]');
|
|
192
201
|
ok('W7 Let the agent draft this posts act brief with the item, the PM\'s words and the workspace', await wait(() => A.last().path === '/api/my-work/act' && A.last().body.action === 'brief' && A.last().body.item === 'item-aaaaaaaaaaa1' && A.last().body.instruction === 'Draft your reply: partial refunds, short' && 'ws' in A.last().body && Object.keys(A.last().body).sort().join() === 'action,instruction,item,ws'), JSON.stringify(A.last()));
|
|
193
|
-
ok('W7 the
|
|
202
|
+
ok('W7 the item stays open', await p.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) .mw-it')));
|
|
194
203
|
await escAll(p);
|
|
195
204
|
await openKey(p, 'work:item-bbbbbbbbbbb3');
|
|
196
205
|
ok('W7 a working agent shows its state and only Stop', await p.evaluate(() => document.querySelector('.agblk').dataset.state === 'working' && [...document.querySelectorAll('.agblk button')].map((b) => b.textContent.trim()).join() === 'Stop'));
|
|
@@ -206,7 +215,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
206
215
|
/* W7 a ready draft: nothing is posted before the confirm */
|
|
207
216
|
const RD = await open({ model: mk((v) => { v.work.today[0].origin = 'jira'; v.work.today[0].place = null; }) }), q = RD.page;
|
|
208
217
|
await openKey(q, 'work:wbs:alpha:4.2');
|
|
209
|
-
const rd = await q.evaluate(() => ({ state: document.querySelector('.agblk').dataset.state, tag: document.querySelector('.agpane .agtag').textContent, body: document.querySelector('.agpane').textContent, btn: [...document.querySelectorAll('.agblk .xco b, .agblk > .
|
|
218
|
+
const rd = await q.evaluate(() => ({ state: document.querySelector('.agblk').dataset.state, tag: document.querySelector('.agpane .agtag').textContent, body: document.querySelector('.agpane').textContent, btn: [...document.querySelectorAll('.agblk .xco b, .agblk > .hx-top button')].map((b) => b.textContent.trim()), copy: !!document.querySelector('[data-pp="copy"]'), open: !!document.querySelector('[data-pp="open"]') }));
|
|
210
219
|
ok('W7 a ready draft is labelled the agent\'s, unchecked, and shows it in the detail panel with Open and Copy, and offers Post, Edit, Keep, Mark done and Send back', rd.state === 'ready' && /Draft for Jira/.test(rd.tag) && /Agent draft · not checked/.test(rd.body) && /sign off A and B/.test(rd.body) && rd.copy && rd.open && rd.btn.join() === 'Post it to Jira,Edit the draft,Keep it as a draft,Mark it done,Post it to Jira,Send it back with a note', JSON.stringify(rd));
|
|
211
220
|
const m0 = RD.posts.length; await q.click('[data-p="ag-post"]'); await sleep(300);
|
|
212
221
|
const cf = await q.evaluate(() => ({ text: document.querySelector('.xcon').textContent, btn: [...document.querySelectorAll('.xcon button')].map((b) => b.textContent.trim()) }));
|
|
@@ -239,12 +248,12 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
239
248
|
{ const R = await open(); await openKey(R.page, 'work:item-bbbbbbbbbbb2');
|
|
240
249
|
R.refuse({ status: 409, body: { ok: false, error: 'the draft moved on while you read it' } });
|
|
241
250
|
await more(R.page); await R.page.click('[data-p="xt"][data-k="someday"]'); await sleep(500);
|
|
242
|
-
const e = await R.page.evaluate(() => ({ open: document.querySelector('#
|
|
243
|
-
ok('W11 a refused press shows the server\'s words, keeps the
|
|
251
|
+
const e = await R.page.evaluate(() => ({ open: !!document.querySelector('#czViewer:not([hidden]) .mw-it'), msg: document.querySelector('#cardErr').textContent, shown: !document.querySelector('#cardErr').hidden, dis: [...document.querySelectorAll('#card button')].filter((b) => b.disabled && b.id !== 'wBtn').length }));
|
|
252
|
+
ok('W11 a refused press shows the server\'s words, keeps the item open and leaves the buttons on', e.open && e.shown && /the draft moved on/.test(e.msg) && e.dis === 0, JSON.stringify(e));
|
|
244
253
|
await R.ctx.close(); }
|
|
245
254
|
|
|
246
255
|
/* W8 keys */
|
|
247
|
-
await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('
|
|
256
|
+
await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('.mw-list .wrow[data-key="work:item-bbbbbbbbbbb2"] .wrh').focus();
|
|
248
257
|
const desc = await p.evaluate(() => document.activeElement.getAttribute('aria-description'));
|
|
249
258
|
ok('W8 a row names what the arrows do and that J and K move', /Right arrow: Done\. Left arrow: Tomorrow\. J and K move between rows\./.test(desc || ''), desc);
|
|
250
259
|
await p.keyboard.press('j');
|
|
@@ -252,32 +261,32 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
252
261
|
await p.keyboard.press('ArrowRight');
|
|
253
262
|
ok('W8 Right arrow on a Today row posts done, with Undo', await wait(() => A.last().path === '/api/pm-items/done' && A.last().body.id === 'item-bbbbbbbbbbb2') && await until(() => p.evaluate(() => /Undo/.test(document.querySelector('#toast').textContent))), JSON.stringify(A.last()));
|
|
254
263
|
await sleep(300);
|
|
255
|
-
await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('
|
|
264
|
+
await showKey(p, 'work:item-bbbbbbbbbbb2'); await p.locator('.mw-list .wrow[data-key="work:item-bbbbbbbbbbb2"] .wrh').focus(); await p.keyboard.press('ArrowLeft');
|
|
256
265
|
ok('W8 Left arrow on a Today row puts it off to tomorrow (defer to the next day)', await wait(() => A.last().path === '/api/pm-items/defer' && A.last().body.id === 'item-bbbbbbbbbbb2' && A.last().body.until === '2026-10-17'), JSON.stringify(A.last()));
|
|
257
266
|
await sleep(300);
|
|
258
|
-
await showKey(p, 'work:item-aaaaaaaaaaa1'); await p.locator('
|
|
267
|
+
await showKey(p, 'work:item-aaaaaaaaaaa1'); await p.locator('.mw-list .wrow[data-key="work:item-aaaaaaaaaaa1"] .wrh').focus(); await p.keyboard.press('ArrowRight');
|
|
259
268
|
ok('W8 Right arrow on an Inbox row moves it to Today (flag)', await wait(() => A.last().path === '/api/pm-items/flag' && A.last().body.id === 'item-aaaaaaaaaaa1' && A.last().body.flagged === true), JSON.stringify(A.last()));
|
|
260
269
|
await sleep(300);
|
|
261
|
-
await showKey(p, 'work:item-aaaaaaaaaaa2'); await p.locator('
|
|
270
|
+
await showKey(p, 'work:item-aaaaaaaaaaa2'); await p.locator('.mw-list .wrow[data-key="work:item-aaaaaaaaaaa2"] .wrh').focus(); await p.keyboard.press('ArrowLeft');
|
|
262
271
|
ok('W8 Left arrow on an Inbox row sends it to Someday', await wait(() => A.last().path === '/api/pm-items/someday' && A.last().body.id === 'item-aaaaaaaaaaa2'), JSON.stringify(A.last()));
|
|
263
272
|
await sleep(300);
|
|
264
|
-
const n2 = pc(); await showKey(p, 'work:item-eeeeeeeeeee1'); await p.locator('
|
|
273
|
+
const n2 = pc(); await showKey(p, 'work:item-eeeeeeeeeee1'); await p.locator('.mw-list .wrow[data-key="work:item-eeeeeeeeeee1"] .wrh').focus(); await p.keyboard.press('ArrowLeft'); await sleep(250);
|
|
265
274
|
ok('W8 a Someday row has no left action, and posts nothing', pc() === n2);
|
|
266
|
-
await p.
|
|
275
|
+
await p.click('#czViewer [data-tab="waiting"]'); await p.locator('.mw-wait .wrh').first().focus(); await p.keyboard.press('ArrowRight'); await sleep(250);
|
|
267
276
|
ok('W8 a Waiting row has no arrow actions, and posts nothing', pc() === n2);
|
|
268
|
-
await showKey(p, 'work:wbs:alpha:4.2'); await p.locator('
|
|
277
|
+
await showKey(p, 'work:wbs:alpha:4.2'); await p.locator('.mw-list .wrow[data-key="work:wbs:alpha:4.2"] .wrh').focus();
|
|
269
278
|
ok('W8 a Today row whose draft is ready offers Review on the right, not Done', /Right arrow: Review/.test(await p.evaluate(() => document.activeElement.getAttribute('aria-description'))));
|
|
270
279
|
await p.keyboard.press('ArrowRight'); await dlgOn(p);
|
|
271
|
-
ok('W8 …and Review opens the
|
|
280
|
+
ok('W8 …and Review opens the item without posting', pc() === n2 + 0 || A.last().path !== '/api/pm-items/done');
|
|
272
281
|
await escAll(p);
|
|
273
282
|
{ const r = await open(); const t = r.page;
|
|
274
|
-
await showKey(t, 'work:item-aaaaaaaaaaa4'); await t.locator('
|
|
283
|
+
await showKey(t, 'work:item-aaaaaaaaaaa4'); await t.locator('.mw-list .wrow[data-key="work:item-aaaaaaaaaaa4"] .wrh').focus(); await t.keyboard.press('ArrowRight');
|
|
275
284
|
ok('W8 the keys work on a row you added too (flag)', await until(() => r.last() && r.last().path === '/api/pm-items/flag' && r.last().body.id === 'item-aaaaaaaaaaa4'), JSON.stringify(r.last()));
|
|
276
285
|
await r.ctx.close(); }
|
|
277
286
|
|
|
278
287
|
/* W8 swipe */
|
|
279
288
|
const drag = async (pg, key, dx, hold = false) => {
|
|
280
|
-
await showKey(pg, key); const loc = pg.locator(
|
|
289
|
+
await showKey(pg, key); const loc = pg.locator(`.mw-list .wrow[data-key="${key}"] .wrh`); await loc.evaluate((e) => e.scrollIntoView({ block: 'center' })); await sleep(150); // centred, so the Undo toast at the foot of the screen does not cover the row
|
|
281
290
|
const b = await loc.boundingBox(); const y = b.y + b.height / 2, x = b.x + b.width / 2;
|
|
282
291
|
await pg.mouse.move(x, y); await pg.mouse.down(); await pg.mouse.move(x + dx / 3, y, { steps: 4 }); await pg.mouse.move(x + dx, y, { steps: 6 });
|
|
283
292
|
const seen = await pg.evaluate(() => { const rv = document.querySelector('.xrv'); return rv ? { text: rv.textContent.trim(), op: +getComputedStyle(rv).opacity, tr: getComputedStyle(rv.parentElement.querySelector('.wrow')).transform } : null; });
|
|
@@ -291,7 +300,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
291
300
|
ok('W8 a drag of 50 px snaps back and posts nothing', r.posts.length === n3 && s2 && s2.op < 0.7, JSON.stringify([s2, r.posts.length - n3]));
|
|
292
301
|
const s3 = await drag(t, 'work:item-bbbbbbbbbbb3', -130); await sleep(300);
|
|
293
302
|
ok('W8 dragging left shows "Tomorrow" and posts defer to the next day', s3 && s3.text === 'Tomorrow' && await until(() => r.last().path === '/api/pm-items/defer' && r.last().body.until === '2026-10-17'), JSON.stringify([s3, r.last()]));
|
|
294
|
-
const n4 = r.posts.length; await showKey(t, 'work:item-aaaaaaaaaaa3'); await t.locator('
|
|
303
|
+
const n4 = r.posts.length; await showKey(t, 'work:item-aaaaaaaaaaa3'); await t.locator('.mw-list .wrow[data-key="work:item-aaaaaaaaaaa3"] .wrh').click(); await dlgOn(t);
|
|
295
304
|
ok('W8 an ordinary click still opens the row and posts nothing', r.posts.length === n4);
|
|
296
305
|
await r.ctx.close(); }
|
|
297
306
|
{ const r = await open({ rm: true }); const t = r.page;
|
|
@@ -314,16 +323,16 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
314
323
|
const R = await open({ w: 390, h: 844, theme }), q2 = R.page;
|
|
315
324
|
const bar2 = await q2.evaluate(() => { const b = document.querySelector('#xFocus').getBoundingClientRect(); return { over: document.documentElement.scrollWidth > innerWidth + 1, w: Math.round(b.width), h: [...document.querySelectorAll('#xFocus button')].map((x) => Math.round(x.getBoundingClientRect().height)) }; });
|
|
316
325
|
ok(`W12 at 390 px (${theme}) the Focus bar fits and its buttons are 44 px`, !bar2.over && bar2.h.every((x) => x >= 44), JSON.stringify(bar2));
|
|
317
|
-
await openKey(q2, 'work:item-bbbbbbbbbbb2');
|
|
326
|
+
await openKey(q2, 'work:item-bbbbbbbbbbb2');
|
|
318
327
|
const g = {};
|
|
319
328
|
for (const k of ['edit', 'steps', 'defer']) {
|
|
320
329
|
await more(q2); await q2.click(`[data-p="xt"][data-k="${k}"]`); await sleep(150);
|
|
321
|
-
g[k] = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#
|
|
330
|
+
g[k] = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#czViewer .cz-vw-body').scrollWidth > document.querySelector('#czViewer .cz-vw-body').clientWidth + 1, small: [...document.querySelectorAll('#card button, #card input, #card select')].filter((b) => !b.closest('[hidden]') && b.getBoundingClientRect().height > 0 && b.getBoundingClientRect().height < 43.5).map((b) => (b.dataset.p || b.id) + ':' + Math.round(b.getBoundingClientRect().height)) }));
|
|
322
331
|
}
|
|
323
332
|
ok(`W12 at 390 px (${theme}) the edit, steps and Not before panels have no sideways scroll and every control is 44 px`, ['edit', 'steps', 'defer'].every((k) => !g[k].over && g[k].small.length === 0), JSON.stringify(g));
|
|
324
333
|
await escAll(q2);
|
|
325
|
-
await showKey(R.page, 'work:wbs:alpha:4.2'); await R.page.locator('
|
|
326
|
-
const ag = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#
|
|
334
|
+
await showKey(R.page, 'work:wbs:alpha:4.2'); await R.page.locator('.mw-list .wrow[data-key="work:wbs:alpha:4.2"] .wrh').click(); await dlgOn(q2); await sleep(300);
|
|
335
|
+
const ag = await q2.evaluate(() => ({ over: document.documentElement.scrollWidth > innerWidth + 1 || document.querySelector('#czViewer .cz-vw-body').scrollWidth > document.querySelector('#czViewer .cz-vw-body').clientWidth + 1, small: [...document.querySelectorAll('.agblk button')].filter((b) => b.getBoundingClientRect().height < 43.5).map((b) => b.textContent.trim()) }));
|
|
327
336
|
ok(`W12 at 390 px (${theme}) the agent block has no sideways scroll and its buttons are 44 px`, !ag.over && ag.small.length === 0, JSON.stringify(ag));
|
|
328
337
|
await R.ctx.close();
|
|
329
338
|
}
|
|
@@ -337,9 +346,13 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
337
346
|
pg.on('pageerror', (e) => errs.push(String(e)));
|
|
338
347
|
const get = (u) => fetch(BASE + u).then((r) => r.json());
|
|
339
348
|
await pg.goto(BASE + '/premium-work.html');
|
|
340
|
-
|
|
341
|
-
await pg.
|
|
342
|
-
await
|
|
349
|
+
// re-pointed for premium-agreed-design: /premium-work.html opens Home; My work is the card from the place menu, and an added line is opened from Your list
|
|
350
|
+
await until(() => pg.evaluate(() => /\/premium\.html$/.test(location.pathname) && !!document.querySelector('#czFab')), 15000);
|
|
351
|
+
await pg.click('#czFab'); await pg.click('[data-cz-more]'); await pg.locator('#hmMenu button').filter({ hasText: 'My work' }).first().click();
|
|
352
|
+
ok('E1 on an empty scratch state My work says the list is empty and Focus has nothing to suggest', await until(() => pg.evaluate(() => /Nothing on your list/.test((document.querySelector('#czViewer .mw-list') || {}).textContent || '') && /Nothing to suggest/.test(document.querySelector('#xFocus .xfq').getAttribute('aria-label'))), 20000));
|
|
353
|
+
await pg.fill('#hxLine', 'Reply to Rina about SSO !p1'); await pg.click('#czViewer [data-x="add"]');
|
|
354
|
+
await until(() => pg.evaluate(() => !!document.querySelector('.mw-list .wrh')), 8000);
|
|
355
|
+
await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300);
|
|
343
356
|
await more(pg); await pg.click('[data-p="xt"][data-k="edit"]'); await pg.fill('#xeT', 'Reply to Rina about SSO beta'); await pg.fill('#xeD', '2026-10-30'); await pg.click('[data-p="xpri"][data-v="P2"]'); await pg.click('[data-p="xsave"]');
|
|
344
357
|
await dlgOff(pg);
|
|
345
358
|
let it = (await get('/api/pm-items')).items.find((i) => /SSO beta/.test(i.title));
|
|
@@ -347,7 +360,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
347
360
|
await undoOf(pg, true); await sleep(300);
|
|
348
361
|
it = (await get('/api/pm-items')).items.find((i) => i.id === it.id);
|
|
349
362
|
ok('E3 Undo writes the old values back (the title the parser made, no day, P1)', it.title === 'Reply to Rina about SSO !' && !it.due && it.priority === 'P1', JSON.stringify(it));
|
|
350
|
-
await pg.locator('
|
|
363
|
+
await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300);
|
|
351
364
|
await more(pg); await pg.click('[data-p="xt"][data-k="steps"]');
|
|
352
365
|
await pg.fill('#xsIn', 'Send the SSO plan to Rina'); await pg.click('[data-p="xsadd"]');
|
|
353
366
|
ok('E4 a step is added through the real route', await until(async () => ((await get('/api/pm-items')).items.find((i) => i.id === it.id) || {}).steps && (await get('/api/pm-items')).items.find((i) => i.id === it.id).steps.length === 1, 8000));
|
|
@@ -361,20 +374,19 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
361
374
|
await undoOf(pg, true); await sleep(300);
|
|
362
375
|
it = (await get('/api/pm-items')).items.find((i) => i.id === it.id);
|
|
363
376
|
ok('E7 Undo clears it', !it.defer, JSON.stringify(it));
|
|
364
|
-
await pg.locator('.
|
|
365
|
-
await pg.locator('#qBody .wrh').first().click(); await dlgOn(pg); await sleep(700);
|
|
377
|
+
await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300);
|
|
366
378
|
await more(pg); await pg.click('[data-p="xt"][data-k="someday"]'); await dlgOff(pg);
|
|
367
379
|
ok('E8 Someday parks the real record', (await get('/api/pm-items')).work.someday.some((i) => i.id === it.id));
|
|
368
380
|
await undoOf(pg, true); await sleep(300);
|
|
369
381
|
ok('E9 Undo brings it back (unpark)', !(await get('/api/pm-items')).work.someday.some((i) => i.id === it.id));
|
|
370
|
-
await pg.locator('
|
|
382
|
+
await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300); await more(pg); await pg.click('[data-p="flag"]'); await dlgOff(pg);
|
|
371
383
|
ok('E10 once the item is in Today, Focus suggests it and the bar says why', await until(() => pg.evaluate(() => /Suggested · /.test(document.querySelector('#xFocus .xfq').getAttribute('aria-label'))), 8000));
|
|
372
|
-
await pg.click('#xFocus [data-xf="more"]'); await dlgOn(pg); await sleep(
|
|
384
|
+
await pg.click('#xFocus [data-xf="more"]'); await dlgOn(pg); await sleep(300);
|
|
373
385
|
await pg.locator('[data-fx="acc"]').first().click();
|
|
374
|
-
ok('E11 Accept writes the group to today\'s Focus, and the Today row carries the Focus tag', await until(async () => (await get('/api/pm-items')).focus.accepted.length === 1, 8000) && (await escAll(pg), await qTab(pg
|
|
375
|
-
await pg.click('#xFocus [data-xf="more"]'); await dlgOn(pg); await sleep(
|
|
386
|
+
ok('E11 Accept writes the group to today\'s Focus, and the Today row carries the Focus tag', await until(async () => (await get('/api/pm-items')).focus.accepted.length === 1, 8000) && (await escAll(pg), await qTab(pg), await until(() => pg.evaluate(() => !!document.querySelector('.mw-list .xfc:not(.sug)')), 8000)));
|
|
387
|
+
await pg.click('#xFocus [data-xf="more"]'); await dlgOn(pg); await sleep(300);
|
|
376
388
|
await pg.fill('#xjIn', 'when a launch slips, I want the owner named, so the date holds'); await pg.click('[data-fx="jadd"]');
|
|
377
|
-
ok('E12 Add a job writes it, and the dialog lists it with its open count', await until(async () => (await get('/api/pm-items')).jobs.length === 1, 8000) && await until(() => pg.evaluate(() => /the owner named/.test(document.querySelector('
|
|
389
|
+
ok('E12 Add a job writes it, and the dialog lists it with its open count', await until(async () => (await get('/api/pm-items')).jobs.length === 1, 8000) && await until(() => pg.evaluate(() => /the owner named/.test(document.querySelector('.mw-fj').textContent) && /0 open items/.test(document.querySelector('.mw-fj').textContent)), 8000));
|
|
378
390
|
await pg.click('[data-fx="clr"]');
|
|
379
391
|
ok('E13 Clear forgets today\'s accept', await until(async () => (await get('/api/pm-items')).focus.accepted.length === 0, 8000));
|
|
380
392
|
const hdr = await T.pressHeaders(BASE);
|