create-pmos 0.398.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 +30 -25
- 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 +19 -15
- package/workspace/briefing-premium-board-test.js +82 -50
- package/workspace/briefing-premium-calendar-2-test.js +36 -36
- package/workspace/briefing-premium-calendar-3-test.js +39 -39
- package/workspace/briefing-premium-calendar-test.js +23 -24
- package/workspace/briefing-premium-doc-edit-test.js +8 -10
- package/workspace/briefing-premium-initiative-test.js +38 -16
- package/workspace/briefing-premium-insights-test.js +114 -37
- package/workspace/briefing-premium-metrics-test.js +6 -4
- package/workspace/briefing-premium-products-test.js +10 -7
- package/workspace/briefing-premium-sources-test.js +25 -22
- package/workspace/briefing-premium-test.js +48 -43
- package/workspace/briefing-premium-work-test.js +16 -11
- package/workspace/c3-capture-test.js +0 -17
- package/workspace/changelog.json +29 -0
- package/workspace/ev-everywhere-test.js +210 -0
- package/workspace/fixtures/premium-viewer-fixtures.js +11 -6
- package/workspace/guide/briefing-premium.md +2 -2
- package/workspace/guide/home.md +58 -19
- package/workspace/guide/index.md +1 -1
- 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/board-grill.js +63 -0
- package/workspace/lib/board-premium.js +36 -5
- package/workspace/lib/initiative-layout.js +77 -0
- package/workspace/lib/insights-premium.js +3 -2
- package/workspace/lib/insights-records.js +21 -7
- package/workspace/lib/meeting-points.js +52 -0
- package/workspace/lib/news-for-you.js +88 -0
- package/workspace/lib/notes-series.js +29 -6
- package/workspace/lib/report-confirm.js +48 -0
- package/workspace/lib/route-modules.js +9 -9
- package/workspace/lib/routes-board-docs.js +46 -0
- package/workspace/lib/routes-board-grill.js +90 -0
- package/workspace/lib/routes-home-review.js +108 -0
- package/workspace/lib/routes-initiative-layout.js +57 -0
- package/workspace/lib/routes-insights-premium.js +4 -1
- package/workspace/lib/routes-insights-records.js +8 -4
- package/workspace/lib/routes-meeting-points.js +37 -0
- package/workspace/lib/routes-news.js +57 -0
- package/workspace/lib/routes-notes.js +2 -1
- package/workspace/lib/routes-phone-day.js +18 -9
- package/workspace/lib/routes-report-confirm.js +31 -0
- package/workspace/lib/routes-search.js +38 -0
- package/workspace/lib/routes-slash.js +95 -0
- package/workspace/lib/search-index.js +176 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -2
- package/workspace/premium-board-actions-test.js +86 -50
- package/workspace/premium-briefing-depth-test.js +55 -54
- package/workspace/premium-chat-chart-tab-test.js +4 -2
- package/workspace/premium-chat-goal-view-test.js +1 -1
- package/workspace/premium-chat-report-tab-test.js +16 -2
- package/workspace/premium-chat-term-test.js +0 -10
- package/workspace/premium-core-doc-issue-test.js +15 -13
- package/workspace/premium-menu-rows-test.js +1 -1
- package/workspace/premium-phone-card-test.js +7 -5
- package/workspace/premium-report-read-test.js +55 -18
- package/workspace/premium-vw-backlog-test.js +2 -2
- package/workspace/premium-vw-cal-test.js +50 -35
- package/workspace/premium-vw-doc-test.js +10 -11
- package/workspace/premium-vw-item-test.js +1 -1
- package/workspace/premium-vw-jira-test.js +2 -2
- package/workspace/premium-vw-meet-test.js +37 -40
- package/workspace/premium-vw-notes-test.js +21 -19
- package/workspace/premium-vw-rec-test.js +11 -12
- package/workspace/premium-welcome-test.js +3 -3
- package/workspace/premium-work-depth-test.js +5 -6
- package/workspace/public/capture.html +23 -0
- package/workspace/public/pm/bd-acts.js +303 -225
- package/workspace/public/pm/bd-asks.js +261 -0
- package/workspace/public/pm/bd-pop.js +59 -0
- package/workspace/public/pm/bd-span.js +49 -13
- package/workspace/public/pm/bd-views.js +169 -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-board.css +301 -0
- package/workspace/public/pm/cozy-ev.css +228 -0
- package/workspace/public/pm/cozy-evmodel.js +106 -0
- package/workspace/public/pm/cozy-evui.js +47 -0
- package/workspace/public/pm/cozy-home.css +20 -5
- package/workspace/public/pm/cozy-insights.css +148 -10
- package/workspace/public/pm/cozy-nav.js +103 -39
- package/workspace/public/pm/cozy-news.js +140 -0
- package/workspace/public/pm/cozy-search.js +203 -0
- package/workspace/public/pm/cozy-settings.js +198 -0
- package/workspace/public/pm/cozy-sources.js +89 -0
- package/workspace/public/pm/cozy-today.css +220 -0
- package/workspace/public/pm/cozy-viewer.js +5 -2
- package/workspace/public/pm/cozy-vw-mtg.css +350 -0
- package/workspace/public/pm/cozy-vw-rp.css +152 -0
- package/workspace/public/pm/cozy.css +9 -0
- package/workspace/public/pm/goal-chat.js +5 -1
- package/workspace/public/pm/home-adddoc.js +5 -5
- package/workspace/public/pm/home-app.js +365 -70
- package/workspace/public/pm/home-around.js +24 -126
- package/workspace/public/pm/home-chat.js +77 -18
- package/workspace/public/pm/home-data.js +9 -7
- package/workspace/public/pm/home-dictate.js +57 -0
- package/workspace/public/pm/home-draft.js +6 -6
- package/workspace/public/pm/home-ini-model.js +190 -0
- package/workspace/public/pm/home-ini.css +171 -0
- package/workspace/public/pm/home-ini.js +466 -0
- package/workspace/public/pm/home-list.js +289 -0
- package/workspace/public/pm/home-more.js +18 -135
- package/workspace/public/pm/home-phone-card.js +13 -8
- package/workspace/public/pm/home-review.js +103 -0
- package/workspace/public/pm/home-task.js +67 -0
- package/workspace/public/pm/home-today.js +148 -0
- package/workspace/public/pm/home-work.js +63 -28
- 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 +164 -40
- package/workspace/public/pm/premium-chart-tab.js +4 -5
- package/workspace/public/pm/premium-first.js +5 -7
- package/workspace/public/pm/premium-initiative-head.js +3 -3
- package/workspace/public/pm/premium-insights.js +499 -202
- package/workspace/public/pm/premium-mtg-present.js +138 -0
- package/workspace/public/pm/premium-mtg-replay.js +142 -0
- package/workspace/public/pm/premium-report-read.js +216 -52
- package/workspace/public/pm/premium-report-tab.js +44 -19
- package/workspace/public/pm/premium-shell.js +7 -7
- package/workspace/public/pm/premium-vw-cal.js +150 -60
- package/workspace/public/pm/premium-vw-doc.css +20 -2
- package/workspace/public/pm/premium-vw-doc.js +22 -7
- package/workspace/public/pm/premium-vw-mtg.js +488 -261
- package/workspace/public/pm/premium-vw-notes.js +61 -0
- package/workspace/public/pm/rp-parts.js +269 -0
- package/workspace/public/pm/view-notes.js +2 -2
- package/workspace/public/premium-board.html +4 -3
- package/workspace/public/premium-insights.html +10 -10
- package/workspace/public/premium.html +3 -1
- package/workspace/r/m1.png +0 -0
- package/workspace/r/m2.png +0 -0
- package/workspace/r/m3.png +0 -0
- package/workspace/r/nl.png +0 -0
- 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/initiative-layout.json +9 -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/premium-uncovered-meetings.json +9 -0
- package/workspace/test-lists/premium-uncovered-reports.json +9 -0
- 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/uf-everywhere.json +15 -0
- package/workspace/test-lists/uf-home.json +9 -0
- package/workspace/test-lists/uncovered-board.json +9 -0
- 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,167 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* PMOS workspace — initiative lifecycle on the console3 Initiatives page, in demo mode (browser): c3-initiative-lifecycle, done-criteria
|
|
3
|
-
* 4 and 5 (planning/prd/c3-initiative-lifecycle-prd.md; mockup v2, approved 2026-10-13).
|
|
4
|
-
*
|
|
5
|
-
* H the board's Initiatives tab at 1280×860 has two rows of controls above the list: the context row (breadcrumb, status, the tabs,
|
|
6
|
-
* a Board settings icon) and the toolbar (search, view menu, filter and sort icons, New initiative); no view pills and no
|
|
7
|
-
* labelled dropdowns; the filter menu groups Status into Active, Paused and Closed, and its badge counts the filters on
|
|
8
|
-
* S On hold and Cancelled are statuses: a paused row shows since when, the check-back day and the reason; a cancelled row is hidden
|
|
9
|
-
* until "N cancelled hidden" or the Status filter asks for it
|
|
10
|
-
* M from the row menu: Put on hold (with a reason and a check-back day), Resume, Cancel (a reason is required), Reopen, Archive and
|
|
11
|
-
* Restore, each with Undo on its toast; the archive view; Merge (the duplicate hint, the picked task moves, Undo merge moves it back)
|
|
12
|
-
* P the initiative page: the banner of an on-hold and of a merged initiative, and its "…" menu
|
|
13
|
-
*
|
|
14
|
-
* The files it drives (named so `run-tests.js --changed` traces a change in any of them to this suite): public/pm/c3-ini-life.js,
|
|
15
|
-
* c3-ini-life.css, c3-ib-initiatives.js, c3-initiatives.js, c3-ini-ui.js, c3-demo-boards.js, c3-quiet.js, c3-quiet.css, c3-sheet.js,
|
|
16
|
-
* c3-toast.js and c3-ini-harness.js. Its list fragment is test-lists/c3-ini-life.json.
|
|
17
|
-
*/
|
|
18
|
-
'use strict';
|
|
19
|
-
const { harness } = require('./c3-ini-harness');
|
|
20
|
-
|
|
21
|
-
(async () => {
|
|
22
|
-
const H = await harness('c3-ini-life', { width: 1280 });
|
|
23
|
-
const { page, ok, until, st, open, toast } = H;
|
|
24
|
-
await page.setViewportSize({ width: 1280, height: 860 });
|
|
25
|
-
const store = (f, a) => st(f, a);
|
|
26
|
-
const row = (id) => store((x) => { const r = window.__c3boards.rows.find((y) => y.id === x); return r ? { status: r.status, stopped: r.stopped, archived: r.archived } : null; }, id);
|
|
27
|
-
const ready = () => until(() => st(() => { const p = document.querySelector('[data-ini-panel="initiatives"]'); return p && p.dataset.ibbState === 'ready'; }));
|
|
28
|
-
const rows = () => st(() => [...document.querySelectorAll('[data-ibb="rows"] [data-ibb-row]')].map((r) => r.dataset.ibbRow));
|
|
29
|
-
const seq = () => st(() => Number(document.querySelector('[data-ini-panel="initiatives"]').dataset.ibbSeq));
|
|
30
|
-
const after = async (s0) => { await until(async () => (await seq()) > s0 && (await st(() => document.querySelector('[data-ini-panel="initiatives"]').dataset.ibbState)) === 'ready'); };
|
|
31
|
-
const menuFor = async (id, pick) => { await page.click('[data-ibb-menu="' + id + '"]'); await until(() => st(() => !!document.querySelector('[data-ini="menu"]'))); if (pick) await page.click('[data-ini="menu"] ' + pick); };
|
|
32
|
-
const sheetText = () => st(() => { const s = document.querySelector('[data-il="sheet"]'); return s ? s.textContent : ''; });
|
|
33
|
-
const toastHas = (re) => until(async () => re.test(await toast()));
|
|
34
|
-
const undo = () => page.click('[data-c3-toast-action]');
|
|
35
|
-
|
|
36
|
-
/* ── H · the header ── */
|
|
37
|
-
await open('board:idpf:initiatives');
|
|
38
|
-
await ready();
|
|
39
|
-
const geo = await st(() => {
|
|
40
|
-
const p = document.querySelector('[data-ini="page"]');
|
|
41
|
-
const list = p.querySelector('[data-ibb="body"]').getBoundingClientRect().top;
|
|
42
|
-
const vis = (n) => { const r = n.getBoundingClientRect(); const cs = getComputedStyle(n); return r.width > 0 && r.height > 0 && cs.visibility !== 'hidden' && r.bottom <= list; };
|
|
43
|
-
const ctrls = [...p.querySelectorAll('button, input, select')].filter(vis);
|
|
44
|
-
const tops = ctrls.map((n) => n.getBoundingClientRect().top).sort((a, b) => a - b);
|
|
45
|
-
const bands = tops.reduce((acc, t) => (acc.length && t - acc[acc.length - 1] < 24 ? acc : [...acc, t]), []); // controls within 24px share a row
|
|
46
|
-
return { rows: bands.length, pills: [...p.querySelectorAll('[data-ibb-view]')].filter(vis).length, selects: [...p.querySelectorAll('select')].filter(vis).length,
|
|
47
|
-
gear: (() => { const g = p.querySelector('[data-ini="board-settings"]'); return g && vis(g) ? { label: g.getAttribute('aria-label'), text: g.textContent.trim() } : null; })() };
|
|
48
|
-
});
|
|
49
|
-
ok('H1 two rows of controls above the list; no view pills, no labelled dropdowns', geo.rows === 2 && geo.pills === 0 && geo.selects === 0, JSON.stringify(geo));
|
|
50
|
-
ok('H2 Board settings is an icon button with its name as the label', !!geo.gear && geo.gear.label === 'Board settings' && geo.gear.text === '', JSON.stringify(geo.gear));
|
|
51
|
-
await page.click('[data-ibb="filters"]');
|
|
52
|
-
const groups = await st(() => [...document.querySelectorAll('[data-ibb-filter="status"] optgroup')].map((g) => g.label + ':' + [...g.children].map((o) => o.textContent).join('/')).join(' | '));
|
|
53
|
-
ok('H3 the filter menu groups Status into Active, Paused and Closed', groups === 'Active:All active/On track/At risk or late/At risk/Late | Paused:On hold | Closed:Done or cancelled/Done/Cancelled', groups);
|
|
54
|
-
let s0 = await seq();
|
|
55
|
-
await page.selectOption('[data-ibb-filter="owner"]', 'You');
|
|
56
|
-
await after(s0);
|
|
57
|
-
const badge = await st(() => { const b = document.querySelector('[data-ibb="filters"]'); return b.getAttribute('aria-label') + '|' + ((b.querySelector('.bdg') || {}).textContent || ''); });
|
|
58
|
-
const chips = await st(() => [...document.querySelectorAll('[data-ibb-unset]')].map((c) => c.textContent.trim()).join(','));
|
|
59
|
-
ok('H4 a filter on: the icon badge counts it, and it shows as a removable chip in the list header', badge === 'Filters, 1 on|1' && /^Owner: You/.test(chips), badge + ' ' + chips);
|
|
60
|
-
await page.keyboard.press('Escape');
|
|
61
|
-
s0 = await seq();
|
|
62
|
-
await page.click('[data-ibb-unset="owner"]');
|
|
63
|
-
await after(s0);
|
|
64
|
-
ok('H5 removing the chip removes the filter', await st(() => !document.querySelector('[data-ibb-unset]') && !document.querySelector('[data-ibb="filters"] .bdg')));
|
|
65
|
-
|
|
66
|
-
/* ── S · on hold and cancelled as statuses ── */
|
|
67
|
-
await open('board:idpf:initiatives:view=all');
|
|
68
|
-
await ready();
|
|
69
|
-
const held = await st(() => { const r = document.querySelector('[data-ibb-row="IDPF-152"]'); return r ? r.textContent : ''; });
|
|
70
|
-
ok('S1 an on-hold row: On hold, since when, the check-back day and the reason', /On hold/.test(held) && /since /.test(held) && /check back /.test(held) && /Q1 budget/.test(held), held.slice(0, 220));
|
|
71
|
-
ok('S2 a cancelled row is hidden from All, and the footer says so', !(await rows()).includes('IDPF-153') && /1 cancelled hidden/.test(await st(() => document.querySelector('[data-ibb="foot"]').textContent)));
|
|
72
|
-
s0 = await seq();
|
|
73
|
-
await page.click('[data-ibb="show-cancelled"]');
|
|
74
|
-
await after(s0);
|
|
75
|
-
ok('S3 "1 cancelled hidden" opens the cancelled ones (Status: Cancelled)', (await rows()).join() === 'IDPF-153' && /Status: Cancelled/.test(await st(() => document.querySelector('[data-ibb="chips"]').textContent)));
|
|
76
|
-
|
|
77
|
-
/* ── M · the row menu ── */
|
|
78
|
-
await open('board:idpf:initiatives:q=IDPF-07&view=all');
|
|
79
|
-
await ready();
|
|
80
|
-
await menuFor('IDPF-07');
|
|
81
|
-
const groupsM = await st(() => [...document.querySelectorAll('[data-ini="menu"] .ini-mlbl')].map((n) => n.textContent).join(','));
|
|
82
|
-
ok('M1 the row menu: Move to a stage, Status, Tidy up', groupsM === 'Move to a stage,Status,Tidy up' && await st(() => !!document.querySelector('[data-ini="menu"] [data-il-hold]') && !!document.querySelector('[data-ini="menu"] [data-il-archive]')), groupsM);
|
|
83
|
-
await page.click('[data-ini="menu"] [data-il-hold]');
|
|
84
|
-
await until(() => st(() => !!document.querySelector('[data-il="sheet"] [data-il-do="hold"]')));
|
|
85
|
-
await page.fill('[data-il-text="reason"]', 'Waiting on the partner contract');
|
|
86
|
-
await page.click('[data-il-set="back"][data-v="two"]');
|
|
87
|
-
ok('M2 Put on hold asks why and when to check back, and says what happens', /WHY IS IT PAUSED/i.test(await sheetText()) && /never turns Late/.test(await sheetText()) && await st(() => document.querySelector('[data-il-set="back"][data-v="two"]').getAttribute('aria-pressed') === 'true'));
|
|
88
|
-
await page.click('[data-il-do="hold"]');
|
|
89
|
-
await until(async () => ((await row('IDPF-07')) || {}).status === 'on hold');
|
|
90
|
-
const h7 = await row('IDPF-07');
|
|
91
|
-
ok('M3 the hold is recorded with its reason and a check-back day', h7.stopped && h7.stopped.reason === 'Waiting on the partner contract' && /^\d{4}-\d{2}-\d{2}$/.test(h7.stopped.back || ''), JSON.stringify(h7));
|
|
92
|
-
await toastHas(/IDPF-07 is on hold/);
|
|
93
|
-
await undo();
|
|
94
|
-
await until(async () => ((await row('IDPF-07')) || {}).status === 'on track');
|
|
95
|
-
ok('M4 Undo on the toast makes it active again', ((await row('IDPF-07')) || {}).status === 'on track');
|
|
96
|
-
await ready();
|
|
97
|
-
await until(async () => (await st(() => (document.querySelector('[data-ibb-row="IDPF-07"]') || {}).dataset.status)) === 'on track');
|
|
98
|
-
await menuFor('IDPF-07', '[data-il-cancel]');
|
|
99
|
-
await until(() => st(() => !!document.querySelector('[data-il="sheet"]')));
|
|
100
|
-
ok('M5 Cancel needs a reason before it can be pressed', await st(() => !document.querySelector('[data-il-do="cancel"]') && /Pick a reason/.test(document.querySelector('[data-il="sheet"]').textContent)));
|
|
101
|
-
await page.click('[data-il-set="why"][data-v="replaced"]');
|
|
102
|
-
ok('M6 "Replaced by another initiative" points to Merge', await st(() => !!document.querySelector('[data-il="merge-instead"]')));
|
|
103
|
-
await page.click('[data-il-set="why"][data-v="worth"]');
|
|
104
|
-
await page.click('[data-il-do="cancel"]');
|
|
105
|
-
await until(async () => ((await row('IDPF-07')) || {}).status === 'cancelled');
|
|
106
|
-
ok('M7 Cancel records the reason; the row leaves the list', /^Not worth it now/.test(((await row('IDPF-07')).stopped || {}).reason || '') && await until(async () => !(await rows()).includes('IDPF-07')));
|
|
107
|
-
s0 = await seq();
|
|
108
|
-
await page.click('[data-ibb="show-cancelled"]');
|
|
109
|
-
await after(s0);
|
|
110
|
-
await menuFor('IDPF-07', '[data-il-reopen]');
|
|
111
|
-
await until(async () => ((await row('IDPF-07')) || {}).status === 'on track');
|
|
112
|
-
await toastHas(/IDPF-07 is reopened/); // the demo store changes before the answer reaches the page, so wait for the toast too
|
|
113
|
-
ok('M8 Reopen from the row menu makes it active again', ((await row('IDPF-07')) || {}).status === 'on track' && /IDPF-07 is reopened/.test(await toast()), JSON.stringify([((await row('IDPF-07')) || {}).status, await toast()]));
|
|
114
|
-
|
|
115
|
-
await open('board:idpf:initiatives:q=IDPF-37&view=all');
|
|
116
|
-
await ready();
|
|
117
|
-
await menuFor('IDPF-37', '[data-il-archive]');
|
|
118
|
-
await until(() => st(() => !!document.querySelector('[data-il-do="archive"]')));
|
|
119
|
-
await page.click('[data-il-do="archive"]');
|
|
120
|
-
await until(async () => !!((await row('IDPF-37')) || {}).archived);
|
|
121
|
-
ok('M9 Archive takes it out of the list, with the reason', (((await row('IDPF-37')).archived) || {}).reason === 'Not related to this board' && await until(async () => !(await rows()).includes('IDPF-37')));
|
|
122
|
-
s0 = await seq();
|
|
123
|
-
await page.fill('[data-ibb="q"]', '');
|
|
124
|
-
await page.keyboard.press('Enter');
|
|
125
|
-
await after(s0);
|
|
126
|
-
s0 = await seq();
|
|
127
|
-
await page.click('[data-ibb="show-archive"]');
|
|
128
|
-
await after(s0);
|
|
129
|
-
const arch = await rows();
|
|
130
|
-
ok('M10 "N archived" opens the archive: the archived and the merged, each with Restore or Undo merge', ['IDPF-37', 'IDPF-154', 'IDPF-155'].every((x) => arch.includes(x))
|
|
131
|
-
&& await st(() => /Undo merge/.test(document.querySelector('[data-ibb-row="IDPF-155"]').textContent) && /Restore/.test(document.querySelector('[data-ibb-row="IDPF-37"]').textContent)), arch.join());
|
|
132
|
-
await page.click('[data-il-restore="IDPF-37"]');
|
|
133
|
-
await until(async () => !((await row('IDPF-37')) || {}).archived);
|
|
134
|
-
ok('M11 Restore brings it back as it was', !(await row('IDPF-37')).archived && await until(async () => !(await rows()).includes('IDPF-37')));
|
|
135
|
-
|
|
136
|
-
/* merge: the duplicate hint, the picked task moves, Undo merge moves it back */
|
|
137
|
-
await open('board:idpf:initiatives:q=IDPF-151');
|
|
138
|
-
await ready();
|
|
139
|
-
ok('M12 a likely duplicate shows the hint', /Looks like a duplicate of IDPF-12/.test(await st(() => document.querySelector('[data-ibb-row="IDPF-151"]').textContent)));
|
|
140
|
-
await page.click('[data-il-merge="IDPF-151"]');
|
|
141
|
-
await until(() => st(() => !!document.querySelector('[data-il-do="merge"]')));
|
|
142
|
-
ok('M13 Merge picks the most alike first and lists what moves', await st(() => document.querySelector('[data-il-set="pick"][aria-pressed="true"]').dataset.v === 'IDPF-12' && document.querySelector('[data-il-move="tasks"]').checked) && /Merge into IDPF-12/.test(await sheetText()));
|
|
143
|
-
await page.click('[data-il-do="merge"]');
|
|
144
|
-
await until(async () => !!((await row('IDPF-151')) || {}).archived);
|
|
145
|
-
const moved = await store(() => window.__c3boards.tasks.find((t) => t.id === 'task-demo-l1').initiative);
|
|
146
|
-
ok('M14 the merge archives the duplicate as Merged into IDPF-12 and moves its task', ((await row('IDPF-151')).archived || {}).into === 'IDPF-12' && moved === 'IDPF-12', moved);
|
|
147
|
-
await toastHas(/IDPF-151 merged into IDPF-12/);
|
|
148
|
-
await undo();
|
|
149
|
-
await until(async () => !((await row('IDPF-151')) || {}).archived);
|
|
150
|
-
ok('M15 Undo merge moves the task back and restores the duplicate', await store(() => window.__c3boards.tasks.find((t) => t.id === 'task-demo-l1').initiative) === 'IDPF-151');
|
|
151
|
-
|
|
152
|
-
/* ── P · the initiative page ── */
|
|
153
|
-
await open('ini:idpf:IDPF-152:overview');
|
|
154
|
-
const ban = await st(() => (document.querySelector('[data-il="banner"]') || {}).textContent || '');
|
|
155
|
-
ok('P1 an on-hold initiative: the banner with the reason and the check-back day, Resume and Cancel', /On hold since/.test(ban) && /Q1 budget/.test(ban) && /Check back/.test(ban) && /Resume/.test(ban), ban);
|
|
156
|
-
await page.click('[data-il-menu="IDPF-152"]');
|
|
157
|
-
const pm = await st(() => [...document.querySelectorAll('[data-ini="menu"] .ini-mlbl')].map((n) => n.textContent).join(','));
|
|
158
|
-
ok('P2 the page "…" menu holds This initiative, Status and Tidy up', pm === 'This initiative,Status,Tidy up' && await st(() => !!document.querySelector('[data-ini="menu"] [data-il-resume]')), pm);
|
|
159
|
-
await page.keyboard.press('Escape');
|
|
160
|
-
await page.click('[data-il="banner"] [data-il-resume]');
|
|
161
|
-
await until(async () => ((await row('IDPF-152')) || {}).status === 'on track');
|
|
162
|
-
ok('P3 Resume from the banner: active again, the banner is gone', await until(() => st(() => !document.querySelector('[data-il="banner"]'))));
|
|
163
|
-
await open('ini:idpf:IDPF-155:overview');
|
|
164
|
-
const mban = await st(() => (document.querySelector('[data-il="banner"]') || {}).textContent || '');
|
|
165
|
-
ok('P4 a merged initiative: the banner names where it went, with Undo merge', /Merged into IDPF-07/.test(mban) && /Undo merge/.test(mban), mban);
|
|
166
|
-
await H.finish();
|
|
167
|
-
})();
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* PMOS workspace — the console3 Initiatives page (/console.html, mockup v5; PRD planning/prd/console3-initiatives-parity-prd.md), its shell:
|
|
3
|
-
* Portfolio, a board's frame and setup, the board settings, New board, New initiative, an initiative's header, stepper and workflow
|
|
4
|
-
* editor. DEMO mode (?demo=1): c3-demo-boards.js answers every /api/boards read and write from its in-memory fixture, so the server only
|
|
5
|
-
* serves the page. Nothing here writes a repository.
|
|
6
|
-
*
|
|
7
|
-
* The files it drives (named so `run-tests.js --changed` traces a change in any of them to this suite): public/pm/c3-initiatives.js,
|
|
8
|
-
* c3-initiatives.css, c3-ini-ui.js, c3-ini-work.js, c3-ini-timeline.js, c3-ini-records.js, c3-demo-boards.js, c3-demo.js, c3-shell.js,
|
|
9
|
-
* c3-sheet.js, c3-toast.js, c3-ib-initiatives.js, c3-ii-tabs.js and c3-ini-harness.js. Its list fragment is test-lists/c3-initiative-boards.json.
|
|
10
|
-
*/
|
|
11
|
-
'use strict';
|
|
12
|
-
const { harness } = require('./c3-ini-harness');
|
|
13
|
-
|
|
14
|
-
(async () => {
|
|
15
|
-
const H = await harness('c3-initiatives');
|
|
16
|
-
const { page, ok, until, st, open, toast } = H;
|
|
17
|
-
const store = (f) => st(f);
|
|
18
|
-
|
|
19
|
-
/* ── Portfolio ── */
|
|
20
|
-
await open('');
|
|
21
|
-
const ids = await until(() => st(() => [...document.querySelectorAll('[data-ini="boards"] [data-ini-board]')].map((r) => r.dataset.iniBoard).join(',')));
|
|
22
|
-
ok('N1 the Portfolio lists the 5 boards in order', ids === 'idpf,pay,growth,office,hiring', ids);
|
|
23
|
-
const pf = await st(() => document.querySelector('[data-ini="portfolio"]').closest('[data-ini="page"]').textContent);
|
|
24
|
-
ok('N2 the header counts boards, initiatives and new asks; the sentence names the boards off track', /5 boards/.test(pf) && /315 initiatives/.test(pf) && /4 new asks/.test(pf) && /1 board is off track/.test(pf), pf.slice(0, 300));
|
|
25
|
-
const idpfRow = await st(() => document.querySelector('[data-ini-board="idpf"]').textContent);
|
|
26
|
-
ok('N3 a board row shows health, owner, Build and deliver with its Jira key, the four categories and the next release',
|
|
27
|
-
/Needs attention/.test(idpfRow) && /Build and deliver/.test(idpfRow) && /Jira · IDPF/.test(idpfRow) && /Discover\s*29/.test(idpfRow) && /Learn\s*31/.test(idpfRow) && /IDPF 3\.1/.test(idpfRow), idpfRow.slice(0, 300));
|
|
28
|
-
const offRow = await st(() => document.querySelector('[data-ini-board="office"]').textContent);
|
|
29
|
-
ok('N4 a board with Build and deliver off says PMOS tasks only', /PMOS tasks only/.test(offRow) && !/Jira/.test(offRow), offRow.slice(0, 200));
|
|
30
|
-
const tl = await until(() => st(() => { const t = document.querySelector('[data-ini="pf-timeline"] .ini-tl'); return t && t.querySelectorAll('[data-tlb]').length; }));
|
|
31
|
-
ok('N5 the timeline across boards draws board > initiative > epic bars with a Today line', tl > 10 && await st(() => !!document.querySelector('[data-ini="pf-timeline"] .ini-tlnow')), String(tl));
|
|
32
|
-
const asks = await st(() => [...document.querySelectorAll('[data-ini-asks]')].map((n) => n.dataset.iniAsks));
|
|
33
|
-
ok('N6 the asks card links each board with new asks to its Triage', asks.includes('idpf') && asks.includes('pay') && asks.includes('office'), asks.join(','));
|
|
34
|
-
|
|
35
|
-
/* ── a board ── */
|
|
36
|
-
await page.click('[data-ini-open-board="idpf"]');
|
|
37
|
-
await until(() => st(() => !!document.querySelector('[data-ini-board-page="idpf"] [data-ini="board-tabs"]')));
|
|
38
|
-
const tabs = await st(() => [...document.querySelectorAll('[data-ini="board-tabs"] [data-ini-tab]')].map((b) => b.dataset.iniTab).join(','));
|
|
39
|
-
ok('B1 a Build and deliver board has the nine tabs, Summary first', tabs === 'summary,initiatives,triage,backlog,board,timeline,releases,docs,sprints', tabs);
|
|
40
|
-
ok('B2 the URL keeps the place: init=board:idpf:summary', (await st(() => new URLSearchParams(location.search).get('init'))) === 'board:idpf:summary');
|
|
41
|
-
const setup = await st(() => document.querySelector('[data-ini="setup"]').textContent);
|
|
42
|
-
ok('B3 the setup chips say Build and deliver on, the Jira project and the default workflow', /Build and deliver on/.test(setup) && /IDPF/.test(setup) && /start with Product/.test(setup), setup);
|
|
43
|
-
const glance = await until(() => st(() => document.querySelectorAll('[data-ini="glance"] [data-ini-row]').length));
|
|
44
|
-
ok('B4 Summary lists initiatives at a glance with their own stage dots', glance > 0 && await st(() => !!document.querySelector('[data-ini="glance"] .ini-steps')), String(glance));
|
|
45
|
-
await page.click('[data-ini-catgo="Do"]');
|
|
46
|
-
await until(() => st(() => /Do/.test((document.querySelector('[data-ibb-unset="cat"]') || {}).textContent || '')));
|
|
47
|
-
ok('B5 a category bar opens the Initiatives tab filtered to that category', /board:idpf:initiatives:/.test(await st(() => new URLSearchParams(location.search).get('init'))) && await st(() => /Do/.test((document.querySelector('[data-ibb-unset="cat"]') || {}).textContent || '')));
|
|
48
|
-
await page.reload({ waitUntil: 'load' });
|
|
49
|
-
await until(() => st(() => /Do/.test((document.querySelector('[data-ibb-unset="cat"]') || {}).textContent || '')));
|
|
50
|
-
ok('B6 a reload comes back to the same tab and filter', await st(() => document.querySelector('[data-ini-tab="initiatives"]').getAttribute('aria-pressed') === 'true' && /Do/.test((document.querySelector('[data-ibb-unset="cat"]') || {}).textContent || '')));
|
|
51
|
-
|
|
52
|
-
await open('board:office:summary');
|
|
53
|
-
const offTabs = await st(() => [...document.querySelectorAll('[data-ini="board-tabs"] [data-ini-tab]')].map((b) => b.dataset.iniTab).join(','));
|
|
54
|
-
ok('B7 a board with Build and deliver off has no Releases and no Sprints tab', offTabs === 'summary,initiatives,triage,backlog,board,timeline,docs', offTabs);
|
|
55
|
-
await open('board:office:sprints');
|
|
56
|
-
ok('B8 a Sprints URL on such a board falls back to Summary', await st(() => document.querySelector('[data-ini-tab="summary"]').getAttribute('aria-pressed') === 'true'));
|
|
57
|
-
|
|
58
|
-
/* ── board settings: turn Build and deliver on for Office move ── */
|
|
59
|
-
await page.click('[data-ini="board-settings"]');
|
|
60
|
-
await until(() => st(() => !!document.querySelector('[data-ini="settings-form"]')));
|
|
61
|
-
ok('S1 the settings sheet offers no Build template while Build and deliver is off', await st(() => document.querySelector('[data-ini-offer="fix"]').disabled && document.querySelector('[data-ini-offer="product"]').disabled));
|
|
62
|
-
await page.click('[data-ini="build"]');
|
|
63
|
-
await until(() => st(() => !!document.querySelector('[data-ini="jira-key"]')));
|
|
64
|
-
await page.fill('[data-ini="jira-key"]', 'off, mov');
|
|
65
|
-
ok('S2 turning it on offers the Build templates and asks for the Jira key', await st(() => !document.querySelector('[data-ini-offer="fix"]').disabled && document.querySelector('[data-ini-offer="fix"]').checked));
|
|
66
|
-
await page.click('[data-ini="settings-save"]');
|
|
67
|
-
await until(() => store(() => window.__c3boards.boards.find((b) => b.id === 'office').build === true));
|
|
68
|
-
const off = await store(() => { const b = window.__c3boards.boards.find((x) => x.id === 'office'); return { build: b.build, jira: b.jira, projects: (b.jiraProjects || []).join(), offer: b.offer }; });
|
|
69
|
-
ok('S3 Save posts buildDeliver: Office move mirrors Jira OFF and MOV (two Jira projects) and offers the Build templates', off.build === true && off.jira === 'OFF' && off.projects === 'OFF,MOV' && off.offer.includes('fix'), JSON.stringify(off));
|
|
70
|
-
const s4 = await until(async () => { const t = await toast(); return /Build and deliver on, mirroring Jira OFF/.test(t) && t; });
|
|
71
|
-
ok('S4 a toast says what changed', !!s4, await toast());
|
|
72
|
-
await until(() => st(() => !!document.querySelector('[data-ini-tab="sprints"]')));
|
|
73
|
-
ok('S5 the board now has Releases and Sprints', await st(() => !!document.querySelector('[data-ini-tab="releases"]') && !!document.querySelector('[data-ini-tab="sprints"]')));
|
|
74
|
-
|
|
75
|
-
/* ── New board ── */
|
|
76
|
-
await open('');
|
|
77
|
-
await page.click('[data-ini="new-board"]');
|
|
78
|
-
await page.fill('[data-ini="nb-name"]', 'Partner portal');
|
|
79
|
-
await page.click('[data-ini="nb-build"]');
|
|
80
|
-
ok('NB1 with Build and deliver off, the Build workflows cannot be the default', await st(() => document.querySelector('[data-ini="new-board-form"] [data-ini-tpl="product"]').disabled && !document.querySelector('[data-ini="new-board-form"] [data-ini-tpl="project"]').disabled));
|
|
81
|
-
await page.click('[data-ini="new-board-form"] [data-ini-tpl="simple"]');
|
|
82
|
-
await page.click('[data-ini="nb-create"]');
|
|
83
|
-
await until(() => st(() => !!document.querySelector('[data-ini-board-page="partner-portal"]')));
|
|
84
|
-
const nb = await store(() => { const b = window.__c3boards.boards.find((x) => x.id === 'partner-portal'); return b && { build: b.build, defTpl: b.defTpl }; });
|
|
85
|
-
ok('NB2 Create board adds the board (Build and deliver off, Simple by default) and opens its Triage', nb && nb.build === false && nb.defTpl === 'simple' && await st(() => document.querySelector('[data-ini-tab="triage"]').getAttribute('aria-pressed') === 'true'), JSON.stringify(nb));
|
|
86
|
-
|
|
87
|
-
/* ── a board whose open initiatives carry no work and none is featured still lists them at a glance ── */
|
|
88
|
-
await page.click('[data-ini-tab="initiatives"]');
|
|
89
|
-
await until(() => st(() => !!document.querySelector('[data-ini="new-initiative"]')));
|
|
90
|
-
await page.click('[data-ini="new-initiative"]');
|
|
91
|
-
await until(() => st(() => !!document.querySelector('[data-ini="new-ini-form"]')));
|
|
92
|
-
await page.fill('[data-ini="ni-title"]', 'Partner sign-up page');
|
|
93
|
-
await until(() => st(() => { const s = document.querySelector('select[data-ini="ni-anchor"]'); return !!s && !s.disabled; }));
|
|
94
|
-
await page.selectOption('[data-ini="ni-anchor"]', 'KR 2.1 Activation to 45%');
|
|
95
|
-
await page.click('[data-ini="ni-create"]');
|
|
96
|
-
await until(() => st(() => !!document.querySelector('[data-ini-crumb="board"]')));
|
|
97
|
-
await page.click('[data-ini-crumb="board"]');
|
|
98
|
-
await until(() => st(() => !!document.querySelector('[data-ini-tab="summary"]')));
|
|
99
|
-
await page.click('[data-ini-tab="summary"]');
|
|
100
|
-
const pg = await until(() => st(() => document.querySelector('[data-ini-panel="summary"] [data-ini-catgo]') && { rows: document.querySelectorAll('[data-ini="glance"] [data-ini-row]').length, empty: /No open initiatives yet/.test(document.querySelector('[data-ini-panel="summary"]').textContent) }));
|
|
101
|
-
ok('B9 Summary lists an open initiative at a glance even when it has no work and is not featured', pg && pg.rows === 1 && !pg.empty, JSON.stringify(pg));
|
|
102
|
-
|
|
103
|
-
/* ── New initiative, with its own workflow ── */
|
|
104
|
-
await open('board:idpf:initiatives');
|
|
105
|
-
await page.click('[data-ini="new-initiative"]');
|
|
106
|
-
await until(() => st(() => !!document.querySelector('[data-ini="new-ini-form"]')));
|
|
107
|
-
await page.fill('[data-ini="ni-title"]', 'Passwordless login with email OTP');
|
|
108
|
-
await page.click('[data-ini="ni-create"]');
|
|
109
|
-
ok('NI1 an initiative without an anchor is refused, and the sheet says why', /anchor/.test(await st(() => (document.querySelector('[data-ini="new-ini-form"] [data-ini="error"]') || {}).textContent || '')));
|
|
110
|
-
await until(() => st(() => { const s = document.querySelector('select[data-ini="ni-anchor"]'); return !!s && !s.disabled; }));
|
|
111
|
-
await page.selectOption('[data-ini="ni-anchor"]', 'KR 2.1 Activation to 45%');
|
|
112
|
-
const ap = await st(() => { const s = document.querySelector('select[data-ini="ni-anchor"]'); return { groups: [...s.querySelectorAll('optgroup')].map((g) => g.label), health: [...s.options].filter((o) => /^health:/.test(o.value)).length }; });
|
|
113
|
-
ok('NI3 the anchor is picked from the declared key results and health budgets, not typed', ap.groups.includes('Health budgets') && ap.health === 3 && ap.groups.some((g) => /^Objective/.test(g)), JSON.stringify(ap));
|
|
114
|
-
const nul = await st(() => [...document.querySelector('[data-ini="new-ini-form"]').childNodes].filter((n) => n.nodeType === 3 && /null/.test(n.textContent)).length);
|
|
115
|
-
ok('NI4 the New initiative sheet shows no stray "null" line', nul === 0, String(nul));
|
|
116
|
-
await page.click('[data-ini="new-ini-form"] [data-ini-tpl="research"]');
|
|
117
|
-
await page.click('[data-ini="ni-create"]');
|
|
118
|
-
await until(() => st(() => !!document.querySelector('[data-ini-page]') && !!document.querySelector('[data-ini="stepper"]')));
|
|
119
|
-
const steps = await st(() => [...document.querySelectorAll('[data-ini="stepper"] [data-ini-step]')].map((b) => b.dataset.iniStep).join(','));
|
|
120
|
-
ok('NI2 Create opens the new initiative on its own workflow (Research only: Discover, Plan, Evaluate)', steps === 'Discover,Plan,Evaluate', steps);
|
|
121
|
-
|
|
122
|
-
/* ── an initiative: tools, stepper, workflow editor ── */
|
|
123
|
-
await open('ini:idpf:IDPF-07:overview');
|
|
124
|
-
const head = await st(() => { const p = document.querySelector('[data-ini-page]'); const c = document.querySelector('[data-ini="crumbs"]').parentElement;
|
|
125
|
-
return { title: !!p.querySelector(':scope > .lh'), dash: [...c.querySelectorAll('button')].some((b) => b.textContent.trim() === 'Dashboard'), tag: /Jira not set|Jira · |PMOS tasks only/.test(p.textContent.split('Overview')[0]),
|
|
126
|
-
status: !!c.querySelector('[data-ini="ini-chips"]'), gear: !!document.querySelector('[data-ini="stepper"]').parentElement.querySelector('[data-ini="edit-workflow"]') }; });
|
|
127
|
-
ok('H1 the header is the breadcrumb row with the status, and the stepper row with the gear; no title row, Dashboard button or Jira tag', !head.title && !head.dash && !head.tag && head.status && head.gear, JSON.stringify(head));
|
|
128
|
-
await page.click('[data-ini="tools"]');
|
|
129
|
-
const strip = await until(() => st(() => { const m = document.querySelector('[data-ini="menu"]'); return m && [...m.querySelectorAll('[data-ini-tool]')].map((b) => b.dataset.iniTool).join(','); }));
|
|
130
|
-
ok('I1 Tools lists the tools of the current stage first (Plan: RICE, PRD, Done-criteria, ...)', /^rice,prd,rubric/.test(strip) && (await st(() => document.querySelector('[data-ini="menu"] .ini-mlbl').textContent)) === 'For Plan', strip);
|
|
131
|
-
const more = await st(() => document.querySelectorAll('[data-ini="menu"] [data-ini-moretool]').length);
|
|
132
|
-
ok('I2 then the tools of the other stages, grouped by stage', more > 3 && /Discover/.test(await st(() => document.querySelector('[data-ini="menu"]').textContent)), String(more));
|
|
133
|
-
await page.keyboard.press('Escape');
|
|
134
|
-
ok('I3 Escape closes the menu', await until(() => st(() => !document.querySelector('[data-ini="menu"]'))));
|
|
135
|
-
await page.click('[data-ini-step="Build & Deliver"]');
|
|
136
|
-
await until(() => st(() => document.querySelector('[data-ini-step="Build & Deliver"]') && document.querySelector('[data-ini-step="Build & Deliver"]').getAttribute('aria-pressed') === 'true'));
|
|
137
|
-
const i4 = await until(async () => { const t = await toast(); return /moved to Build & Deliver/.test(t) && /No spec yet/.test(t) && t; });
|
|
138
|
-
ok('I4 a stepper press moves the stage; the order warning is shown, not a block', !!i4, await toast());
|
|
139
|
-
ok('I5 the move is written to the store', await store(() => window.__c3boards.rows.find((r) => r.id === 'IDPF-07').stage === 'Build & Deliver'));
|
|
140
|
-
|
|
141
|
-
await page.click('[data-ini="edit-workflow"]');
|
|
142
|
-
await until(() => st(() => !!document.querySelector('[data-ini="wf-editor"]')));
|
|
143
|
-
ok('W1 the editor offers only the templates the board offers', await st(() => !document.querySelector('[data-wf-tpl="fix"]').disabled && document.querySelector('[data-wf-tpl="project"]').disabled));
|
|
144
|
-
const wfRow = await st(() => { const r = document.querySelector('[data-wf-row="0"]'); const top = (s) => Math.round(r.querySelector(s).getBoundingClientRect().top); const nb = r.querySelector('.nb');
|
|
145
|
-
return { grip: top('[data-wf-drag]'), name: top('[data-wf-name]'), del: top('[data-wf-del]'), dup: [...nb.querySelectorAll('.chips > *')].some((c) => c.textContent.trim() === document.querySelector('[data-wf-cat="0"]').value),
|
|
146
|
-
mono: getComputedStyle(document.querySelector('[data-ini="wf-editor"] [role="group"] > span')).fontFamily !== getComputedStyle(document.querySelector('[data-ini="wf-editor"]')).fontFamily }; });
|
|
147
|
-
ok('W1b each stage is one row (grip, name and remove on one line); no chip repeats the category; the template label is not mono', Math.abs(wfRow.grip - wfRow.del) < 8 && Math.abs(wfRow.name - wfRow.del) < 8 && !wfRow.dup && !wfRow.mono, JSON.stringify(wfRow));
|
|
148
|
-
await page.focus('[data-wf-down="0"]'); await page.keyboard.press('Enter');
|
|
149
|
-
const order = await st(() => [...document.querySelectorAll('[data-wf-name]')].map((i) => i.value).join(','));
|
|
150
|
-
ok('W2 a stage moves down from the keyboard', order.startsWith('Plan,Discover'), order);
|
|
151
|
-
await page.click('[data-wf-tpl="research"]');
|
|
152
|
-
await page.click('[data-wf-save]');
|
|
153
|
-
await until(() => st(() => !!document.querySelector('[data-ini="wf-confirm"]')));
|
|
154
|
-
ok('W3 removing the current stage asks where it goes before saving', /Move IDPF-07 from Build & Deliver to Plan/.test(await st(() => document.querySelector('[data-ini="wf-confirm"]').textContent)));
|
|
155
|
-
await page.click('[data-wf-confirm]');
|
|
156
|
-
await until(() => store(() => window.__c3boards.rows.find((r) => r.id === 'IDPF-07').template === 'research'));
|
|
157
|
-
const r07 = await store(() => { const r = window.__c3boards.rows.find((x) => x.id === 'IDPF-07'); return { stage: r.stage, wf: (r.workflow || []).map((s) => s.name).join(',') }; });
|
|
158
|
-
ok('W4 the initiative now runs Research only and moved to Plan; other initiatives keep theirs', r07.stage === 'Plan' && r07.wf === 'Discover,Plan,Evaluate'
|
|
159
|
-
&& await store(() => !window.__c3boards.rows.find((r) => r.id === 'IDPF-12').template), JSON.stringify(r07));
|
|
160
|
-
|
|
161
|
-
/* ── Jira epics of an initiative (jira-epic-items): in the page "…" menu ── */
|
|
162
|
-
await page.click('[data-il-menu="IDPF-07"]');
|
|
163
|
-
await page.click('[data-ini="menu"] [data-ini="jira-epics"]');
|
|
164
|
-
await until(() => st(() => !!document.querySelector('[data-ini="epics-input"]')));
|
|
165
|
-
await page.fill('[data-ini="epics-input"]', 'IDPF-900, XX-1');
|
|
166
|
-
await page.click('[data-ini="epics-save"]');
|
|
167
|
-
const epErr = await until(() => st(() => { const e = document.querySelector('[data-ini="epics-form"] [data-ini="error"]'); return e && e.textContent; }));
|
|
168
|
-
ok('E1 an epic outside the board\'s Jira projects is refused, and the sheet says why', /XX-1 is not in a Jira project of IDPF/.test(epErr || ''), epErr);
|
|
169
|
-
await page.fill('[data-ini="epics-input"]', 'idpf-900, idpf-901');
|
|
170
|
-
await page.click('[data-ini="epics-save"]');
|
|
171
|
-
await until(() => store(() => (window.__c3boards.rows.find((r) => r.id === 'IDPF-07').epics || []).length === 2));
|
|
172
|
-
await until(() => st(() => !document.querySelector('[data-ini="epics-input"]')));
|
|
173
|
-
await page.click('[data-il-menu="IDPF-07"]');
|
|
174
|
-
const epChip = await until(() => st(() => { const c = document.querySelector('[data-ini="menu"] [data-ini="jira-epics"]'); return c && /Jira epics IDPF-900, IDPF-901/.test(c.textContent) && c.textContent; }));
|
|
175
|
-
ok('E2 the epics are saved upper-cased, and the page menu names them', !!epChip, epChip);
|
|
176
|
-
await page.keyboard.press('Escape');
|
|
177
|
-
|
|
178
|
-
/* ── phone width ── */
|
|
179
|
-
await page.setViewportSize({ width: 400, height: 860 });
|
|
180
|
-
for (const loc of ['', 'board:idpf:summary', 'ini:idpf:IDPF-12:overview']) {
|
|
181
|
-
await open(loc);
|
|
182
|
-
const sx = await st(() => document.documentElement.scrollWidth - document.documentElement.clientWidth);
|
|
183
|
-
ok('P1 at 400 px nothing scrolls sideways: ' + (loc || 'portfolio'), sx <= 0, String(sx));
|
|
184
|
-
}
|
|
185
|
-
await H.finish();
|
|
186
|
-
})();
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* c3-light-load-test.js — the desktop console's light first load in a browser (initiative c3-desktop-light-load, PRD R1 to R6).
|
|
3
|
-
* Real mode at 1440 wide on a scratch server: what the Briefing loads and reads on open, then that each tab, Settings, the
|
|
4
|
-
* calendar popup and the dock still load when they are first opened. light-load.test.js checks the module graph and the routes. */
|
|
5
|
-
'use strict';
|
|
6
|
-
const path = require('path');
|
|
7
|
-
const { spawn } = require('child_process');
|
|
8
|
-
const { findBrowser } = require('./lib/find-browser');
|
|
9
|
-
const T = require('./test-run').configure({ name: 'c3-light-load' });
|
|
10
|
-
|
|
11
|
-
const BASE = T.BASE;
|
|
12
|
-
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
13
|
-
// Settings and the dock tree get 30 s: a loaded CI runner took longer than 15 s to draw them (twice on one run, 33/33 locally)
|
|
14
|
-
const until = async (fn, ms = 15000, step = 150) => { const t0 = Date.now(); for (;;) { const v = await fn(); if (v) return v; if (Date.now() - t0 > ms) return v; await sleep(step); } };
|
|
15
|
-
let pass = 0; let fail = 0;
|
|
16
|
-
const ok = (name, cond, extra = '') => { if (cond) pass++; else fail++; console.log(`${cond ? '✓' : '✗'} ${name}${!cond && extra !== '' ? ' — ' + extra : ''}`); };
|
|
17
|
-
let srv = null; let browser = null;
|
|
18
|
-
const finish = async () => {
|
|
19
|
-
if (browser) await browser.close().catch(() => {});
|
|
20
|
-
if (srv) { try { srv.kill('SIGKILL'); } catch { /* gone */ } }
|
|
21
|
-
T.killTmux();
|
|
22
|
-
console.log(`\n${pass}/${pass + fail} c3-light-load assertions passed`);
|
|
23
|
-
process.exit(fail ? 1 : 0);
|
|
24
|
-
};
|
|
25
|
-
process.on('unhandledRejection', (e) => { console.error(e); fail++; finish(); });
|
|
26
|
-
|
|
27
|
-
(async () => {
|
|
28
|
-
const exe = findBrowser();
|
|
29
|
-
if (!exe) { ok('a Chrome or Chromium is on this machine', false); return finish(); }
|
|
30
|
-
const { chromium } = require('playwright-core');
|
|
31
|
-
srv = spawn(process.execPath, [path.join(__dirname, 'server.js')], { cwd: __dirname, stdio: 'ignore', env: T.env({ PMOS_WS_PORT: String(T.PORT) }) });
|
|
32
|
-
await T.waitForServer(BASE);
|
|
33
|
-
browser = await chromium.launch({ executablePath: exe });
|
|
34
|
-
const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } });
|
|
35
|
-
await ctx.addInitScript(() => { try { localStorage.removeItem('pmos.c3.dock'); } catch { /* none */ } });
|
|
36
|
-
const page = await ctx.newPage();
|
|
37
|
-
const errors = []; const gets = []; const scripts = new Set();
|
|
38
|
-
page.on('pageerror', (e) => errors.push(String((e && e.message) || e)));
|
|
39
|
-
page.on('request', (r) => {
|
|
40
|
-
const u = new URL(r.url());
|
|
41
|
-
if (u.pathname.startsWith('/api/') && r.method() === 'GET') gets.push({ path: u.pathname, q: u.search, at: Date.now() });
|
|
42
|
-
if (r.resourceType() === 'script') scripts.add(u.pathname.split('/').pop());
|
|
43
|
-
});
|
|
44
|
-
await page.goto(BASE + '/console.html');
|
|
45
|
-
ok('the Briefing draws', !!(await until(() => page.evaluate(() => !!document.querySelector('[data-c3pg="pulse"]') && !!document.querySelector('[data-c3pg="deck-host"]')))));
|
|
46
|
-
await sleep(8000); // the deferred badge reads and the dock's first read
|
|
47
|
-
const t0 = gets.length ? gets[0].at : Date.now();
|
|
48
|
-
const first = gets.filter((g) => g.at - t0 < 12000);
|
|
49
|
-
const paths = first.map((g) => g.path);
|
|
50
|
-
|
|
51
|
-
/* R1: the code of the other tabs is not loaded */
|
|
52
|
-
/* 55 before briefing-prioritization; its one pure module (priority-model.js, the ranking Needs you, the deck, Mentions and Work all share) makes 56 */
|
|
53
|
-
ok('R1: the desktop console loads at most 56 script files on open', scripts.size <= 56, scripts.size + ' files');
|
|
54
|
-
for (const m of ['calendar-views.js', 'c3-initiatives.js', 'c3-reports.js', 'c3-settings.js', 'c3-phone.js', 'c3-doc-sheet.js', 'view-notes.js'])
|
|
55
|
-
ok('R1: ' + m + ' is not loaded on open', !scripts.has(m));
|
|
56
|
-
/* R2: the folded dock reads only the runs */
|
|
57
|
-
ok('R2: the dock is folded', await page.evaluate(() => document.querySelector('[data-c3pg="dock"]').hidden));
|
|
58
|
-
for (const p of ['/api/sessions', '/api/git/worktrees', '/api/sessions/transcript', '/api/scratchpad'])
|
|
59
|
-
ok('R2: the folded dock does not read ' + p, !paths.includes(p));
|
|
60
|
-
ok('R2: the runs are read for the agent button', paths.includes('/api/runs'));
|
|
61
|
-
/* R3, R4: the badges read counts and the needs are read by kind */
|
|
62
|
-
const needs = first.filter((g) => g.path === '/api/needs');
|
|
63
|
-
ok('R4: every needs read names its kinds', needs.length > 0 && needs.every((g) => /[?&]kind=/.test(g.q)), JSON.stringify(needs.map((g) => g.q)));
|
|
64
|
-
const items = first.filter((g) => g.path === '/api/pm-items');
|
|
65
|
-
ok('R3: the Work badge reads the counts alone', items.length === 1 && /counts=1/.test(items[0].q), JSON.stringify(items.map((g) => g.q)));
|
|
66
|
-
/* R5: the pulse reads the gantt rows alone */
|
|
67
|
-
const cal = first.filter((g) => g.path === '/api/calendar-views');
|
|
68
|
-
ok('R5: the pulse reads the quarter once, rows only', cal.length === 1 && /only=gantt/.test(cal[0].q), JSON.stringify(cal.map((g) => g.q)));
|
|
69
|
-
/* R6: no read twice on open (the briefing's two reads have different questions) */
|
|
70
|
-
const seen = new Map(); for (const g of first) { const k = g.path + g.q; seen.set(k, (seen.get(k) || 0) + 1); }
|
|
71
|
-
const twice = [...seen.entries()].filter(([k, n]) => n > 1 && !k.startsWith('/api/runs') && !k.startsWith('/api/sources'));
|
|
72
|
-
ok('R6: no read is made twice on open', twice.length === 0, JSON.stringify(twice));
|
|
73
|
-
ok('R6: the scan and the report cards read once each', ['/api/scan/portfolio', '/api/report-setups', '/api/report-documents'].every((p) => first.filter((g) => g.path === p).length === 1));
|
|
74
|
-
ok('the badges show their numbers', await page.evaluate(() => ['work-count', 'init-count', 'brief-count'].every((k) => !!document.querySelector('[data-c3pg="' + k + '"]'))));
|
|
75
|
-
|
|
76
|
-
/* each place still opens */
|
|
77
|
-
await page.click('[data-c3-tab="cal"]');
|
|
78
|
-
ok('Calendar: its code loads on the first press', !!(await until(() => scripts.has('calendar-views.js'))));
|
|
79
|
-
ok('Calendar: the page draws', !!(await until(() => page.evaluate(() => { const p = document.querySelector('[data-c3-pane="cal"]'); return !!p && !p.hidden && p.children.length > 0 && !p.querySelector('[data-c3pg="tab-error"]'); }), 30000)));
|
|
80
|
-
await page.click('[data-c3-tab="init"]');
|
|
81
|
-
ok('Initiatives: its code loads and the page draws', !!(await until(() => scripts.has('c3-initiatives.js') && page.evaluate(() => { const p = document.querySelector('[data-c3-pane="init"]'); return !!p && !p.hidden && p.children.length > 0 && !p.querySelector('[data-c3pg="tab-error"]'); }), 30000)));
|
|
82
|
-
await page.click('[data-c3-tab="rep"]');
|
|
83
|
-
ok('Reports: its code loads and the page draws', !!(await until(() => scripts.has('c3-reports.js') && page.evaluate(() => !!document.querySelector('[data-c3-pane="rep"] [data-rp3]')))));
|
|
84
|
-
await page.click('[data-c3pg="settings"]');
|
|
85
|
-
ok('Settings: its code loads and the page draws', !!(await until(() => scripts.has('c3-settings.js') && page.evaluate(() => { const p = document.querySelector('[data-c3-pane="settings"]'); return !!p && !p.hidden && p.children.length > 0 && !p.querySelector('[data-c3pg="tab-error"]'); }), 30000)));
|
|
86
|
-
await page.click('[data-c3-tab="brief"]');
|
|
87
|
-
const before = gets.length;
|
|
88
|
-
await page.keyboard.press('Control+j');
|
|
89
|
-
ok('Dock: opening it reads the sessions and the working trees', !!(await until(() => gets.slice(before).some((g) => g.path === '/api/sessions') && gets.slice(before).some((g) => g.path === '/api/git/worktrees'))));
|
|
90
|
-
ok('Dock: the tree draws', !!(await until(() => page.evaluate(() => { const t = document.querySelector('[data-c3pg="dock-tree"]'); return !!t && !document.querySelector('[data-c3pg="dock"]').hidden && !/Reading the repository/.test(t.textContent); }), 30000)));
|
|
91
|
-
await page.keyboard.press('Control+j');
|
|
92
|
-
await page.evaluate(() => { if (document.activeElement && document.activeElement.blur) document.activeElement.blur(); });
|
|
93
|
-
await page.keyboard.press('c'); // the key C opens the calendar popup (the header button may be in the quiet layout's overflow)
|
|
94
|
-
ok('Calendar popup: the calendar draws in it', !!(await until(() => page.evaluate(() => { const h = document.querySelector('[data-c3pg="calpop-host"]'); return !!h && !h.querySelector('[data-c3pg="calpop-loading"]') && h.children.length > 0; }))));
|
|
95
|
-
await page.keyboard.press('Escape');
|
|
96
|
-
ok('no page error', errors.length === 0, errors.join(' | '));
|
|
97
|
-
await ctx.close();
|
|
98
|
-
|
|
99
|
-
/* a narrow window gets the phone companion, its code loaded then */
|
|
100
|
-
const pctx = await browser.newContext({ viewport: { width: 1000, height: 800 } });
|
|
101
|
-
const pp = await pctx.newPage(); const perr = [];
|
|
102
|
-
pp.on('pageerror', (e) => perr.push(String((e && e.message) || e)));
|
|
103
|
-
await pp.goto(BASE + '/console.html');
|
|
104
|
-
await until(() => pp.evaluate(() => !!document.querySelector('[data-c3pg="pulse"]')));
|
|
105
|
-
await pp.setViewportSize({ width: 400, height: 800 });
|
|
106
|
-
ok('Phone: narrowing the desktop console mounts the companion', !!(await until(() => pp.evaluate(() => !!document.querySelector('[data-c3ph]')))));
|
|
107
|
-
await pp.setViewportSize({ width: 1000, height: 800 });
|
|
108
|
-
ok('Phone: widening it again removes the companion', !!(await until(() => pp.evaluate(() => !document.querySelector('[data-c3ph]') && !document.getElementById('c3-root').classList.contains('c3-phone-on')))));
|
|
109
|
-
ok('Phone: no page error', perr.length === 0, perr.join(' | '));
|
|
110
|
-
await pctx.close();
|
|
111
|
-
finish();
|
|
112
|
-
})();
|