feat: barre d'outils de lecture epinglee, coloration syntaxique des fichiers de code et avatars predefinis (#115, #117, BUG-078)
This commit is contained in:
@@ -111,6 +111,30 @@ test("style.css — .action-sep rule exists", () => {
|
||||
assert.match(css, /\.file-actions \.action-sep\s*\{[^}]*background:[^;]*;/);
|
||||
});
|
||||
|
||||
// ── #115 : barre d'outils collante au défilement ─────────────────────────
|
||||
test("viewer.js — action bar wrapped in a sticky .file-toolbar", () => {
|
||||
assert.match(viewer, /class:\s*"file-toolbar"[\s\S]{0,120}file-actions/,
|
||||
"the document action bar must live in a .file-toolbar wrapper");
|
||||
});
|
||||
|
||||
test("popout.html — action bar wrapped in a .file-toolbar", () => {
|
||||
assert.match(popout, /className\s*=\s*"file-toolbar"/,
|
||||
"popout action bar must live in a .file-toolbar wrapper");
|
||||
});
|
||||
|
||||
test("style.css — .file-toolbar is pinned to the top while scrolling", () => {
|
||||
const m = css.match(/\.file-toolbar\s*\{([\s\S]*?)\}/);
|
||||
assert.ok(m, ".file-toolbar rule missing");
|
||||
assert.match(m[1], /position:\s*sticky/, ".file-toolbar must be sticky");
|
||||
assert.match(m[1], /top:\s*0/, ".file-toolbar must pin to the top");
|
||||
assert.match(m[1], /background:/, ".file-toolbar needs an opaque background");
|
||||
});
|
||||
|
||||
test("style.css — reading mode hides the sticky toolbar", () => {
|
||||
assert.match(css, /body\.reading-mode\s+\.file-toolbar\s*[,{]/,
|
||||
"reading mode must hide .file-toolbar");
|
||||
});
|
||||
|
||||
if (process.exitCode) {
|
||||
console.error("\nToolbar order tests FAILED");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user