Fix issue #64: More modifications to the character sheet
Some checks failed
Test / test (push) Failing after 2s
Some checks failed
Test / test (push) Failing after 2s
This commit is contained in:
@@ -37,9 +37,10 @@ test("the tabs sit on the right as a vertical bookmark rail", () => {
|
||||
assert.match(template, /v-for="tab in tabs"[\s\S]*?:aria-selected="activeTab === tab\.key"/);
|
||||
const rail = /\.sheet-tabs\s*\{[^}]*\}/.exec(sheetSource)?.[0] ?? "";
|
||||
assert.match(rail, /flex-direction:\s*column/, "the bookmarks stack down the right edge");
|
||||
// content column and rail sit side by side, the rail hugging the right
|
||||
assert.match(sheetSource, /\.sheet-layout\s*\{[^}]*display:\s*flex[^}]*\}/, "content and rail share a row");
|
||||
assert.match(sheetSource, /\.sheet-content\s*\{[^}]*flex:\s*1[^}]*\}/, "the content takes the room, the rail stays slim");
|
||||
// #64 moved the rail out of the content: it hangs off the window border itself, so it is not
|
||||
// swept along when the sheet scrolls (see tests/character-sheet-portrait-column.test.js).
|
||||
assert.match(rail, /position:\s*absolute/, "the rail is mounted on the window frame");
|
||||
assert.match(rail, /left:\s*100%/, "the rail stands outside the window's right border");
|
||||
});
|
||||
|
||||
// Each tab shows only its own panels; the rest are hidden with v-show so an in-progress edit is
|
||||
@@ -54,7 +55,7 @@ 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 combat-panel"/, "combat rides with the ability scores");
|
||||
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"]) {
|
||||
assert.doesNotMatch(abilities, new RegExp(other));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user