Fix issue #91: Make character column always visible
All checks were successful
Test / test (push) Successful in 2s
All checks were successful
Test / test (push) Successful in 2s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user