create-pmos 0.843.0 → 0.845.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.
@@ -109,7 +109,8 @@ const back = (p) => p.evaluate(() => { const b = document.querySelector('#czView
109
109
  const n0 = H.posts.length;
110
110
  await hp.click(`${V} [data-iv-check="t1"]`);
111
111
  ok('T3 the check box saves Done and opens nothing', await until(() => H.posts.slice(n0).some((x) => x.path === '/api/boards/tasks/state' && x.body.task === 't1' && x.body.state === 'Done'), 5000)
112
- && await hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V), JSON.stringify(H.posts.slice(n0)));
112
+ && await until(() => hp.evaluate((v) => !!document.querySelector(v + ' [data-hi-v="page"]'), V), 15000), // the save reloads and redraws the page: a slow runner can look mid-redraw
113
+ await hp.evaluate((v) => JSON.stringify({ open: !!(window.czViewer && window.czViewer.isOpen && window.czViewer.isOpen()), cur: window.czViewer && window.czViewer.current && (window.czViewer.current() || {}).kind, shown: !!document.querySelector(v), hv: [...document.querySelectorAll('#czViewer [data-hi-v]')].map((e) => e.getAttribute('data-hi-v')), url: location.href.slice(-120) }), V).catch((e) => String(e)) + ' ' + JSON.stringify(H.posts.slice(n0)));
113
114
  ok('T0 no page error on Home', H.errors.length === 0, H.errors.join(' | '));
114
115
  await H.ctx.close();
115
116
 
@@ -514,14 +514,15 @@ const everyPart = async (pg) => { await pg.waitForSelector('#czViewer .pw-ph', {
514
514
  ok('H8 Undo moves it back the same way', !!a2 && a2.key === 'MSD-4376' && a2.to === 'Done' && a2.from === 'In progress' && a2.fromRaw === 'In Review', JSON.stringify(a2));
515
515
  const n0 = J.posts.filter((x) => x.path === '/api/boards/tasks/state').length;
516
516
  await j.dragAndDrop('#czViewer [data-ivk-jira="MSD-4377"]', '#czViewer .ivk-w');
517
- await sleep(300);
518
- const w1 = await j.evaluate(() => (document.querySelector('#bdToast') || {}).textContent || '');
517
+ // a wait, not 300 ms: under load the Undo toast above was still showing when the drop's own line was read (CI, 2026-11-25)
518
+ const w1 = (await until(() => j.evaluate(() => { const t = (document.querySelector('#bdToast') || {}).textContent || ''; return /moves to To do, In progress or Done/.test(t) ? t : null; }), 10000))
519
+ || await j.evaluate(() => (document.querySelector('#bdToast') || {}).textContent || '');
519
520
  ok('H8 a Jira card dropped on Won\'t do asks nothing and says so', asks.length === 2 && /moves to To do, In progress or Done/.test(w1) && J.posts.filter((x) => x.path === '/api/boards/tasks/state').length === n0, JSON.stringify({ n: asks.length, w1 }));
520
521
  // the List: the status press beside the Jira square offers three states and says the pick moves the ticket in Jira
521
522
  await sheetPick(j, 'view', 'list');
522
- await until(() => j.evaluate(() => !!document.querySelector('#czViewer [data-iv-jstat="MSD-4377"]')));
523
+ await until(() => j.evaluate(() => !!document.querySelector('#czViewer [data-iv-jstat="MSD-4377"]')), 20000);
523
524
  await j.click('#czViewer [data-iv-jstat="MSD-4377"]');
524
- const pop = await until(() => j.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivq-st.jq'); return q ? { st: [...q.querySelectorAll('[data-ivq-state]')].map((b) => b.dataset.ivqState).join('|'), on: (q.querySelector('[aria-checked="true"]') || {}).textContent, line: (q.querySelector('.ivq-jn') || {}).textContent } : null; }));
525
+ const pop = await until(() => j.evaluate(() => { const q = document.querySelector('.tkc.ivq .ivq-st.jq'); return q ? { st: [...q.querySelectorAll('[data-ivq-state]')].map((b) => b.dataset.ivqState).join('|'), on: (q.querySelector('[aria-checked="true"]') || {}).textContent, line: (q.querySelector('.ivq-jn') || {}).textContent } : null; }), 20000);
525
526
  ok('H8 List: a Jira row\'s status press: To do, In progress, Done; "Moves MSD-4377 in Jira"', !!pop && pop.st === 'To do|In progress|Done' && pop.on === 'In progress' && pop.line === 'Moves MSD-4377 in Jira', JSON.stringify(pop));
526
527
  await j.click('.tkc.ivq .ivq-st.jq [data-ivq-state="Done"]');
527
528
  const a3 = await until(() => asks[2]);
@@ -0,0 +1,9 @@
1
+ {
2
+ "_comment": "initiative tb-sprint-balanced (jobs #2018 tb-sprint-summary, #2016 tb-backlog-sprint-cols; board TbSprint, Exploring 3 page balanced): the Summary card, the strip, Ticket and Epic columns, pmos sprint now. Pure: page modules imported, lib/sprint-now.js on readings in memory, the CLI on a stand-in server.",
3
+ "modules": [
4
+ "test/tb-sprint-balanced.test.js"
5
+ ],
6
+ "seconds": {
7
+ "test/tb-sprint-balanced.test.js": 1
8
+ }
9
+ }
@@ -47,7 +47,8 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
47
47
  page.on('pageerror', (e) => S.errors.push(String((e && e.message) || e)));
48
48
  await page.route('**/api/briefing-premium*', (r) => r.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ ok: true, state: 'ready', model: B.build(F.facts()), as_of: Date.now() }) }));
49
49
  await page.goto(BASE + '/today.html?theme=light');
50
- S.up = await until(() => page.evaluate(() => document.querySelectorAll('#hmList .hm-r').length > 0 && !!window.czViewer), 20000);
50
+ S.up = await until(() => page.evaluate(() => document.querySelectorAll('#hmList .hm-r').length > 0 && !!window.czViewer), 60000); // a cold CI runner can take over 20 s to draw Home's first rows
51
+ if (!S.up) S.seen = await page.evaluate(() => JSON.stringify({ list: !!document.querySelector('#hmList'), rows: document.querySelectorAll('#hmList .hm-r').length, vw: !!window.czViewer, text: ((document.querySelector('#hmList') || document.body).textContent || '').replace(/\s+/g, ' ').slice(0, 200) })).catch((e) => String(e));
51
52
  await page.evaluate(() => {
52
53
  const item = (x) => ({ id: 't:' + x, kind: 'Ticket', title: 'Item ' + x, icon: 'jira',
53
54
  html: `<p>${x}</p>${['A', 'B', 'C', 'D', 'E'].filter((y) => y !== x).map((y) => `<button type="button" data-tgo="${y}">${y}</button>`).join('')}` });
@@ -69,7 +70,7 @@ process.on('unhandledRejection', (e) => { console.error(e); finish(1); });
69
70
 
70
71
  {
71
72
  const { page, ctx, S } = await open();
72
- ok('0 Home loads with the Viewer', S.up);
73
+ ok('0 Home loads with the Viewer', S.up, S.seen);
73
74
  const len0 = await page.evaluate(() => history.length), s0 = (await st(page)).s; // the page's own entry (Home may draw its day in the Viewer)
74
75
  let s = await press(page, 'A', false);
75
76
  ok('N a press on the page opens a new trail: on a desk no ← at its first item', s && s.back === null && s.fwd === null && s.h === 0 && s.len === len0 + 1, JSON.stringify(s));