All checks were successful
Deploy production / deploy (push) Successful in 2m36s
/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.
20 lines
695 B
TypeScript
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);
|
|
});
|
|
});
|