create-pmos 0.397.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 +13 -13
- 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/briefing-premium-adddoc-test.js +101 -52
- package/workspace/briefing-premium-board-test.js +252 -128
- package/workspace/briefing-premium-calendar-2-test.js +135 -198
- package/workspace/briefing-premium-calendar-3-test.js +143 -418
- package/workspace/briefing-premium-calendar-test.js +86 -196
- package/workspace/briefing-premium-doc-edit-test.js +95 -83
- package/workspace/briefing-premium-initiative-test.js +159 -296
- package/workspace/briefing-premium-insights-test.js +337 -219
- package/workspace/briefing-premium-metrics-test.js +53 -97
- package/workspace/briefing-premium-products-test.js +40 -27
- package/workspace/briefing-premium-sources-test.js +66 -48
- package/workspace/briefing-premium-test.js +150 -647
- package/workspace/briefing-premium-work-test.js +88 -283
- package/workspace/changelog.json +12 -0
- package/workspace/fixtures/board-premium-trail.js +32 -0
- 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 +1 -0
- package/workspace/lib/agent-roles.js +71 -0
- package/workspace/lib/board-premium.js +85 -19
- package/workspace/lib/board-trail.js +223 -0
- package/workspace/lib/home-work-item.js +58 -0
- package/workspace/lib/insights-goals.js +196 -0
- package/workspace/lib/insights-premium.js +62 -14
- 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-trail.js +33 -0
- package/workspace/lib/routes-home-desk.js +176 -0
- package/workspace/lib/routes-insights-premium.js +12 -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/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-board-actions-test.js +85 -75
- 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 -37
- package/workspace/premium-chat-context-test.js +19 -18
- package/workspace/premium-chat-goal-view-test.js +23 -23
- package/workspace/premium-chat-notes-test.js +26 -31
- package/workspace/premium-chat-report-tab-test.js +32 -28
- package/workspace/premium-chat-term-test.js +16 -16
- package/workspace/premium-chat-viewer-test.js +60 -59
- package/workspace/premium-core-doc-issue-test.js +50 -43
- package/workspace/premium-html-viewer-test.js +14 -17
- package/workspace/premium-phone-card-test.js +7 -2
- package/workspace/premium-phone-room-test.js +41 -35
- 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 -33
- package/workspace/premium-vw-cal-test.js +82 -128
- package/workspace/premium-vw-copy-test.js +17 -33
- package/workspace/premium-vw-doc-test.js +11 -10
- package/workspace/premium-vw-item-test.js +50 -49
- package/workspace/premium-vw-jira-test.js +53 -27
- package/workspace/premium-vw-meet-test.js +118 -187
- package/workspace/premium-vw-notes-test.js +85 -108
- package/workspace/premium-vw-rec-test.js +72 -194
- package/workspace/premium-vw-slides-test.js +46 -50
- package/workspace/premium-welcome-test.js +3 -2
- package/workspace/premium-work-depth-test.js +61 -53
- package/workspace/public/pm/bd-acts.js +305 -0
- package/workspace/public/pm/bd-span.js +186 -82
- package/workspace/public/pm/bd-stages.js +25 -11
- 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 +497 -230
- package/workspace/public/pm/cozy-home.css +570 -142
- package/workspace/public/pm/cozy-home.js +5 -3
- package/workspace/public/pm/cozy-insights.css +296 -167
- package/workspace/public/pm/cozy-md.js +396 -0
- package/workspace/public/pm/cozy-nav.js +17 -6
- package/workspace/public/pm/cozy-placeholder.js +26 -0
- package/workspace/public/pm/cozy-viewer.css +3 -3
- package/workspace/public/pm/cozy-viewer.js +144 -0
- package/workspace/public/pm/cozy-vw.css +485 -0
- package/workspace/public/pm/cozy.css +83 -1
- 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/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 +423 -394
- package/workspace/public/pm/premium-chart-tab.js +110 -62
- package/workspace/public/pm/premium-deck.js +3 -3
- package/workspace/public/pm/premium-first.js +25 -21
- package/workspace/public/pm/premium-insights.js +792 -568
- 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 +72 -119
- package/workspace/public/pm/premium-viewer.js +22 -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-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 -218
- 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 +28 -70
- package/workspace/public/premium-initiative.html +8 -48
- package/workspace/public/premium-insights.html +22 -60
- package/workspace/public/premium-viewer.html +20 -0
- package/workspace/public/premium.html +16 -107
- package/workspace/server.js +18 -3
- package/workspace/test-files.json +1 -0
- package/workspace/test-lists/home-libs.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/public/pm/premium-work.js +0 -729
- package/workspace/public/pm/premium.js +0 -1146
|
@@ -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,21 +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
|
-
// re-pointed for premium-agreed-design:
|
|
71
|
-
|
|
72
|
-
const rowDlg = () => { const g = document.querySelector('#dlg'); return g.classList.contains('on') && (!document.body.classList.contains('cz-dock') || !!g.querySelector('#iTog')); };
|
|
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');
|
|
73
79
|
const dlgOn = (p) => until(() => p.evaluate(rowDlg));
|
|
74
80
|
const dlgOff = (p) => until(() => p.evaluate(rowDlg).then((x) => !x));
|
|
75
|
-
/*
|
|
76
|
-
const showKey = (p, key) => p.evaluate((key) => { const has = () => document.querySelector(
|
|
77
|
-
const qTab = async (p
|
|
78
|
-
/* Escape closes the fields sheet first, then the
|
|
79
|
-
const escAll = async (p) => { await p.keyboard.press('Escape'); if (await p.evaluate(
|
|
80
|
-
const openKey = async (p, key) => { await showKey(p, key); await p.locator(`.wrow[data-key="${key}"] .wrh`).first().click(); await dlgOn(p); await sleep(
|
|
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); };
|
|
81
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); };
|
|
82
88
|
|
|
83
89
|
const A = await open();
|
|
@@ -88,17 +94,17 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
88
94
|
const wait = async (fn) => until(fn, 5000);
|
|
89
95
|
|
|
90
96
|
/* W6 Focus: one quiet chip in the Work queue head; Accept and Not today are in its dialog (premium-calmer-first-screen) */
|
|
91
|
-
const bar = await p.evaluate(() => { const b = document.querySelector('#xFocus .xfq'); return { say: b.getAttribute('aria-label'), text: b.textContent, inHead: !!b.closest('
|
|
92
|
-
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));
|
|
93
99
|
ok('W6 the suggested item\'s row carries a quiet "Suggested focus" tag', bar.tag.join() === 'work:item-bbbbbbbbbbb2', JSON.stringify(bar));
|
|
94
|
-
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);
|
|
95
101
|
await p.locator('[data-fx="acc"][data-k="job:job-1"]').click();
|
|
96
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'
|
|
97
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()));
|
|
98
104
|
await undoOf(p);
|
|
99
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()));
|
|
100
|
-
const fd = await p.evaluate(() => ({ title: document.querySelector('#
|
|
101
|
-
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));
|
|
102
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; }));
|
|
103
109
|
await p.fill('#xjIn', 'when a launch slips, I want the owner named, so the date holds');
|
|
104
110
|
ok('W6 …and turns on when it has all three', await p.evaluate(() => !document.querySelector('[data-fx="jadd"]').disabled));
|
|
@@ -112,7 +118,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
112
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: [] }; });
|
|
113
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) }));
|
|
114
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));
|
|
115
|
-
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);
|
|
116
122
|
await R.page.click('[data-fx="clr"]');
|
|
117
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()));
|
|
118
124
|
await R.ctx.close(); }
|
|
@@ -141,7 +147,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
141
147
|
const sbtn = await txt('[data-p="xt"][data-k="steps"]');
|
|
142
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);
|
|
143
149
|
await field(p, 'steps');
|
|
144
|
-
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)) }));
|
|
145
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));
|
|
146
152
|
A.replies['/api/pm-items/steps/who'] = { ok: true, who: 'agent-drafts', forced: true };
|
|
147
153
|
await p.click('[data-p="xwho"][data-sid="step-2"][data-v="agent-does"]');
|
|
@@ -149,16 +155,16 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
149
155
|
await p.fill('#xsIn', 'Book the room');
|
|
150
156
|
await p.click('[data-p="xsadd"]');
|
|
151
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()));
|
|
152
|
-
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)));
|
|
153
159
|
const n1 = pc(); await p.click('[data-p="xsadd"]'); await sleep(250);
|
|
154
160
|
ok('W3 Add with no text posts nothing', pc() === n1);
|
|
155
161
|
await p.keyboard.press('Escape');
|
|
156
|
-
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'))));
|
|
157
163
|
await escAll(p);
|
|
158
164
|
|
|
159
165
|
/* W4 Not before */
|
|
160
166
|
await openKey(p, 'work:item-ccccccccccc1');
|
|
161
|
-
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)));
|
|
162
168
|
await more(p); await p.click('[data-p="xt"][data-k="defer"]');
|
|
163
169
|
const dq = await p.evaluate(() => [...document.querySelectorAll('[data-p="xdq"]')].map((b) => [b.textContent, b.dataset.v].join('=')));
|
|
164
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());
|
|
@@ -193,7 +199,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
193
199
|
await p.fill('#agAsk', 'Draft your reply: partial refunds, short');
|
|
194
200
|
await p.click('[data-p="ag-brief"]');
|
|
195
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()));
|
|
196
|
-
ok('W7 the
|
|
202
|
+
ok('W7 the item stays open', await p.evaluate(() => !!document.querySelector('#czViewer:not([hidden]) .mw-it')));
|
|
197
203
|
await escAll(p);
|
|
198
204
|
await openKey(p, 'work:item-bbbbbbbbbbb3');
|
|
199
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'));
|
|
@@ -209,7 +215,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
209
215
|
/* W7 a ready draft: nothing is posted before the confirm */
|
|
210
216
|
const RD = await open({ model: mk((v) => { v.work.today[0].origin = 'jira'; v.work.today[0].place = null; }) }), q = RD.page;
|
|
211
217
|
await openKey(q, 'work:wbs:alpha:4.2');
|
|
212
|
-
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"]') }));
|
|
213
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));
|
|
214
220
|
const m0 = RD.posts.length; await q.click('[data-p="ag-post"]'); await sleep(300);
|
|
215
221
|
const cf = await q.evaluate(() => ({ text: document.querySelector('.xcon').textContent, btn: [...document.querySelectorAll('.xcon button')].map((b) => b.textContent.trim()) }));
|
|
@@ -242,12 +248,12 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
242
248
|
{ const R = await open(); await openKey(R.page, 'work:item-bbbbbbbbbbb2');
|
|
243
249
|
R.refuse({ status: 409, body: { ok: false, error: 'the draft moved on while you read it' } });
|
|
244
250
|
await more(R.page); await R.page.click('[data-p="xt"][data-k="someday"]'); await sleep(500);
|
|
245
|
-
const e = await R.page.evaluate(() => ({ open: document.querySelector('#
|
|
246
|
-
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));
|
|
247
253
|
await R.ctx.close(); }
|
|
248
254
|
|
|
249
255
|
/* W8 keys */
|
|
250
|
-
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();
|
|
251
257
|
const desc = await p.evaluate(() => document.activeElement.getAttribute('aria-description'));
|
|
252
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);
|
|
253
259
|
await p.keyboard.press('j');
|
|
@@ -255,32 +261,32 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
255
261
|
await p.keyboard.press('ArrowRight');
|
|
256
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()));
|
|
257
263
|
await sleep(300);
|
|
258
|
-
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');
|
|
259
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()));
|
|
260
266
|
await sleep(300);
|
|
261
|
-
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');
|
|
262
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()));
|
|
263
269
|
await sleep(300);
|
|
264
|
-
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');
|
|
265
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()));
|
|
266
272
|
await sleep(300);
|
|
267
|
-
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);
|
|
268
274
|
ok('W8 a Someday row has no left action, and posts nothing', pc() === n2);
|
|
269
|
-
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);
|
|
270
276
|
ok('W8 a Waiting row has no arrow actions, and posts nothing', pc() === n2);
|
|
271
|
-
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();
|
|
272
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'))));
|
|
273
279
|
await p.keyboard.press('ArrowRight'); await dlgOn(p);
|
|
274
|
-
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');
|
|
275
281
|
await escAll(p);
|
|
276
282
|
{ const r = await open(); const t = r.page;
|
|
277
|
-
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');
|
|
278
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()));
|
|
279
285
|
await r.ctx.close(); }
|
|
280
286
|
|
|
281
287
|
/* W8 swipe */
|
|
282
288
|
const drag = async (pg, key, dx, hold = false) => {
|
|
283
|
-
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
|
|
284
290
|
const b = await loc.boundingBox(); const y = b.y + b.height / 2, x = b.x + b.width / 2;
|
|
285
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 });
|
|
286
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; });
|
|
@@ -294,7 +300,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
294
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]));
|
|
295
301
|
const s3 = await drag(t, 'work:item-bbbbbbbbbbb3', -130); await sleep(300);
|
|
296
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()]));
|
|
297
|
-
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);
|
|
298
304
|
ok('W8 an ordinary click still opens the row and posts nothing', r.posts.length === n4);
|
|
299
305
|
await r.ctx.close(); }
|
|
300
306
|
{ const r = await open({ rm: true }); const t = r.page;
|
|
@@ -317,16 +323,16 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
317
323
|
const R = await open({ w: 390, h: 844, theme }), q2 = R.page;
|
|
318
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)) }; });
|
|
319
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));
|
|
320
|
-
await openKey(q2, 'work:item-bbbbbbbbbbb2');
|
|
326
|
+
await openKey(q2, 'work:item-bbbbbbbbbbb2');
|
|
321
327
|
const g = {};
|
|
322
328
|
for (const k of ['edit', 'steps', 'defer']) {
|
|
323
329
|
await more(q2); await q2.click(`[data-p="xt"][data-k="${k}"]`); await sleep(150);
|
|
324
|
-
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)) }));
|
|
325
331
|
}
|
|
326
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));
|
|
327
333
|
await escAll(q2);
|
|
328
|
-
await showKey(R.page, 'work:wbs:alpha:4.2'); await R.page.locator('
|
|
329
|
-
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()) }));
|
|
330
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));
|
|
331
337
|
await R.ctx.close();
|
|
332
338
|
}
|
|
@@ -340,10 +346,13 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
340
346
|
pg.on('pageerror', (e) => errs.push(String(e)));
|
|
341
347
|
const get = (u) => fetch(BASE + u).then((r) => r.json());
|
|
342
348
|
await pg.goto(BASE + '/premium-work.html');
|
|
343
|
-
// re-pointed for premium-agreed-design: /premium-work.html opens Home
|
|
344
|
-
|
|
345
|
-
await pg.
|
|
346
|
-
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);
|
|
347
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"]');
|
|
348
357
|
await dlgOff(pg);
|
|
349
358
|
let it = (await get('/api/pm-items')).items.find((i) => /SSO beta/.test(i.title));
|
|
@@ -351,7 +360,7 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
351
360
|
await undoOf(pg, true); await sleep(300);
|
|
352
361
|
it = (await get('/api/pm-items')).items.find((i) => i.id === it.id);
|
|
353
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));
|
|
354
|
-
await pg.locator('
|
|
363
|
+
await pg.locator('.mw-list .wrh').first().click(); await dlgOn(pg); await sleep(300);
|
|
355
364
|
await more(pg); await pg.click('[data-p="xt"][data-k="steps"]');
|
|
356
365
|
await pg.fill('#xsIn', 'Send the SSO plan to Rina'); await pg.click('[data-p="xsadd"]');
|
|
357
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));
|
|
@@ -365,20 +374,19 @@ const mk = (edit) => { const v = F.view(); if (edit) edit(v); return WP.build({
|
|
|
365
374
|
await undoOf(pg, true); await sleep(300);
|
|
366
375
|
it = (await get('/api/pm-items')).items.find((i) => i.id === it.id);
|
|
367
376
|
ok('E7 Undo clears it', !it.defer, JSON.stringify(it));
|
|
368
|
-
await pg.locator('.
|
|
369
|
-
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);
|
|
370
378
|
await more(pg); await pg.click('[data-p="xt"][data-k="someday"]'); await dlgOff(pg);
|
|
371
379
|
ok('E8 Someday parks the real record', (await get('/api/pm-items')).work.someday.some((i) => i.id === it.id));
|
|
372
380
|
await undoOf(pg, true); await sleep(300);
|
|
373
381
|
ok('E9 Undo brings it back (unpark)', !(await get('/api/pm-items')).work.someday.some((i) => i.id === it.id));
|
|
374
|
-
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);
|
|
375
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));
|
|
376
|
-
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);
|
|
377
385
|
await pg.locator('[data-fx="acc"]').first().click();
|
|
378
|
-
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
|
|
379
|
-
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);
|
|
380
388
|
await pg.fill('#xjIn', 'when a launch slips, I want the owner named, so the date holds'); await pg.click('[data-fx="jadd"]');
|
|
381
|
-
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));
|
|
382
390
|
await pg.click('[data-fx="clr"]');
|
|
383
391
|
ok('E13 Clear forgets today\'s accept', await until(async () => (await get('/api/pm-items')).focus.accepted.length === 0, 8000));
|
|
384
392
|
const hdr = await T.pressHeaders(BASE);
|