Elffuss BraidHub

utopia-ia/elffuss-code public

palette_text: read the menu bar the way main labels it

Main renamed View > Command Palette to "Command palette" and shows its
shortcut with the platform's own keys (⌘⇧P or Ctrl+Shift+P), so the check
that menu bar rows keep their label and hint looked for a row that no
longer exists. It now looks for that row by main's label and either form
of the shortcut.

Changeset73fca59181f436618c6a303bd7fca4735a888bc9886f1bd8f8d5e7164d762a05
AuthorKikoCis <kikocisneros@gmail.com> · 2026-10-12 10:16 +02:00
CommitterKikoCis <kikocisneros@gmail.com> · 2026-10-12 10:16 +02:00
Parents00c23ea566f6

Browse the files at this changeset

1 file changed

modified tests/palette_text.mjs +1 −1
@@ -66,7 +66,7 @@
6666 const rows = [...m.querySelectorAll('.menu-item')];
6767 return rows.length ? rows.map(r => [r.querySelector('b')?.textContent, r.querySelector('span')?.textContent ?? null]) : null;
6868 }));
69-ok('menu bar rows keep their label and hint', !!view && view.some(([l, h]) => l === 'Command Palette' && h === 'Cmd+Shift+P'), JSON.stringify(view?.slice(0, 4)));
69+ok('menu bar rows keep their label and hint', !!view && view.some(([l, h]) => /^Command palette$/i.test(l || '') && /^(⌘⇧P|Ctrl\+Shift\+P)$/.test(h || '')), JSON.stringify(view?.slice(0, 6)));
7070
7171 await sleep(300);
7272 ok('no handler from a file name ever ran', await page.evaluate(() => window.__xss === undefined));