Files
website/src/lib/chrome.test.ts
Stan Runge bc58e97776
All checks were successful
Deploy production / deploy (push) Successful in 2m36s
start: show the normal site header on /start (with the owner dashboard button, highlighted there); no footer on the new-tab page
/start is no longer immersive, so it loads the lazily imported SiteChrome like other pages.
Only the book reader still skips the chrome. hidesFooter() keeps the footer off /start.
2026-10-24 16:03:06 +00:00

20 lines
695 B
TypeScript

import { describe, expect, it } from 'vitest';
import { hidesFooter, isImmersive } from './chrome';
describe('immersive pages', () => {
it('skips the site chrome on the book reader only', () => {
expect(isImmersive('/start')).toBe(false);
expect(isImmersive('/trackers/books/12/read')).toBe(true);
expect(isImmersive('/')).toBe(false);
expect(isImmersive('/starter')).toBe(false);
expect(isImmersive('/trackers/books/12')).toBe(false);
});
it('shows the header but no footer on /start', () => {
expect(hidesFooter('/start')).toBe(true);
expect(hidesFooter('/start/')).toBe(true);
expect(hidesFooter('/starter')).toBe(false);
expect(hidesFooter('/')).toBe(false);
});
});