Fix issue #91: Make character column always visible
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-15 21:56:49 +00:00
parent 98aa3be078
commit 30e23b643c
4 changed files with 265 additions and 145 deletions

View File

@@ -53,7 +53,6 @@ function tabBody(key) {
test("every tab shows only its own content and hides the others", () => {
const abilities = tabBody("abilities");
assert.match(abilities, /class="sheet-portrait"/, "the portrait stays with ability scores");
assert.match(abilities, /class="sheet-panel abilities-panel"/);
assert.match(abilities, /class="sheet-panel proficiencies-panel"/, "the proficiencies ride with the ability scores");
for (const other of ["inventory-panel", "traits-panel", "spells-panel"]) {
@@ -63,7 +62,12 @@ test("every tab shows only its own content and hides the others", () => {
for (const [key, panel] of [["inventory", "inventory-panel"], ["traits", "traits-panel"], ["spells", "spells-panel"]]) {
const body = tabBody(key);
assert.ok(body.includes(panel), `the ${key} tab shows the ${panel}`);
assert.doesNotMatch(body, /class="sheet-portrait"/);
}
// #91 took the character column out of the tabs: it stands beside every one of them, so no tab
// body holds the portrait (see tests/character-sheet-persistent-column.test.js).
for (const key of ["abilities", "inventory", "traits", "spells"]) {
assert.doesNotMatch(tabBody(key), /class="sheet-portrait"/, `the portrait is not the ${key} tab's to hide`);
}
// the panels are toggled, not unmounted, so editing on one tab and flipping away keeps the draft