diff --git a/src/pkg/dashboard/stage_tracker_human_gate_test.go b/src/pkg/dashboard/stage_tracker_human_gate_test.go index 5fe49ba69b..53cec8f3a2 100644 --- a/src/pkg/dashboard/stage_tracker_human_gate_test.go +++ b/src/pkg/dashboard/stage_tracker_human_gate_test.go @@ -225,3 +225,68 @@ assert.strictEqual(link[2], 'hivecommons/hive/issue#17451'); assert.strictEqual(link[3], 'decision pending on #17480'); `) } + +// TestStageTrackerHumanGateFoldsOnStackedHead pins the render-time fold from +// #17515: at the stacked-head breakpoint (STAGE_TRACKER_GATE_FOLD_QUERY) the +// pill keeps ONE verb inline and parks the rest in the … template, while +// the strip tier still shows STAGE_TRACKER_GATE_VISIBLE. The node harness +// has no matchMedia, so without a stub this arm never ran. +func TestStageTrackerHumanGateFoldsOnStackedHead(t *testing.T) { + html := indexHTML(t) + runStageTrackerRowActionsScript(t, stageTrackerRowsPreludeJS(t, html)+"\n"+ + jsFunc(t, html, "stageTrackerHumanAttentionOf")+"\n"+ + jsFunc(t, html, "stageTrackerNeedsHumanAsk")+"\n"+ + jsFunc(t, html, "stageTrackerHoldPill")+"\n"+ + jsFunc(t, html, "stageTrackerHoldTip")+"\n"+ + stageTrackerRowsFixtureJS+` +const seen = new Date(now - 60000).toISOString(); +const inlineVerbs = (html) => Array.from(html.split(']*>([^<]*)<\/button>/g)).map(m => m[1]); +const menuVerbs = (html) => { const tpl = /