Every Sokko TCG section now offers the top bar's toolbox button. Instead of linking a toolbox, the drawer lists all toolboxes (linked to a game or not) as wide rows with a large cover, opens the one chosen, and remembers it on the device. Memos and alerts follow the toolbox shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
872 B
JavaScript
17 lines
872 B
JavaScript
// Rôle : vérifie que les alertes visibles suivent la vue toolbox réellement affichée.
|
|
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { getVisibleToolboxIds } from "../website/src/hooks/useToolboxAlerts.js";
|
|
|
|
test("a mounted compact drawer is visible only while its toolbox view is selected", () => {
|
|
assert.deepEqual([...getVisibleToolboxIds("/games/mhwilds/monsters", "")], []);
|
|
assert.deepEqual([...getVisibleToolboxIds("/games/mhwilds/monsters", "linked")], ["linked"]);
|
|
});
|
|
|
|
test("the toolbox chosen in the Sokko TCG drawer is visible like a linked one", () => {
|
|
assert.deepEqual([...getVisibleToolboxIds("/cards/guild", "chosen")], ["chosen"]);
|
|
});
|
|
|
|
test("a full toolbox page remains visible independently of the game drawer", () => {
|
|
assert.deepEqual([...getVisibleToolboxIds("/toolbox/personal", "")], ["personal"]);
|
|
});
|