create-pmos 0.399.0 → 0.400.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 +18 -13
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/briefing-premium-adddoc-test.js +2 -2
- package/workspace/briefing-premium-board-test.js +2 -2
- package/workspace/briefing-premium-doc-edit-test.js +2 -8
- package/workspace/briefing-premium-test.js +3 -2
- package/workspace/briefing-premium-work-test.js +9 -4
- package/workspace/c3-capture-test.js +0 -17
- package/workspace/changelog.json +17 -0
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/guide/home.md +20 -2
- package/workspace/guide/layout.md +2 -2
- package/workspace/guide/notes.md +2 -2
- package/workspace/guide/phone-companion.md +1 -1
- package/workspace/lib/route-modules.js +1 -9
- package/workspace/lib/routes-phone-day.js +18 -9
- package/workspace/lib/routes-slash.js +95 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -2
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-term-test.js +0 -10
- package/workspace/premium-menu-rows-test.js +1 -1
- package/workspace/premium-phone-card-test.js +2 -2
- package/workspace/premium-vw-doc-test.js +1 -8
- package/workspace/premium-work-depth-test.js +2 -3
- package/workspace/public/capture.html +23 -0
- package/workspace/public/pm/c3-base.js +47 -0
- package/workspace/public/pm/c3-capture.js +1 -1
- package/workspace/public/pm/c3-ini-ui.js +1 -1
- package/workspace/public/pm/c3-sheet.js +1 -1
- package/workspace/public/pm/c3-toast.js +1 -1
- package/workspace/public/pm/console3.css +3 -0
- package/workspace/public/pm/cozy-home.css +20 -5
- package/workspace/public/pm/cozy-today.css +5 -2
- package/workspace/public/pm/cozy-viewer.js +4 -2
- package/workspace/public/pm/cozy.css +9 -0
- package/workspace/public/pm/goal-chat.js +5 -1
- package/workspace/public/pm/home-app.js +47 -26
- package/workspace/public/pm/home-chat.js +10 -4
- package/workspace/public/pm/home-data.js +3 -1
- package/workspace/public/pm/home-dictate.js +7 -4
- package/workspace/public/pm/home-ini.js +12 -2
- package/workspace/public/pm/home-list.js +20 -7
- package/workspace/public/pm/home-more.js +2 -2
- package/workspace/public/pm/home-phone-card.js +9 -4
- package/workspace/public/pm/home-review.js +2 -3
- package/workspace/public/pm/home-today.js +10 -6
- package/workspace/public/pm/home-work.js +15 -8
- package/workspace/public/pm/note-dock.js +1 -2
- package/workspace/public/pm/notes-links.js +1 -2
- package/workspace/public/pm/notes-task.js +3 -4
- package/workspace/public/pm/premium-board.js +1 -1
- package/workspace/public/pm/premium-initiative-head.js +3 -3
- package/workspace/public/pm/premium-vw-doc.css +20 -2
- package/workspace/public/pm/premium-vw-doc.js +22 -7
- package/workspace/public/pm/view-notes.js +2 -2
- package/workspace/replaced-tests.json +435 -0
- package/workspace/run-tests.js +323 -28
- package/workspace/server.js +15 -10
- package/workspace/test-files.json +3 -140
- package/workspace/test-lists/base.json +1 -2
- package/workspace/test-lists/c3-desktop-light-load.json +1 -2
- package/workspace/test-lists/c3-initiative-boards.json +1 -2
- package/workspace/test-lists/c3-meeting-focus.json +2 -12
- package/workspace/test-lists/c3-work-agent.json +1 -2
- package/workspace/test-lists/calendar-tidy-up.json +1 -2
- package/workspace/test-lists/console3-reports.json +1 -2
- package/workspace/test-lists/docs-three-way-sync.json +1 -2
- package/workspace/test-lists/extension-capture.json +5 -0
- package/workspace/test-lists/jira-wbs.json +1 -2
- package/workspace/test-lists/legacy-cleanup-a.json +9 -0
- package/workspace/test-lists/meeting-material.json +1 -2
- package/workspace/test-lists/meeting-notes.json +2 -36
- package/workspace/test-lists/meeting-replay.json +1 -2
- package/workspace/test-lists/mm-capture.json +2 -12
- package/workspace/test-lists/my-work.json +2 -10
- package/workspace/test-lists/onboarding-firstrun.json +2 -12
- package/workspace/test-lists/people-directory.json +1 -2
- package/workspace/test-lists/run2-a.json +1 -2
- package/workspace/test-lists/run2-d.json +2 -19
- package/workspace/test-lists/run3-b.json +1 -2
- package/workspace/test-lists/run3-c.json +2 -12
- package/workspace/test-lists/run4-b.json +1 -2
- package/workspace/test-lists/run4-d.json +1 -5
- package/workspace/test-lists/run5-c.json +1 -11
- package/workspace/test-lists/run6.json +1 -5
- package/workspace/test-lists/workspace-launch-flags.json +2 -12
- package/workspace/test-lists/workspace-profile-detection.json +2 -10
- package/workspace/test-timings.json +242 -123
- package/workspace/c3-briefing-test.js +0 -136
- package/workspace/c3-core-docs-test.js +0 -170
- package/workspace/c3-driver-fixture.js +0 -64
- package/workspace/c3-driver-test.js +0 -169
- package/workspace/c3-foundation-test.js +0 -163
- package/workspace/c3-ib-items-test.js +0 -114
- package/workspace/c3-ib-more-test.js +0 -146
- package/workspace/c3-ib-triage-backlog-test.js +0 -128
- package/workspace/c3-ini-harness.js +0 -66
- package/workspace/c3-ini-life-test.js +0 -167
- package/workspace/c3-initiatives-test.js +0 -186
- package/workspace/c3-light-load-test.js +0 -112
- package/workspace/c3-one-home-test.js +0 -149
- package/workspace/c3-phone-test.js +0 -289
- package/workspace/c3-quiet-test.js +0 -157
- package/workspace/c3-report-design-real-test.js +0 -264
- package/workspace/c3-report-design-test.js +0 -442
- package/workspace/c3-report-setup-test.js +0 -192
- package/workspace/c3-report-structure-real-test.js +0 -248
- package/workspace/c3-report-structure-test.js +0 -397
- package/workspace/c3-reports-test.js +0 -288
- package/workspace/c3-scan-test.js +0 -517
- package/workspace/c3-sessions-panel-test.js +0 -365
- package/workspace/c3-settings-test.js +0 -204
- package/workspace/c3-updates-test.js +0 -131
- package/workspace/c3-work-test.js +0 -260
- package/workspace/cut-stub.js +0 -40
- package/workspace/first-paint-audit.js +0 -160
- package/workspace/lib/c3-full-console.js +0 -15
- package/workspace/lib/engine/derived/trust.js +0 -3
- package/workspace/lib/engine/plan-forecast.js +0 -342
- package/workspace/lib/engine/report-families.js +0 -175
- package/workspace/lib/engine/truth-table.js +0 -57
- package/workspace/lib/routes-c3-init.js +0 -54
- package/workspace/lib/routes-c3-life.js +0 -120
- package/workspace/lib/routes-c3-timeline.js +0 -192
- package/workspace/lib/routes-forecast.js +0 -86
- package/workspace/lib/routes-releases.js +0 -130
- package/workspace/lib/routes-report-facts.js +0 -85
- package/workspace/lib/routes-report-families.js +0 -33
- package/workspace/lib/routes-signals.js +0 -51
- package/workspace/lib/routes-timeline.js +0 -197
- package/workspace/public/c3.html +0 -35
- package/workspace/public/index.html +0 -156
- package/workspace/public/pm/app.js +0 -831
- package/workspace/public/pm/bd-board.js +0 -159
- package/workspace/public/pm/bd-drag.js +0 -59
- package/workspace/public/pm/bd-model.js +0 -152
- package/workspace/public/pm/bd-timeline.js +0 -233
- package/workspace/public/pm/bd-tree.js +0 -244
- package/workspace/public/pm/board-copy.js +0 -59
- package/workspace/public/pm/board-read.js +0 -38
- package/workspace/public/pm/branches-sheet.js +0 -56
- package/workspace/public/pm/breakdown-api.js +0 -58
- package/workspace/public/pm/breakdown-copy.js +0 -138
- package/workspace/public/pm/briefing-deck.js +0 -441
- package/workspace/public/pm/briefing-model.js +0 -251
- package/workspace/public/pm/c3-ambient.js +0 -100
- package/workspace/public/pm/c3-audience-link.js +0 -21
- package/workspace/public/pm/c3-audience.js +0 -46
- package/workspace/public/pm/c3-boot.js +0 -13
- package/workspace/public/pm/c3-breakdown.js +0 -240
- package/workspace/public/pm/c3-brief-data.js +0 -11
- package/workspace/public/pm/c3-brief-mentions.js +0 -137
- package/workspace/public/pm/c3-brief-needs.js +0 -288
- package/workspace/public/pm/c3-brief-pulse.js +0 -112
- package/workspace/public/pm/c3-brief-summary.js +0 -139
- package/workspace/public/pm/c3-brief-today.js +0 -79
- package/workspace/public/pm/c3-brief.js +0 -279
- package/workspace/public/pm/c3-cal-strategy.js +0 -529
- package/workspace/public/pm/c3-calendar.js +0 -965
- package/workspace/public/pm/c3-calpop.js +0 -111
- package/workspace/public/pm/c3-case.js +0 -196
- package/workspace/public/pm/c3-core-docs.css +0 -18
- package/workspace/public/pm/c3-core-docs.js +0 -236
- package/workspace/public/pm/c3-daypart.js +0 -176
- package/workspace/public/pm/c3-demo-boards.js +0 -764
- package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
- package/workspace/public/pm/c3-demo-brief-page.js +0 -70
- package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
- package/workspace/public/pm/c3-demo-cal2.js +0 -66
- package/workspace/public/pm/c3-demo-cal3.js +0 -173
- package/workspace/public/pm/c3-demo-cal4.js +0 -169
- package/workspace/public/pm/c3-demo-cal5.js +0 -52
- package/workspace/public/pm/c3-demo-coredocs.js +0 -221
- package/workspace/public/pm/c3-demo-data.js +0 -552
- package/workspace/public/pm/c3-demo-focus.js +0 -181
- package/workspace/public/pm/c3-demo-init.js +0 -430
- package/workspace/public/pm/c3-demo-life.js +0 -77
- package/workspace/public/pm/c3-demo-material.js +0 -58
- package/workspace/public/pm/c3-demo-misc2.js +0 -34
- package/workspace/public/pm/c3-demo-phone.js +0 -48
- package/workspace/public/pm/c3-demo-plan2.js +0 -30
- package/workspace/public/pm/c3-demo-rd.js +0 -432
- package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
- package/workspace/public/pm/c3-demo-rep2.js +0 -130
- package/workspace/public/pm/c3-demo-rep3.js +0 -138
- package/workspace/public/pm/c3-demo-rs.js +0 -287
- package/workspace/public/pm/c3-demo-term.js +0 -153
- package/workspace/public/pm/c3-demo-time.js +0 -49
- package/workspace/public/pm/c3-demo-work-ix.js +0 -32
- package/workspace/public/pm/c3-demo.js +0 -131
- package/workspace/public/pm/c3-design-studio.js +0 -369
- package/workspace/public/pm/c3-doc-formats.js +0 -153
- package/workspace/public/pm/c3-doc-sheet.js +0 -1230
- package/workspace/public/pm/c3-dock.js +0 -206
- package/workspace/public/pm/c3-docs.js +0 -291
- package/workspace/public/pm/c3-driver-work.js +0 -110
- package/workspace/public/pm/c3-driver.css +0 -18
- package/workspace/public/pm/c3-driver.js +0 -298
- package/workspace/public/pm/c3-focus.css +0 -304
- package/workspace/public/pm/c3-focus.js +0 -983
- package/workspace/public/pm/c3-ib-docs.js +0 -92
- package/workspace/public/pm/c3-ib-initiatives.js +0 -201
- package/workspace/public/pm/c3-ib-items.js +0 -210
- package/workspace/public/pm/c3-ib-releases.js +0 -48
- package/workspace/public/pm/c3-ib-sprints.js +0 -201
- package/workspace/public/pm/c3-ib-triage.js +0 -177
- package/workspace/public/pm/c3-ii-tabs.js +0 -252
- package/workspace/public/pm/c3-ini-life.css +0 -34
- package/workspace/public/pm/c3-ini-life.js +0 -379
- package/workspace/public/pm/c3-ini-records.js +0 -197
- package/workspace/public/pm/c3-ini-timeline.js +0 -278
- package/workspace/public/pm/c3-ini-work.js +0 -139
- package/workspace/public/pm/c3-init-extras.js +0 -170
- package/workspace/public/pm/c3-initiatives.js +0 -852
- package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
- package/workspace/public/pm/c3-look.js +0 -27
- package/workspace/public/pm/c3-material.css +0 -22
- package/workspace/public/pm/c3-material.js +0 -321
- package/workspace/public/pm/c3-md.js +0 -3
- package/workspace/public/pm/c3-misc-panels.js +0 -89
- package/workspace/public/pm/c3-new-session.js +0 -110
- package/workspace/public/pm/c3-notes.js +0 -751
- package/workspace/public/pm/c3-phone-boot.js +0 -47
- package/workspace/public/pm/c3-phone-detail.js +0 -97
- package/workspace/public/pm/c3-phone-model.js +0 -3
- package/workspace/public/pm/c3-phone.css +0 -66
- package/workspace/public/pm/c3-phone.js +0 -444
- package/workspace/public/pm/c3-plan-panels.js +0 -163
- package/workspace/public/pm/c3-plan.js +0 -193
- package/workspace/public/pm/c3-quiet.css +0 -113
- package/workspace/public/pm/c3-quiet.js +0 -177
- package/workspace/public/pm/c3-replay.css +0 -133
- package/workspace/public/pm/c3-replay.js +0 -429
- package/workspace/public/pm/c3-report-deck.css +0 -163
- package/workspace/public/pm/c3-report-deck.js +0 -598
- package/workspace/public/pm/c3-report-frame.css +0 -20
- package/workspace/public/pm/c3-report-print.css +0 -20
- package/workspace/public/pm/c3-report-setup.css +0 -67
- package/workspace/public/pm/c3-report-setup.js +0 -298
- package/workspace/public/pm/c3-report-store.js +0 -244
- package/workspace/public/pm/c3-report-structure.css +0 -44
- package/workspace/public/pm/c3-report-structure.js +0 -473
- package/workspace/public/pm/c3-reports.css +0 -68
- package/workspace/public/pm/c3-reports.js +0 -377
- package/workspace/public/pm/c3-roadmap.js +0 -249
- package/workspace/public/pm/c3-scan-api.js +0 -167
- package/workspace/public/pm/c3-scan-next.js +0 -248
- package/workspace/public/pm/c3-scan-setup.js +0 -313
- package/workspace/public/pm/c3-scan-words.js +0 -41
- package/workspace/public/pm/c3-scan.css +0 -74
- package/workspace/public/pm/c3-scan.js +0 -93
- package/workspace/public/pm/c3-session-chat.js +0 -103
- package/workspace/public/pm/c3-session-conv.js +0 -165
- package/workspace/public/pm/c3-session-term.js +0 -216
- package/workspace/public/pm/c3-settings.css +0 -85
- package/workspace/public/pm/c3-settings.js +0 -1045
- package/workspace/public/pm/c3-shell.js +0 -628
- package/workspace/public/pm/c3-signals.js +0 -196
- package/workspace/public/pm/c3-strategy-panels.js +0 -45
- package/workspace/public/pm/c3-swipe.js +0 -230
- package/workspace/public/pm/c3-terminal-data.js +0 -48
- package/workspace/public/pm/c3-terminal-edge.js +0 -91
- package/workspace/public/pm/c3-terminal-icons.js +0 -40
- package/workspace/public/pm/c3-terminal-results.js +0 -141
- package/workspace/public/pm/c3-terminal.js +0 -52
- package/workspace/public/pm/c3-tickets.js +0 -163
- package/workspace/public/pm/c3-timeline.js +0 -201
- package/workspace/public/pm/calendar-views.js +0 -1049
- package/workspace/public/pm/console3-lift.md +0 -220
- package/workspace/public/pm/cozy-home.js +0 -172
- package/workspace/public/pm/cozy-initiative.css +0 -138
- package/workspace/public/pm/cycle-review.js +0 -125
- package/workspace/public/pm/data.js +0 -1577
- package/workspace/public/pm/dest-board.js +0 -444
- package/workspace/public/pm/dest-docs.js +0 -530
- package/workspace/public/pm/dest-initiatives.js +0 -162
- package/workspace/public/pm/dest-mywork.js +0 -307
- package/workspace/public/pm/dest-notes.js +0 -537
- package/workspace/public/pm/dest-people.js +0 -449
- package/workspace/public/pm/dest-reports.js +0 -383
- package/workspace/public/pm/dest-settings.js +0 -601
- package/workspace/public/pm/dest-today.js +0 -267
- package/workspace/public/pm/display-word.js +0 -56
- package/workspace/public/pm/doc-editor.js +0 -473
- package/workspace/public/pm/doc-graph.js +0 -272
- package/workspace/public/pm/doc-health-panel.js +0 -110
- package/workspace/public/pm/doc-rail.js +0 -167
- package/workspace/public/pm/doc-remote.js +0 -180
- package/workspace/public/pm/dock-sessions.js +0 -472
- package/workspace/public/pm/dock.js +0 -216
- package/workspace/public/pm/fixture.js +0 -821
- package/workspace/public/pm/flag-picker.js +0 -104
- package/workspace/public/pm/frame-copy.js +0 -278
- package/workspace/public/pm/freshness-line.js +0 -149
- package/workspace/public/pm/handoff-box.js +0 -82
- package/workspace/public/pm/initiative-list.js +0 -235
- package/workspace/public/pm/initiative-sheet.js +0 -331
- package/workspace/public/pm/initiatives-api.js +0 -95
- package/workspace/public/pm/initiatives-copy.js +0 -287
- package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
- package/workspace/public/pm/initiatives-timeline.js +0 -410
- package/workspace/public/pm/initiatives-ui.js +0 -291
- package/workspace/public/pm/item-sheet.js +0 -268
- package/workspace/public/pm/keep-card.js +0 -204
- package/workspace/public/pm/lifecycle-lens-model.js +0 -246
- package/workspace/public/pm/lifecycle-lens.js +0 -276
- package/workspace/public/pm/lifecycle.js +0 -111
- package/workspace/public/pm/mobile.css +0 -366
- package/workspace/public/pm/mobile.js +0 -581
- package/workspace/public/pm/modes-live.js +0 -453
- package/workspace/public/pm/modes.js +0 -147
- package/workspace/public/pm/my-work-card.js +0 -51
- package/workspace/public/pm/my-work-data.js +0 -36
- package/workspace/public/pm/new-initiative-sheet.js +0 -169
- package/workspace/public/pm/next-step-ui.js +0 -190
- package/workspace/public/pm/outbox-panel.js +0 -125
- package/workspace/public/pm/palette-copy.js +0 -55
- package/workspace/public/pm/palette.js +0 -343
- package/workspace/public/pm/panel-breakdown.js +0 -702
- package/workspace/public/pm/panel-cockpit.js +0 -425
- package/workspace/public/pm/panel-detail.js +0 -1513
- package/workspace/public/pm/panel-initiatives.js +0 -929
- package/workspace/public/pm/panel-newsess.js +0 -709
- package/workspace/public/pm/panel-repos.js +0 -741
- package/workspace/public/pm/panel-tabs.js +0 -1506
- package/workspace/public/pm/panel-trees.js +0 -204
- package/workspace/public/pm/people-link.js +0 -106
- package/workspace/public/pm/phone-deck.js +0 -167
- package/workspace/public/pm/pm-work-view.js +0 -1533
- package/workspace/public/pm/portfolio-report.js +0 -61
- package/workspace/public/pm/premium-acts.js +0 -280
- package/workspace/public/pm/premium-brief.js +0 -111
- package/workspace/public/pm/premium-chat.js +0 -22
- package/workspace/public/pm/premium-doc-sheet.js +0 -312
- package/workspace/public/pm/premium-initiative.js +0 -324
- package/workspace/public/pm/premium-insights.css +0 -228
- package/workspace/public/pm/premium-metric-tiles.js +0 -68
- package/workspace/public/pm/premium-report-brief.js +0 -132
- package/workspace/public/pm/premium-vw-rec.js +0 -67
- package/workspace/public/pm/premium-wide.css +0 -30
- package/workspace/public/pm/print.css +0 -44
- package/workspace/public/pm/provider-cards.js +0 -136
- package/workspace/public/pm/registry.js +0 -203
- package/workspace/public/pm/release-card.js +0 -110
- package/workspace/public/pm/releases-view.js +0 -248
- package/workspace/public/pm/report-families-view.js +0 -505
- package/workspace/public/pm/report-slides.js +0 -438
- package/workspace/public/pm/report-tab.js +0 -33
- package/workspace/public/pm/report-view.js +0 -337
- package/workspace/public/pm/reports-copy.js +0 -134
- package/workspace/public/pm/roadmap.js +0 -294
- package/workspace/public/pm/run-card.js +0 -260
- package/workspace/public/pm/sessions-panel.js +0 -219
- package/workspace/public/pm/sheet-jira.js +0 -353
- package/workspace/public/pm/shell-bell.js +0 -163
- package/workspace/public/pm/shell-model.js +0 -83
- package/workspace/public/pm/shell-phone.js +0 -124
- package/workspace/public/pm/shell-readaloud.js +0 -53
- package/workspace/public/pm/shell-recording.js +0 -274
- package/workspace/public/pm/shell-ticker.js +0 -90
- package/workspace/public/pm/sig-watch.js +0 -41
- package/workspace/public/pm/slide-confirm.js +0 -163
- package/workspace/public/pm/slides-copy.js +0 -52
- package/workspace/public/pm/status-banner.js +0 -95
- package/workspace/public/pm/tab-doc.js +0 -859
- package/workspace/public/pm/tab-gone.js +0 -21
- package/workspace/public/pm/tab-term.js +0 -1210
- package/workspace/public/pm/tab-web.js +0 -90
- package/workspace/public/pm/timeline-copy.js +0 -48
- package/workspace/public/pm/timeline-forecast-view.js +0 -164
- package/workspace/public/pm/today-agenda.js +0 -331
- package/workspace/public/pm/today-cards.js +0 -244
- package/workspace/public/pm/today-copy.js +0 -506
- package/workspace/public/pm/today-day.js +0 -1371
- package/workspace/public/pm/today-goals.js +0 -297
- package/workspace/public/pm/today-jobs.js +0 -84
- package/workspace/public/pm/today-mentions.js +0 -50
- package/workspace/public/pm/topbar.js +0 -202
- package/workspace/public/pm/triage-card.js +0 -60
- package/workspace/public/pm/undo-hold.js +0 -103
- package/workspace/public/pm/view-addrepo.js +0 -208
- package/workspace/public/pm/view-files.js +0 -197
- package/workspace/public/pm/view-livenotes.js +0 -399
- package/workspace/public/pm/view-today.js +0 -13
- package/workspace/public/pm/view-validate.js +0 -171
- package/workspace/public/pm/welcome.js +0 -391
- package/workspace/public/pm/work-place.js +0 -68
- package/workspace/public/pm/xlsx-read.js +0 -117
- package/workspace/public/welcome.html +0 -22
- package/workspace/test-lists/browser-suites-green.json +0 -5
- package/workspace/test-lists/c3-core-docs.json +0 -9
- package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
- package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
- package/workspace/test-lists/c3-ib-items.json +0 -9
- package/workspace/test-lists/c3-ib-more.json +0 -9
- package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
- package/workspace/test-lists/c3-ini-life.json +0 -9
- package/workspace/test-lists/c3-meeting-board.json +0 -5
- package/workspace/test-lists/c3-meeting-card.json +0 -5
- package/workspace/test-lists/c3-notes-place.json +0 -5
- package/workspace/test-lists/c3-notes-series.json +0 -5
- package/workspace/test-lists/calendar-time-page.json +0 -5
- package/workspace/test-lists/calpop.json +0 -4
- package/workspace/test-lists/console3-briefing.json +0 -9
- package/workspace/test-lists/console3-foundation.json +0 -9
- package/workspace/test-lists/console3-work-page.json +0 -9
- package/workspace/test-lists/premium-brief-parity.json +0 -9
- package/workspace/test-lists/report-design-studio-ui.json +0 -5
- package/workspace/test-lists/report-structure-ui.json +0 -11
- package/workspace/test-lists/report-workspace-ui.json +0 -5
- package/workspace/test-lists/run3-a.json +0 -5
- package/workspace/test-lists/run3-d.json +0 -6
- package/workspace/test-lists/run4-c.json +0 -13
- package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
- package/workspace/test-lists/today-mentions-cards.json +0 -5
- package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* PMOS workspace — the Backlog, Board and Timeline tabs of a board on the console3 Initiatives page (mockup v5, 34-initiatives.js
|
|
3
|
-
* tabBacklog, tabBoard and tabTimeline), in demo mode (browser). Jira items and PMOS tasks are mixed: a PMOS task moves (drag or its
|
|
4
|
-
* menu) and reschedules (an arrow key on its bar, with Undo), a Jira item is locked and says so. The Initiative and Source filters
|
|
5
|
-
* are shared by the three tabs; a board with Build and deliver off has no Source filter. Backlog adds a PMOS task. The Timeline has
|
|
6
|
-
* zoom buttons, a Today line and release markers.
|
|
7
|
-
*
|
|
8
|
-
* The files it drives (named so `run-tests.js --changed` traces a change in any of them to this suite): public/pm/c3-ib-items.js,
|
|
9
|
-
* c3-ini-timeline.js, c3-ini-work.js, c3-ini-ui.js, c3-initiatives.js, c3-initiatives.css, c3-demo-boards.js, c3-demo.js, c3-toast.js
|
|
10
|
-
* and c3-ini-harness.js. Its list fragment is test-lists/c3-ib-items.json.
|
|
11
|
-
*/
|
|
12
|
-
'use strict';
|
|
13
|
-
const { harness } = require('./c3-ini-harness');
|
|
14
|
-
|
|
15
|
-
(async () => {
|
|
16
|
-
const H = await harness('c3-ib-items');
|
|
17
|
-
const { page, ok, until, st, open, toast } = H;
|
|
18
|
-
const task = (id) => st((x) => { const t = window.__c3boards.tasks.find((k) => k.id === x); return t ? { state: t.state, start: t.start, due: t.due } : null; }, id);
|
|
19
|
-
const colOf = (uid) => st((u) => { const c = document.querySelector('[data-ini-card="' + u + '"]'); return c ? c.closest('[data-ini-col]').dataset.iniCol : ''; }, uid);
|
|
20
|
-
const waitToast = (re) => until(async () => { const t = await toast(); return re.test(t) && t; });
|
|
21
|
-
|
|
22
|
-
/* ── Board ── */
|
|
23
|
-
await open('board:idpf:board');
|
|
24
|
-
await until(() => st(() => document.querySelectorAll('[data-ini-col]').length === 4));
|
|
25
|
-
const cols = await st(() => [...document.querySelectorAll('[data-ini-col]')].map((c) => c.dataset.iniCol).join(','));
|
|
26
|
-
ok('K1 the Board has one column per item status', cols === 'To do,In progress,In review,Done', cols);
|
|
27
|
-
const mix = await st(() => { const s = [...document.querySelectorAll('[data-ini-card]')].map((c) => c.dataset.src); return s.includes('jira') && s.includes('pmos'); });
|
|
28
|
-
ok('K2 Jira items and PMOS tasks share the columns', mix);
|
|
29
|
-
ok('K3 only a PMOS task has a Move menu', await st(() => !!document.querySelector('[data-ini-card="t-idpf-2"] [data-wk-move]') && !document.querySelector('[data-ini-card="IDPF-1201"] [data-wk-move]')));
|
|
30
|
-
|
|
31
|
-
await page.click('[data-wk-move="t-idpf-2"]');
|
|
32
|
-
await until(() => st(() => !!document.querySelector('[data-wk-state="In review"]')));
|
|
33
|
-
await page.click('[data-wk-state="In review"]');
|
|
34
|
-
await until(async () => (await task('t-idpf-2')).state === 'In review');
|
|
35
|
-
const t4 = await waitToast(/moved to In review/);
|
|
36
|
-
ok('K4 the menu moves a PMOS task, the store records it and the toast says so', !!t4 && await until(async () => (await colOf('t-idpf-2')) === 'In review'), t4);
|
|
37
|
-
|
|
38
|
-
// a real HTML5 drag: the card is scrolled to the middle first (at the bottom edge of the view the press lands on its neighbour), and
|
|
39
|
-
// it is pressed on its own padding (its centre is the title link) and dropped on the column header
|
|
40
|
-
const drag = async (uid, col) => {
|
|
41
|
-
await st((u) => document.querySelector('[data-ini-card="' + u + '"]').scrollIntoView({ block: 'center' }), uid);
|
|
42
|
-
await page.dragAndDrop('[data-ini-card="' + uid + '"]', '[data-ini-col="' + col + '"]', { sourcePosition: { x: 4, y: 20 }, targetPosition: { x: 30, y: 20 } });
|
|
43
|
-
};
|
|
44
|
-
await drag('t-idpf-4', 'Done');
|
|
45
|
-
await until(async () => (await task('t-idpf-4')).state === 'Done');
|
|
46
|
-
ok('K5 a drag to another column moves a PMOS task', (await task('t-idpf-4')).state === 'Done' && await until(async () => (await colOf('t-idpf-4')) === 'Done'));
|
|
47
|
-
|
|
48
|
-
await drag('IDPF-1201', 'In review');
|
|
49
|
-
const t6 = await waitToast(/IDPF-1201 is a Jira item/);
|
|
50
|
-
ok('K6 a Jira item dropped on a column stays put and the toast says it changes in Jira', !!t6 && (await colOf('IDPF-1201')) === 'To do', t6);
|
|
51
|
-
|
|
52
|
-
/* ── shared filters ── */
|
|
53
|
-
ok('F0 the filters are one row: search, the initiative picker and Filters, no initiative or source chips', await st(() => { const bar = document.querySelector('.wk-fbar'); return !!bar && !!bar.querySelector('[data-wk="q"]') && !!bar.querySelector('[data-wk="ini"]') && !!bar.querySelector('[data-wk="filters"]') && !document.querySelector('[data-wk="inis"],[data-wk="srcs"],[data-wk="count"]'); }));
|
|
54
|
-
await page.click('[data-wk="ini"]');
|
|
55
|
-
await page.click('[data-wk-ini="IDPF-21"]');
|
|
56
|
-
await until(() => st(() => /IDPF-21/.test(document.querySelector('[data-wk="ini"]').textContent)));
|
|
57
|
-
const only21 = await st(() => [...document.querySelectorAll('[data-ini-card]')].map((c) => c.dataset.iniCard).join(','));
|
|
58
|
-
ok('F1 the Initiative filter keeps that initiative\'s items', only21 === 't-idpf-3' || /^(t-idpf-3,?)+$/.test(only21) || (only21.length > 0 && await st(() => [...document.querySelectorAll('[data-ini-card] [data-ini-open]')].every((n) => n.dataset.iniOpen === 'IDPF-21'))), only21);
|
|
59
|
-
await page.click('[data-wk="ini"]');
|
|
60
|
-
await page.click('[data-wk-ini=""]');
|
|
61
|
-
await until(() => st(() => /All initiatives/.test(document.querySelector('[data-wk="ini"]').textContent)));
|
|
62
|
-
await page.click('[data-wk="filters"]');
|
|
63
|
-
await page.selectOption('[data-wk="filter-panel"] [data-wk="src"]', 'pmos');
|
|
64
|
-
await until(() => st(() => !!document.querySelector('[data-wk-unset="src"]')));
|
|
65
|
-
await page.keyboard.press('Escape');
|
|
66
|
-
ok('F2 the Source filter keeps PMOS tasks only', await st(() => { const s = [...document.querySelectorAll('[data-ini-card]')].map((c) => c.dataset.src); return s.length > 0 && s.every((x) => x === 'pmos'); }));
|
|
67
|
-
await page.click('[data-ini="board-tabs"] .qt-more'); // Backlog sits behind More, a menu (c3-board-declutter)
|
|
68
|
-
await page.click('[data-qt-more="backlog"]');
|
|
69
|
-
await until(() => st(() => !!document.querySelector('[data-wk-tab="backlog"]')));
|
|
70
|
-
ok('F3 the filters stay on when the tab changes to Backlog', await st(() => /Source: PMOS tasks/.test(document.querySelector('[data-wk-unset="src"]').textContent) && document.querySelector('[data-wk="filters"] .bdg').textContent === '1' && [...document.querySelectorAll('[data-ini-item]')].every((n) => n.dataset.src === 'pmos')));
|
|
71
|
-
await page.click('[data-wk="clear"]');
|
|
72
|
-
ok('F4 Clear turns every filter off', await until(() => st(() => !document.querySelector('[data-wk="chips"]') && !document.querySelector('[data-wk="filters"] .bdg'))));
|
|
73
|
-
|
|
74
|
-
/* ── Backlog: add a PMOS task ── */
|
|
75
|
-
const groups = await st(() => [...document.querySelectorAll('[data-wk-group]')].map((g) => g.dataset.wkGroup).join(','));
|
|
76
|
-
ok('B1 Backlog groups the items by initiative', groups.split(',').length >= 2, groups);
|
|
77
|
-
await page.fill('[data-wk="add-title"]', 'Write the beta FAQ');
|
|
78
|
-
await page.selectOption('[data-wk="add-ini"]', 'IDPF-12');
|
|
79
|
-
await page.click('[data-wk="add-go"]');
|
|
80
|
-
await until(() => st(() => window.__c3boards.tasks.some((t) => t.title === 'Write the beta FAQ' && t.initiative === 'IDPF-12')));
|
|
81
|
-
ok('B2 Add stores a PMOS task on the initiative and shows it in its group', await until(() => st(() => [...document.querySelectorAll('[data-wk-group="IDPF-12"] [data-ini-item]')].some((n) => /Write the beta FAQ/.test(n.textContent)))));
|
|
82
|
-
|
|
83
|
-
/* ── Timeline ── */
|
|
84
|
-
await page.click('[data-ini-tab="timeline"]');
|
|
85
|
-
await until(() => st(() => !!document.querySelector('[data-wk-tab="timeline"] [data-tldrag="t-idpf-1"]')));
|
|
86
|
-
ok('T1 the Timeline draws a Today line and the release markers', await st(() => !!document.querySelector('.ini-tlnow') && document.querySelectorAll('.ini-tlm.release').length > 0));
|
|
87
|
-
ok('T2 PMOS bars can be dragged and Jira bars carry a lock', await st(() => document.querySelectorAll('[data-tldrag]').length > 0 && document.querySelectorAll('[data-tllock]').length > 0));
|
|
88
|
-
const before = await task('t-idpf-1');
|
|
89
|
-
await page.focus('[data-tldrag="t-idpf-1"]');
|
|
90
|
-
await page.keyboard.press('ArrowRight');
|
|
91
|
-
await until(async () => (await task('t-idpf-1')).start !== before.start);
|
|
92
|
-
const after = await task('t-idpf-1');
|
|
93
|
-
const t3 = await waitToast(/Rescheduled/);
|
|
94
|
-
ok('T3 ArrowRight on a PMOS bar moves the task one day and the toast offers Undo', after.start > before.start && after.due > before.due && !!t3 && /Undo/.test(t3), JSON.stringify([before, after, t3]));
|
|
95
|
-
await page.click('[data-c3-toast] button:has-text("Undo")').catch(() => {});
|
|
96
|
-
await until(async () => (await task('t-idpf-1')).start === before.start);
|
|
97
|
-
ok('T4 Undo puts the dates back', (await task('t-idpf-1')).start === before.start);
|
|
98
|
-
await until(() => st(() => !!document.querySelector('[data-tllock="IDPF-1190"]')));
|
|
99
|
-
await page.focus('[data-tllock="IDPF-1190"]');
|
|
100
|
-
await page.keyboard.press('ArrowRight');
|
|
101
|
-
const t5 = await waitToast(/IDPF-1190 is a Jira item/);
|
|
102
|
-
ok('T5 an arrow key on a Jira bar is refused with the locked toast', !!t5, t5);
|
|
103
|
-
await page.click('[data-tlzoom="week"]');
|
|
104
|
-
ok('T6 the zoom buttons change the day width', await until(() => st(() => document.querySelector('[data-tlzoom="week"]').getAttribute('aria-pressed') === 'true' && getComputedStyle(document.querySelector('.ini-tl')).getPropertyValue('--in-pd').trim() !== '6')));
|
|
105
|
-
|
|
106
|
-
/* ── a board with Build and deliver off ── */
|
|
107
|
-
await open('board:office:backlog');
|
|
108
|
-
await until(() => st(() => !!document.querySelector('[data-wk-tab="backlog"]')));
|
|
109
|
-
await page.click('[data-wk="filters"]');
|
|
110
|
-
ok('O1 with Build and deliver off the Filters panel has no Source and says why', await until(() => st(() => !!document.querySelector('[data-wk="filter-panel"]') && !document.querySelector('[data-wk="filter-panel"] [data-wk="src"]') && /Build and deliver is off/.test(document.querySelector('[data-wk="no-jira"]').textContent))));
|
|
111
|
-
await page.keyboard.press('Escape');
|
|
112
|
-
ok('O2 every item there is a PMOS task', await st(() => { const s = [...document.querySelectorAll('[data-ini-item]')].map((n) => n.dataset.src); return s.length > 0 && s.every((x) => x === 'pmos'); }));
|
|
113
|
-
await H.finish();
|
|
114
|
-
})();
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* PMOS workspace — the Releases, Docs and Sprints tabs of a board, the six tabs of an initiative, and the stage records on an
|
|
3
|
-
* initiative's Overview (problem statement, RICE, launch checklist, kill conditions, learnings, sprint burndown) on the console3
|
|
4
|
-
* Initiatives page (mockup v5, 34-initiatives.js), in demo mode (browser). c3-demo-boards.js answers /api/boards and /api/stage-tools
|
|
5
|
-
* with the shapes of the stage-records route contract ("As built"); when the routes answer 404 (they are not on this server yet) the
|
|
6
|
-
* record cards say so quietly.
|
|
7
|
-
*
|
|
8
|
-
* The files it drives (named so `run-tests.js --changed` traces a change in any of them to this suite): public/pm/c3-ib-releases.js,
|
|
9
|
-
* c3-ib-docs.js, c3-ib-sprints.js, c3-ii-tabs.js, c3-ini-records.js, c3-ini-work.js, c3-ini-timeline.js, c3-initiatives.js,
|
|
10
|
-
* c3-initiatives.css, c3-demo-boards.js, c3-demo.js, c3-toast.js and c3-ini-harness.js. Its list fragment is test-lists/c3-ib-more.json.
|
|
11
|
-
*/
|
|
12
|
-
'use strict';
|
|
13
|
-
const { harness } = require('./c3-ini-harness');
|
|
14
|
-
|
|
15
|
-
(async () => {
|
|
16
|
-
const H = await harness('c3-ib-more');
|
|
17
|
-
const { page, ok, until, st, open, toast } = H;
|
|
18
|
-
const rec = (id, tool) => st(([i, t]) => { const r = (window.__c3boards.records[i] || {})[t]; return r ? r.data : null; }, [id, tool]);
|
|
19
|
-
const waitToast = (re) => until(async () => { const t = await toast(); return re.test(t) && t; });
|
|
20
|
-
const text = (sel) => st((s) => { const n = document.querySelector(s); return n ? n.textContent : ''; }, sel);
|
|
21
|
-
|
|
22
|
-
/* ── Releases ── */
|
|
23
|
-
await open('board:idpf:releases');
|
|
24
|
-
await until(() => st(() => !!document.querySelector('[data-inb="release-next"]')));
|
|
25
|
-
const when = await st(() => [...document.querySelectorAll('[data-inb-release]')].map((n) => n.dataset.inbRelease + ':' + n.dataset.inbWhen).join(','));
|
|
26
|
-
ok('R1 Releases shows the next release first, then a later one and the past ones', /^rel-idpf-31:next,rel-idpf-32:later,rel-idpf-30:past$/.test(when), when);
|
|
27
|
-
ok('R1b the Unreleased header links to the Calendar and there is no side card', await st(() => !!document.querySelector('[data-inb="release-next"] [data-inb="open-calendar"]') && !document.querySelector('.bcol.r')));
|
|
28
|
-
ok('R2 each release lists its scope initiatives as links', await st(() => !!document.querySelector('[data-inb-release="rel-idpf-31"] [data-inb-scope="IDPF-12"]')));
|
|
29
|
-
await page.click('[data-inb-release="rel-idpf-31"] [data-inb-scope="IDPF-12"]').catch(async () => { await page.click('[data-inb-release="rel-idpf-31"] .tt'); await page.click('[data-inb-release="rel-idpf-31"] [data-inb-scope="IDPF-12"]'); });
|
|
30
|
-
ok('R3 a scope link opens the initiative', await until(() => st(() => /ini:idpf:IDPF-12/.test(decodeURIComponent(location.search)))));
|
|
31
|
-
|
|
32
|
-
/* ── Docs ── */
|
|
33
|
-
await open('board:idpf:docs');
|
|
34
|
-
await until(() => st(() => !!document.querySelector('[data-inb="docs-list"]')));
|
|
35
|
-
const grps = await st(() => [...document.querySelectorAll('[data-inb-docgrp]')].map((n) => n.dataset.inbDocgrp).join(','));
|
|
36
|
-
ok('D1 Docs groups the documents by initiative', grps === 'IDPF-12,IDPF-21', grps);
|
|
37
|
-
await page.fill('[data-inb="docs-search"]', 'rubric');
|
|
38
|
-
ok('D2 the search keeps the matching documents', await until(() => st(() => { const r = [...document.querySelectorAll('[data-inb-docrow]')].map((n) => n.dataset.inbDocrow); return r.length === 1 && r[0] === 'planning/ib/idpf-12-rubric.md'; })));
|
|
39
|
-
await page.fill('[data-inb="docs-search"]', 'zzz-nothing');
|
|
40
|
-
ok('D3 no match says so', await until(() => st(() => !!document.querySelector('[data-inb="docs-none"]'))));
|
|
41
|
-
|
|
42
|
-
/* ── Sprints, with the burndown card ── */
|
|
43
|
-
await open('board:idpf:sprints');
|
|
44
|
-
await until(() => st(() => !!document.querySelector('[data-inb="sprints-source"]')));
|
|
45
|
-
ok('SP1 the active sprint header says Jira, read-only, and there is no banner', /Jira, read-only/.test(await text('[data-inb="sprints-source"]')) && await st(() => !!document.querySelector('[data-inb-state="active"] [data-inb="sprints-source"]') && !document.querySelector('.fold [data-inb="sprints-source"], .fold[data-inb="sprints-source"]')));
|
|
46
|
-
ok('SP2 the active sprint is drawn with its counts; the future sprint is listed; closed sprints are kept off the page', await st(() => !!document.querySelector('[data-inb-state="active"]') && !!document.querySelector('[data-inb-state="future"]') && !document.querySelector('[data-inb-state="closed"]') && !!document.querySelector('[data-inb="sprints-past"] [data-inb-past]') && ((m) => !!m && Number(m[1]) === 12 && Number(m[2]) + Number(m[3]) + Number(m[4]) === 12)(/Items(\d+):(\d+)done,(\d+)inprogress,(\d+)todo/.exec(document.querySelector('[data-inb="sprint-counts"]').textContent.replace(/\s+/g, '')))));
|
|
47
|
-
// sprint-goal-summary: the goal (from Jira, or written from the tickets and why), the team summary, closed sprints read once
|
|
48
|
-
ok('SP4 the sprint goal is written from the tickets, with Jira\'s goal only as a reference', await st(() => { const g = document.querySelector('[data-inb="sprint-summary"] [data-inb="sprint-goal"]'); return !!g && g.dataset.inbGoal === 'tickets' && /SPRINT GOAL · from the tickets/.test(g.textContent) && /In Jira: “Q4 delivery”/.test(g.textContent) && !/from Jira/.test(g.textContent); })
|
|
49
|
-
&& /from the tickets/.test(await text('[data-inb-state="future"] [data-inb="sprint-goal"]')) && !(await text('[data-inb-state="future"] [data-inb="sprint-goal"]')).includes('In Jira'));
|
|
50
|
-
ok('SP5 what the team is working on: a row per theme, one with no initiative', await st(() => document.querySelectorAll('[data-inb="sprint-themes"] [data-inb-theme]').length === 2 && !!document.querySelector('[data-inb-theme="none"]') && /No initiative/.test(document.querySelector('[data-inb-theme="none"]').textContent)));
|
|
51
|
-
// the sprint brief (mockup-c3-sprint-brief v3): where it stands, issues with a proposed plan, done, flow, asks; velocity; tickets behind a press
|
|
52
|
-
ok('SP7 the brief says where the sprint stands, with the day and the points', await st(() => { const v = document.querySelector('[data-inb="sprint-verdict"]'); return !!v && v.dataset.inbHealth === 'warn' && /At risk/.test(v.textContent) && /Day 7 of 14/.test(v.textContent) && /21 of 48 points/.test(v.textContent); })
|
|
53
|
-
&& /Needs attention/.test(await text('[data-inb="sprint-summary"] .sh2')));
|
|
54
|
-
ok('SP8 each issue to resolve carries a proposed plan, when it is done, and Add to my Work', await st(() => { const r = [...document.querySelectorAll('[data-inb="sprint-issues"] [data-inb-sp-issue]')]; const b = r.find((x) => x.dataset.inbSpIssue === 'bad');
|
|
55
|
-
return r.length === 2 && !!b && /Blocked/.test(b.textContent) && b.querySelectorAll('[data-inb="sprint-plan"] ol li').length === 3 && /Done when: /.test(b.textContent) && !!b.querySelector('[data-inb-sp-addwork]'); }));
|
|
56
|
-
await page.click('[data-inb="sprint-issues"] [data-inb-sp-issue="bad"] [data-inb-sp-addwork]');
|
|
57
|
-
ok('SP9 Add to my Work files the issue in the Work inbox', await until(() => st(() => /Added to your Work inbox/.test(document.body.textContent))));
|
|
58
|
-
ok('SP10 completed work says what is not in Prod yet; the flow and the asks are drawn', await st(() => document.querySelectorAll('[data-inb="sprint-done"] [data-inb-sp-done]').length === 2 && /Not in Prod yet/.test(document.querySelector('[data-inb-sp-done="waiting"]').textContent)
|
|
59
|
-
&& document.querySelectorAll('[data-inb="sprint-flow"] u').length >= 2 && document.querySelectorAll('[data-inb="sprint-asks"] li').length === 2));
|
|
60
|
-
ok('SP11 the velocity card draws the last four sprints and this one, with the average', await st(() => { const c = document.querySelector('[data-inb="sprint-velocity"]'); return !!c && c.querySelectorAll('svg.ini-vel rect.done').length === 5 && !!c.querySelector('line.avg') && /Average 27 points done a sprint, 77% of what was committed/.test(c.textContent); })
|
|
61
|
-
&& /about 36 of 48 points/.test(await text('[data-inb="sprint-counts"]')));
|
|
62
|
-
ok('SP12 the tickets are hidden until Show all is pressed', await st(() => document.querySelector('[data-inb="sprint-ticket-list"]').hidden && /Show all 12 tickets/.test(document.querySelector('[data-inb="sprint-show-tickets"]').textContent)));
|
|
63
|
-
await page.click('[data-inb="sprint-show-tickets"]');
|
|
64
|
-
ok('SP13 Show all opens the list of every ticket', await until(() => st(() => !document.querySelector('[data-inb="sprint-ticket-list"]').hidden && document.querySelectorAll('[data-inb="sprint-ticket-list"] [data-inb-issue]').length === 12 && /Hide 12 tickets/.test(document.querySelector('[data-inb="sprint-show-tickets"]').textContent))));
|
|
65
|
-
await page.click('[data-inb="sprints-past-open"]');
|
|
66
|
-
await until(() => st(() => !!document.querySelector('[data-inb="sprints-past-sheet"] [data-inb-state="closed"]')));
|
|
67
|
-
const past = '[data-inb="sprints-past-sheet"] [data-inb-state="closed"]';
|
|
68
|
-
ok('SP6 a past sprint opens in a sheet: goal met, done of total, carried, what got in the way, read once', /5 of 7 done/.test(await text(past)) && /2 carried to/.test(await text(past)) && /Goal met/.test(await text(past))
|
|
69
|
-
&& /from the tickets/.test(await text(past + ' [data-inb="sprint-goal"]')) && /waited 5 days on design/.test(await text(past + ' [data-inb="sprint-got"]'))
|
|
70
|
-
&& /Read and summarised once on 29 Sep\. PMOS does not read a closed sprint again\./.test(await text(past + ' [data-inb="sprint-read-once"]')) && /Closed sprints/.test(await text('[data-inb="sprints-how"]')));
|
|
71
|
-
await page.keyboard.press('Escape');
|
|
72
|
-
ok('SP3 the sprint burndown card draws the ideal and actual lines', await until(() => st(() => !!document.querySelector('[data-ini-tool-card="burndown"] svg.ini-burn path.ideal') && !!document.querySelector('[data-ini-tool-card="burndown"] svg.ini-burn path.act'))));
|
|
73
|
-
|
|
74
|
-
/* ── an initiative's six tabs ── */
|
|
75
|
-
await open('ini:idpf:IDPF-12:overview');
|
|
76
|
-
const itabs = await st(() => [...document.querySelectorAll('[data-ini="ini-tabs"] [data-ini-tab]')].map((n) => n.dataset.iniTab).join(','));
|
|
77
|
-
ok('IT1 an initiative has six tabs', itabs === 'overview,breakdown,docs,tickets,timeline,history', itabs);
|
|
78
|
-
const cards = await until(() => st(() => [...document.querySelectorAll('[data-ini-tool-card]')].map((n) => n.dataset.iniToolCard).join(',')));
|
|
79
|
-
ok('IT2 Overview of a Do initiative carries the launch checklist and the sprint burndown', /launch/.test(cards) && /burndown/.test(cards), cards);
|
|
80
|
-
ok('IT3 Overview links the board\'s Backlog, Board and Timeline', (await st(() => [...document.querySelectorAll('[data-ini-boardlink]')].map((n) => n.dataset.iniBoardlink).join(','))) === 'backlog,board,timeline');
|
|
81
|
-
await page.click('[data-ini="ini-tabs"] [data-ini-tab="breakdown"]');
|
|
82
|
-
ok('IT4 Breakdown lists the epics and items', await until(() => st(() => document.querySelectorAll('[data-ini="breakdown"] [data-ini-item]').length > 0)));
|
|
83
|
-
await page.fill('[data-wk="add-title"]', 'Draft the rollback runbook');
|
|
84
|
-
await page.click('[data-wk="add-go"]');
|
|
85
|
-
ok('IT5 Breakdown adds a PMOS task to the initiative', await until(() => st(() => window.__c3boards.tasks.some((t) => t.title === 'Draft the rollback runbook' && t.initiative === 'IDPF-12'))));
|
|
86
|
-
await page.click('[data-ini="ini-tabs"] [data-ini-tab="docs"]');
|
|
87
|
-
ok('IT6 Docs lists the initiative\'s documents', await until(() => st(() => document.querySelectorAll('[data-inb-docrow]').length === 3)));
|
|
88
|
-
await page.click('[data-ini="ini-tabs"] [data-ini-tab="tickets"]');
|
|
89
|
-
ok('IT7 Tickets lists the linked Jira items', await until(() => st(() => { const r = [...document.querySelectorAll('[data-ini="tickets"] [data-ini-item]')]; return r.length > 0 && r.every((n) => n.dataset.src === 'jira'); })));
|
|
90
|
-
await page.click('[data-ini="ini-tabs"] [data-ini-tab="timeline"]');
|
|
91
|
-
ok('IT8 Timeline draws the epic and item bars', await until(() => st(() => document.querySelectorAll('.ini-tl [data-tlb]').length > 0)));
|
|
92
|
-
await page.click('[data-ini="ini-tabs"] [data-ini-tab="history"]');
|
|
93
|
-
ok('IT9 History lists the recorded moves', await until(() => st(() => !!document.querySelector('[data-inb="hist-list"]'))));
|
|
94
|
-
await open('ini:idpf:IDPF-07:docs');
|
|
95
|
-
ok('IT10 an initiative with no documents says so', await until(() => st(() => !!document.querySelector('[data-inb="docs-empty"]'))));
|
|
96
|
-
await open('ini:idpf:IDPF-21:tickets');
|
|
97
|
-
ok('IT11 an initiative with no Jira items says so', await until(() => st(() => !!document.querySelector('[data-inb="tk-empty"]'))));
|
|
98
|
-
|
|
99
|
-
/* ── stage records ── */
|
|
100
|
-
// problem statement (Discover)
|
|
101
|
-
await open('ini:idpf:IDPF-21:overview');
|
|
102
|
-
await until(() => st(() => !!document.querySelector('[data-rec-field="problem"]')));
|
|
103
|
-
await page.fill('[data-rec-field="problem"]', 'Large API users cannot forecast spend under a flat fee.');
|
|
104
|
-
await page.click('[data-rec-save="problem"]');
|
|
105
|
-
await until(async () => ((await rec('IDPF-21', 'problem')) || {}).text === 'Large API users cannot forecast spend under a flat fee.');
|
|
106
|
-
ok('RC1 Save stores the problem statement and the toast says so', !!(await waitToast(/Problem statement saved/)));
|
|
107
|
-
|
|
108
|
-
// RICE (Plan): live score and rank among the board's scored initiatives
|
|
109
|
-
await open('ini:idpf:IDPF-07:overview');
|
|
110
|
-
await until(() => st(() => /Ranks/.test((document.querySelector('[data-rec="rice-rank"]') || {}).textContent || '')));
|
|
111
|
-
ok('RC2 RICE shows the score and its rank on the board', (await text('[data-rec="rice-score"]')) === '420' && /Ranks 2 of 2/.test(await text('[data-rec="rice-rank"]')), await text('[data-rec="rice-rank"]'));
|
|
112
|
-
await page.fill('[data-rec-rice="reach"]', '1200');
|
|
113
|
-
ok('RC3 the score follows the inputs as they are typed', await until(async () => (await text('[data-rec="rice-score"]')) === '840'), await text('[data-rec="rice-score"]'));
|
|
114
|
-
await page.click('[data-rec-save="rice"]');
|
|
115
|
-
await until(async () => ((await rec('IDPF-07', 'rice')) || {}).reach === 1200);
|
|
116
|
-
ok('RC4 Save stores RICE, and the rank is read again', !!(await waitToast(/RICE saved: score 840/)) && await until(async () => /Ranks 1 of 2/.test(await text('[data-rec="rice-rank"]'))), await text('[data-rec="rice-rank"]'));
|
|
117
|
-
|
|
118
|
-
// launch checklist (Do), kill conditions and learnings (picked from More tools)
|
|
119
|
-
await open('ini:idpf:IDPF-12:overview:kill');
|
|
120
|
-
await until(() => st(() => document.querySelectorAll('[data-rec-check]').length === 4));
|
|
121
|
-
ok('RC5 a picked tool from another stage is drawn first', (await st(() => document.querySelector('[data-ini-tool-card]').dataset.iniToolCard)) === 'kill');
|
|
122
|
-
await page.click('[data-rec-check="1"]');
|
|
123
|
-
ok('RC6 a launch check is stored', await until(async () => { const d = await rec('IDPF-12', 'launch'); return d && d.items[1].done === true; }));
|
|
124
|
-
await page.click('[data-rec-kill="0"] [data-rec-killst="tripped"]');
|
|
125
|
-
await until(async () => { const d = await rec('IDPF-12', 'kill'); return d && d.items[0].status === 'tripped'; });
|
|
126
|
-
ok('RC7 a kill condition set to Tripped is stored and the toast asks for a decision', !!(await waitToast(/Kill condition tripped/)) && await until(() => st(() => document.querySelector('[data-rec-kill="0"] [data-rec-killst="tripped"]').getAttribute('aria-pressed') === 'true')));
|
|
127
|
-
await open('ini:idpf:IDPF-12:overview:learnings');
|
|
128
|
-
await until(() => st(() => !!document.querySelector('[data-rec-add="learnings"]')));
|
|
129
|
-
await page.fill('[data-rec-add="learnings"]', 'Brief Support a week before a beta, not a day.');
|
|
130
|
-
await page.click('[data-rec-addgo="learnings"]');
|
|
131
|
-
ok('RC8 a learning is added and listed', await until(async () => { const d = await rec('IDPF-12', 'learnings'); return d && d.items.some((x) => /Brief Support a week/.test(x.text)); }) && await until(() => st(() => [...document.querySelectorAll('[data-rec-learning]')].some((n) => /Brief Support a week/.test(n.textContent)))));
|
|
132
|
-
|
|
133
|
-
// the routes are not on this server: 404 -> the cards say so quietly (no reload: the fetch wrapper lives in the page)
|
|
134
|
-
await st(() => { const prev = window.fetch; window.fetch = (input, init) => (/\/api\/stage-tools\//.test(String((input && input.url) || input)) ? Promise.resolve(new Response('{"ok":false,"error":"Not found"}', { status: 404, headers: { 'content-type': 'application/json' } })) : prev(input, init)); });
|
|
135
|
-
await page.click('[data-ini="ini-tabs"] [data-ini-tab="docs"]');
|
|
136
|
-
await until(() => st(() => !document.querySelector('[data-ini-tool-card]')));
|
|
137
|
-
await page.click('[data-ini="ini-tabs"] [data-ini-tab="overview"]');
|
|
138
|
-
await until(() => st(() => document.querySelectorAll('[data-rec="quiet"]').length >= 2));
|
|
139
|
-
const quiet = await st(() => [...document.querySelectorAll('[data-rec="quiet"]')].map((n) => n.textContent).join(' | '));
|
|
140
|
-
ok('RC9 on a 404 the record cards say "Nothing recorded yet" and "No sprint burndown yet", with no alert', /Nothing recorded yet/.test(quiet) && /No sprint burndown yet/.test(quiet) && await st(() => !document.querySelector('[data-ini-tool-card] [role="alert"]')), quiet);
|
|
141
|
-
|
|
142
|
-
// a project initiative on a board with Build and deliver off: the project workflow's records, and no sprint burndown
|
|
143
|
-
await open('ini:office:OFF-01:overview');
|
|
144
|
-
ok('RC10 a project initiative carries its launch checklist and learnings', await until(() => st(() => { const c = [...document.querySelectorAll('[data-ini-tool-card]')].map((n) => n.dataset.iniToolCard); return c.includes('launch') && !c.includes('burndown'); })));
|
|
145
|
-
await H.finish();
|
|
146
|
-
})();
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* PMOS workspace — the Triage and Initiatives tabs of a board on the console3 Initiatives page (mockup v5, 34-initiatives.js tabTriage and
|
|
3
|
-
* tabInitiatives), in demo mode (browser). Triage: add an ask and see its intake draft, Accept (the anchor is required; the initiative
|
|
4
|
-
* starts on the board's default workflow), Ask for more, Decline with a reason. Initiatives: the view menu, the category, status and
|
|
5
|
-
* owner filters in the filter menu (comma lists for "At risk or late"), sort with its direction, the numbered pager, the Move items of
|
|
6
|
-
* the row menu, and that every answer is the server's page of 25 (c3-initiative-lifecycle moved the controls into one row).
|
|
7
|
-
*
|
|
8
|
-
* The files it drives (named so `run-tests.js --changed` traces a change in any of them to this suite): public/pm/c3-ib-triage.js,
|
|
9
|
-
* c3-ib-initiatives.js, c3-ini-life.js, c3-initiatives.js, c3-initiatives.css, c3-ini-ui.js, c3-ini-work.js, c3-demo-boards.js, c3-demo.js, c3-sheet.js,
|
|
10
|
-
* c3-toast.js and c3-ini-harness.js. Its list fragment is test-lists/c3-ib-triage-backlog.json.
|
|
11
|
-
*/
|
|
12
|
-
'use strict';
|
|
13
|
-
const { harness } = require('./c3-ini-harness');
|
|
14
|
-
|
|
15
|
-
(async () => {
|
|
16
|
-
const H = await harness('c3-ib-triage-backlog');
|
|
17
|
-
const { page, ok, until, st, open, toast } = H;
|
|
18
|
-
const store = (f, a) => st(f, a);
|
|
19
|
-
|
|
20
|
-
/* ── Triage ── */
|
|
21
|
-
await open('board:idpf:triage');
|
|
22
|
-
const asks = await until(() => st(() => [...document.querySelectorAll('[data-ibt="asks"] [data-ibt-ask]')].map((n) => n.dataset.ibtAsk).join(',')));
|
|
23
|
-
ok('T1 the open asks of the board, newest first', asks === 'ask-1,ask-3', asks);
|
|
24
|
-
ok('T2 an ask that was asked for more says so', await st(() => !!document.querySelector('[data-ibt-ask="ask-3"] [data-ibt="need-more"]')));
|
|
25
|
-
const intro = await st(() => document.querySelector('[data-ibt="intro"]').textContent);
|
|
26
|
-
ok('T3 the New asks header names the default workflow and its first stage; there is no side card', /Product, in Discover/.test(intro) && await st(() => !document.querySelector('.bcol.r') && !/How triage works/.test(document.body.textContent)), intro);
|
|
27
|
-
await page.fill('[data-ibt="line"]', 'Audit log export to S3 for enterprise admins');
|
|
28
|
-
await page.click('[data-ibt="add"]');
|
|
29
|
-
const added = await until(() => st(() => { const r = document.querySelector('[data-ibt="asks"] [data-ibt-ask]'); return r && /Audit log export/.test(r.textContent) && r.dataset.ibtAsk; }));
|
|
30
|
-
ok('T4 Add puts the ask on top and opens it on its intake draft', !!added && await until(() => st((id) => { const r = document.querySelector('[data-ibt-ask="' + id + '"]'); return r && !!r.querySelector('.xp.open [data-ibt-accept]'); }, added)), String(added));
|
|
31
|
-
|
|
32
|
-
await page.click('[data-ibt-ask="ask-1"] .tt');
|
|
33
|
-
await until(() => st(() => !!document.querySelector('[data-ibt-ask="ask-1"] .xp.open [data-ibt="draft"]')));
|
|
34
|
-
const draft = await st(() => document.querySelector('[data-ibt-ask="ask-1"] [data-ibt="draft"]').textContent);
|
|
35
|
-
ok('T5 an ask opens in place on its draft: lane guess, anchor and a prior rejection', /feature, 72% sure/.test(draft) && /KR 2\.1/.test(draft) && /Rejected before: IDPF-5/.test(draft), draft);
|
|
36
|
-
await page.click('[data-ibt-more="ask-1"]');
|
|
37
|
-
await page.fill('[data-ibt="f-more"]', 'Which trials need SSO first?');
|
|
38
|
-
await page.click('[data-ibt="more-go"]');
|
|
39
|
-
await until(() => store(() => window.__c3boards.asks.find((a) => a.id === 'ask-1').needMore === true));
|
|
40
|
-
await until(async () => /prompted for more detail/.test(await toast()));
|
|
41
|
-
ok('T6 Ask for more records the question; the ask stays open', await store(() => { const a = window.__c3boards.asks.find((x) => x.id === 'ask-1'); return a.state === 'open' && a.moreNote === 'Which trials need SSO first?'; }) && /prompted for more detail/.test(await toast()));
|
|
42
|
-
|
|
43
|
-
await page.click('[data-ibt-ask="ask-1"] .tt').catch(() => {});
|
|
44
|
-
await until(() => st(() => !!document.querySelector('[data-ibt-ask="ask-1"] .xp.open [data-ibt-accept]')));
|
|
45
|
-
await page.click('[data-ibt-accept="ask-1"]');
|
|
46
|
-
await until(() => st(() => !!document.querySelector('[data-ibt="accept-form"]')));
|
|
47
|
-
await page.fill('[data-ibt="f-anchor"]', '');
|
|
48
|
-
ok('T7 Accept needs an anchor: with none the button is off and the sheet says why', await st(() => document.querySelector('[data-ibt="accept-go"]').disabled && /needs an anchor/.test(document.querySelector('[data-ibt="anchor-why"]').textContent)));
|
|
49
|
-
await page.fill('[data-ibt="f-anchor"]', 'KR 2.1 Activation to 45%');
|
|
50
|
-
await page.click('[data-ibt="accept-go"]');
|
|
51
|
-
await until(() => store(() => window.__c3boards.asks.find((a) => a.id === 'ask-1').state === 'accepted'));
|
|
52
|
-
const t8 = await until(async () => { const t = await toast(); return /Accepted as/.test(t) && t; });
|
|
53
|
-
ok('T8 Accept starts an initiative with the default workflow, and the toast opens it', /Accepted as \S+ in Discover, with the Product workflow/.test(t8 || ''), t8);
|
|
54
|
-
|
|
55
|
-
// no reload: the demo store lives in the page, and ask-1 must stay accepted
|
|
56
|
-
await until(() => st(() => !!document.querySelector('[data-ibt="closed"] [data-ibt-ask="ask-1"]') && !!document.querySelector('[data-ibt="asks"] [data-ibt-ask="ask-3"]')));
|
|
57
|
-
await page.click('[data-ibt-ask="ask-3"] .tt');
|
|
58
|
-
await until(() => st(() => !!document.querySelector('[data-ibt-ask="ask-3"] .xp.open [data-ibt-decline]')));
|
|
59
|
-
await page.click('[data-ibt-decline="ask-3"]');
|
|
60
|
-
ok('T9 Decline needs a reason', await until(() => st(() => document.querySelector('[data-ibt="decline-go"]') && document.querySelector('[data-ibt="decline-go"]').disabled)));
|
|
61
|
-
await page.fill('[data-ibt="f-why"]', 'Partner X moves to the new webhook service in Q1');
|
|
62
|
-
await page.click('[data-ibt="decline-go"]');
|
|
63
|
-
await until(() => store(() => window.__c3boards.asks.find((a) => a.id === 'ask-3').state === 'declined'));
|
|
64
|
-
await until(() => st(() => !!document.querySelector('[data-ibt="closed"] [data-ibt-ask="ask-3"]')));
|
|
65
|
-
ok('T10 the declined ask moves to Decided, with the accepted one', await st(() => !!document.querySelector('[data-ibt="closed"] [data-ibt-ask="ask-1"][data-state="accepted"]') && !!document.querySelector('[data-ibt="closed"] [data-ibt-ask="ask-3"][data-state="declined"]')));
|
|
66
|
-
|
|
67
|
-
/* ── Initiatives ── */
|
|
68
|
-
await open('board:idpf:initiatives');
|
|
69
|
-
const ready = () => until(() => st(() => document.querySelector('[data-ini-panel="initiatives"]') && document.querySelector('[data-ini-panel="initiatives"]').dataset.ibbState === 'ready'));
|
|
70
|
-
const rows = () => st(() => [...document.querySelectorAll('[data-ibb="rows"] [data-ibb-row]')].map((r) => r.dataset.ibbRow));
|
|
71
|
-
const seq = () => st(() => Number(document.querySelector('[data-ini-panel="initiatives"]').dataset.ibbSeq));
|
|
72
|
-
const after = async (s0) => { await until(async () => (await seq()) > s0 && (await st(() => document.querySelector('[data-ini-panel="initiatives"]').dataset.ibbState)) === 'ready'); };
|
|
73
|
-
await ready();
|
|
74
|
-
const total = () => st(() => document.querySelector('[data-ibb="body"] .sh2 .bdg').textContent);
|
|
75
|
-
const count0 = await st(() => document.querySelector('[data-ibb="views"]').textContent);
|
|
76
|
-
ok('L1 the tab opens on Now and next, 25 rows a page', (await rows()).length === 25 && /Now and next/.test(count0), count0);
|
|
77
|
-
/* the filter menu holds the selects; a pick reads the server again */
|
|
78
|
-
const pickFilter = async (k, v) => { if (!(await st(() => !!document.querySelector('[data-ibb-filter]')))) await page.click('[data-ibb="filters"]'); await page.selectOption('[data-ibb-filter="' + k + '"]', v); };
|
|
79
|
-
const pickView = async (k) => { await page.keyboard.press('Escape'); await page.click('[data-ibb="views"]'); await page.click('[data-ibb-view="' + k + '"]'); };
|
|
80
|
-
const r0 = await st(() => document.querySelector('[data-ibb-row]').textContent);
|
|
81
|
-
ok('L2 a row shows its workflow template, its stage dots, status, owner, progress and dates', /Product|Quick fix|Research only/.test(r0) && await st(() => !!document.querySelector('[data-ibb-row] .ini-steps') && !!document.querySelector('[data-ibb-row] .ini-mini')), r0.slice(0, 200));
|
|
82
|
-
let s0 = await seq();
|
|
83
|
-
await pickFilter('status', 'at risk,late');
|
|
84
|
-
await after(s0);
|
|
85
|
-
const st1 = await st(() => [...document.querySelectorAll('[data-ibb-row]')].every((r) => /At risk|Late/.test(r.textContent)));
|
|
86
|
-
ok('L3 "At risk or late" is a comma list the server reads as any of', st1 && (await rows()).length > 0);
|
|
87
|
-
s0 = await seq();
|
|
88
|
-
await pickView('all');
|
|
89
|
-
await after(s0);
|
|
90
|
-
s0 = await seq();
|
|
91
|
-
await pickFilter('cat', 'Learn');
|
|
92
|
-
await after(s0);
|
|
93
|
-
const learn = await st(() => [...document.querySelectorAll('[data-ibb-row]')].map((r) => r.dataset.cat));
|
|
94
|
-
ok('L4 the Category filter keeps one category, whatever each initiative\'s workflow calls its stage', learn.length > 0 && learn.every((c) => c === 'Learn'), learn.join(','));
|
|
95
|
-
s0 = await seq();
|
|
96
|
-
await page.keyboard.press('Escape');
|
|
97
|
-
await page.click('[data-ibb="clear"]');
|
|
98
|
-
await after(s0);
|
|
99
|
-
const pager = await st(() => [...document.querySelectorAll('[data-ibb-page]')].map((b) => b.dataset.ibbPage).join(','));
|
|
100
|
-
ok('L5 All has the numbered pager (125 initiatives, 5 pages)', /^1,2,.*5$/.test(pager) && (await total()) === '125', pager);
|
|
101
|
-
s0 = await seq();
|
|
102
|
-
await page.click('[data-ibb-page="5"]');
|
|
103
|
-
await after(s0);
|
|
104
|
-
ok('L6 a page number reads that page from the server', (await rows()).length === 25 && /101–125 of 125/.test(await st(() => document.querySelector('[data-ibb="pager"]').textContent)));
|
|
105
|
-
s0 = await seq();
|
|
106
|
-
await page.click('[data-ibb="sort"]');
|
|
107
|
-
await page.click('[data-ibb-sort="title"]');
|
|
108
|
-
await after(s0);
|
|
109
|
-
const t1 = await st(() => [...document.querySelectorAll('[data-ibb-row] .tt')].map((n) => n.textContent));
|
|
110
|
-
s0 = await seq();
|
|
111
|
-
await page.click('[data-ibb="sort"]');
|
|
112
|
-
await page.click('[data-ibb="dir"]');
|
|
113
|
-
await after(s0);
|
|
114
|
-
const t2 = await st(() => [...document.querySelectorAll('[data-ibb-row] .tt')].map((n) => n.textContent));
|
|
115
|
-
ok('L7 Sort by title, then the direction button flips it', t1[0].localeCompare(t1[1]) <= 0 && t2[0].localeCompare(t2[1]) >= 0 && t1[0] !== t2[0], t1[0] + ' / ' + t2[0]);
|
|
116
|
-
|
|
117
|
-
await page.fill('[data-ibb="q"]', 'IDPF-07');
|
|
118
|
-
await until(async () => (await rows()).join() === 'IDPF-07');
|
|
119
|
-
await page.click('[data-ibb-move="IDPF-07"]');
|
|
120
|
-
await until(() => st(() => !!document.querySelector('[data-ini="menu"] [data-ini-moveto]')));
|
|
121
|
-
const opts = await st(() => [...document.querySelectorAll('[data-ini-moveto]')].map((b) => b.dataset.iniMoveto).join(','));
|
|
122
|
-
ok('L8 the row menu lists the stages of the initiative\'s own workflow first', opts === 'Discover,Plan,Build & Deliver,Monitor & Evaluate', opts);
|
|
123
|
-
await page.click('[data-ini-moveto="Discover"]');
|
|
124
|
-
await until(() => store(() => window.__c3boards.rows.find((r) => r.id === 'IDPF-07').stage === 'Discover'));
|
|
125
|
-
await until(async () => /IDPF-07 moved to Discover/.test(await toast()));
|
|
126
|
-
ok('L9 a pick moves it and the toast confirms', /IDPF-07 moved to Discover/.test(await toast()), await toast());
|
|
127
|
-
await H.finish();
|
|
128
|
-
})();
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/* c3-ini-harness.js — what the four console3 Initiatives browser suites share (c3-initiatives-test.js, c3-ib-triage-backlog-test.js,
|
|
2
|
-
* c3-ib-items-test.js, c3-ib-more-test.js): a workspace server on the suite's own port, a Chromium page in demo mode (?demo=1, so
|
|
3
|
-
* c3-demo-boards.js answers every /api/boards and /api/stage-tools call and nothing is written), and the small helpers the suites
|
|
4
|
-
* assert with. Not a suite: it asserts nothing itself.
|
|
5
|
-
*
|
|
6
|
-
* const H = await harness('name', { width }) -> { page, ok, until, st, open(loc), toast(), sheet(), clickText(sel, text), shot(name), finish() }
|
|
7
|
-
* open('board:idpf:board') goes to /console.html?demo=1&tab=init&init=<loc> and waits for the page to draw.
|
|
8
|
-
* finish() asserts that no page error was thrown, closes everything and exits 1 when any assertion failed.
|
|
9
|
-
* A suite whose machine has no Chromium (or no playwright-core) prints that it was skipped and exits 0, as the other browser suites do. */
|
|
10
|
-
'use strict';
|
|
11
|
-
const { spawn } = require('child_process');
|
|
12
|
-
const path = require('path');
|
|
13
|
-
const { findBrowser } = require('./lib/find-browser');
|
|
14
|
-
|
|
15
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
16
|
-
async function until(fn, ms = 12000, step = 100) {
|
|
17
|
-
const t0 = Date.now();
|
|
18
|
-
for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); }
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async function harness(name, opts = {}) {
|
|
22
|
-
const T = require('./test-run').configure({ name });
|
|
23
|
-
const BASE = `http://127.0.0.1:${T.PORT}`;
|
|
24
|
-
const results = [];
|
|
25
|
-
let srv = null; let browser = null;
|
|
26
|
-
const ok = (n, cond, extra = '') => { results.push({ n, cond: !!cond }); console.log(`${cond ? '✓' : '✗'} ${n}${extra !== '' && !cond ? ' — ' + String(extra).slice(0, 400) : ''}`); };
|
|
27
|
-
const close = async (code) => {
|
|
28
|
-
if (browser) await browser.close().catch(() => {});
|
|
29
|
-
if (srv) srv.kill('SIGKILL');
|
|
30
|
-
T.killTmux();
|
|
31
|
-
const bad = results.filter((x) => !x.cond).length;
|
|
32
|
-
if (code === undefined) console.log(`\n${results.length - bad}/${results.length} ${name} assertions passed`);
|
|
33
|
-
process.exit(code !== undefined ? code : (bad ? 1 : 0));
|
|
34
|
-
};
|
|
35
|
-
process.on('unhandledRejection', (e) => { console.error(e); close(1); });
|
|
36
|
-
const exe = findBrowser();
|
|
37
|
-
if (!exe) { console.log('· no Chrome/Chromium on this machine — ' + name + ' suite skipped'); process.exit(0); }
|
|
38
|
-
let chromium;
|
|
39
|
-
try { ({ chromium } = require('playwright-core')); } catch { console.log('· playwright-core not installed — ' + name + ' suite skipped'); process.exit(0); }
|
|
40
|
-
|
|
41
|
-
srv = spawn(process.execPath, ['server.js'], { cwd: __dirname, env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
42
|
-
srv.stderr.on('data', () => {}); srv.stdout.on('data', () => {});
|
|
43
|
-
await T.waitForServer(BASE);
|
|
44
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
45
|
-
const ctx = await browser.newContext({ viewport: { width: opts.width || 1280, height: 900 } });
|
|
46
|
-
const page = await ctx.newPage();
|
|
47
|
-
const errors = [];
|
|
48
|
-
page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
|
|
49
|
-
const st = (f, a) => page.evaluate(f, a);
|
|
50
|
-
const open = async (loc, extra) => {
|
|
51
|
-
await page.goto(BASE + '/console.html?demo=1&tab=init' + (loc ? '&init=' + encodeURIComponent(loc) : '') + (extra || ''), { waitUntil: 'load' });
|
|
52
|
-
await until(() => st(() => { const p = document.querySelector('[data-ini="page"]'); return !!p && !p.querySelector('[data-ini="status"]') && p.children.length > 1; }));
|
|
53
|
-
await sleep(150);
|
|
54
|
-
};
|
|
55
|
-
const toast = () => st(() => [...document.querySelectorAll('[data-c3-toast]')].map((t) => t.textContent).join(' | '));
|
|
56
|
-
const sheet = () => page.$('[data-shell="sheet"] [role="dialog"]');
|
|
57
|
-
const clickText = async (sel, text) => {
|
|
58
|
-
const h = await page.evaluateHandle(([s, t]) => [...document.querySelectorAll(s)].find((n) => n.textContent.includes(t)) || null, [sel, text]);
|
|
59
|
-
const e = h.asElement(); if (!e) return false; await e.click(); return true;
|
|
60
|
-
};
|
|
61
|
-
const shot = async (n) => { if (process.env.C3_SHOTS) await page.screenshot({ path: path.join(process.env.C3_SHOTS, name + '-' + n + '.png'), fullPage: true }).catch(() => {}); };
|
|
62
|
-
const finish = async () => { ok('no page error was thrown', errors.length === 0, errors.join(' | ')); await close(); };
|
|
63
|
-
return { page, ok, until, sleep, st, open, toast, sheet, clickText, shot, finish, BASE, errors };
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
module.exports = { harness, until, sleep };
|