Compare commits

...

1 Commits

Author SHA1 Message Date
Kpa-clawbot 070dea8507 test(#1396): extend nav Priority+ E2E to /#/channels (RED)
Adds /#/channels to the NON_HIGH_ROUTES loop in test-nav-priority-1391-e2e.js
+ a new assertion locking the More-dropdown identity at viewports <=1200:

  More dropdown MUST contain exactly the 5 non-high non-active links
  (Channels/Tools/Observers/Analytics/Perf/Audio Lab minus active route).

Operator screenshot on /#/channels at ~1024px shows:
  - inline strip COMPLETELY EMPTY
  - More dropdown contains only 'Tools' (1 of 6 expected items)

#1391 (PR #1394) verified active-pill-inline contract on 4 non-high
routes (perf/audio-lab/analytics/observers) x 6 widths, but did NOT
exercise /channels — and the #1376 chat-app redesign may have
introduced a CSS interaction the existing test missed.

Test-only commit. Expected RED on CI.
2026-05-26 08:10:14 +00:00
+24 -1
View File
@@ -30,7 +30,12 @@ const HIGH_PRIORITY_HREFS = ['#/home', '#/packets', '#/map', '#/live', '#/nodes'
// Routes whose link is NOT data-priority="high" (verified via
// `grep data-priority public/index.html`). These exercise the
// "active pill is non-high" branch where the bug surfaces.
const NON_HIGH_ROUTES = ['#/perf', '#/audio-lab', '#/analytics', '#/observers'];
// #1396: extended to include /#/channels — operator screenshot at
// ~1024px on /#/channels showed the entire inline strip EMPTY AND
// More dropdown containing only one item (Tools). The /channels
// route uses #1376's chat-app redesign and was not previously
// covered by the #1391 fix verification loop.
const NON_HIGH_ROUTES = ['#/perf', '#/audio-lab', '#/analytics', '#/observers', '#/channels'];
// Operator screenshot was ~1080px. Cover the narrow-desktop CSS branch
// (≤1100) AND the measurement-loop branch (>1100) — bug reproduces in
@@ -161,6 +166,24 @@ async function main() {
`(more=[${data.moreItems.join(', ')}])`
);
// (4) #1396: in the narrow-desktop band (≤1200) the inline
// strip must hold the active pill AND every high-priority
// link AND nothing else — which means the More dropdown
// contains EXACTLY the 5 non-high non-active links. The
// operator screenshot was More=[Tools] only (1/6 expected)
// at ~1024px on /#/channels; this assertion locks the
// contract.
if (w <= 1200) {
const ALL_NON_HIGH = ['#/channels', '#/tools', '#/observers', '#/analytics', '#/perf', '#/audio-lab'];
const expectedMore = ALL_NON_HIGH.filter(h => h !== expectedActive).sort();
assert.deepStrictEqual(
[...data.moreItems].sort(),
expectedMore,
`${tag}: More dropdown must contain exactly the ${expectedMore.length} non-active non-high routes ` +
`[${expectedMore.join(', ')}], got [${data.moreItems.join(', ')}]`
);
}
passes++;
console.log(`${tag}: active inline + ${data.visibleHighPri.length}/5 high-pri inline + ` +
`More has ${data.moreItems.length} item(s)`);