mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-02 13:39:41 +02:00
test(mobile): give the shell keyboard bar stub a classList.toggle
A semantic conflict between two PRs that were each green on their own: #268 added this test with a fake bar element whose classList carries only add/remove/contains, and #270 added syncReadMyMind() to init(), which toggles the RMM marker class with an explicit force argument. Neither branch saw the other, so the failure only appeared once both were on master. Production is unaffected: init() builds a real element via document.createElement, which has toggle. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -108,6 +108,14 @@ function fakeBarElement() {
|
||||
add: (name: string) => classes.add(name),
|
||||
remove: (name: string) => classes.delete(name),
|
||||
contains: (name: string) => classes.has(name),
|
||||
// init() calls syncReadMyMind(), which toggles the 🧠 marker class on the
|
||||
// bar with an explicit force argument.
|
||||
toggle: (name: string, force?: boolean) => {
|
||||
const on = force === undefined ? !classes.has(name) : force;
|
||||
if (on) classes.add(name);
|
||||
else classes.delete(name);
|
||||
return on;
|
||||
},
|
||||
},
|
||||
get innerHTML() {
|
||||
return html;
|
||||
|
||||
Reference in New Issue
Block a user