Admin-teksten en merklogo: Weergavenaam, Wachtwoord wijzigen, Eerste account aanmaken, logo per thema
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ describe('resolveTheme', () => {
|
||||
|
||||
expect(path.basename(theme.css)).toBe('none.css');
|
||||
expect(theme.favicon).toBeNull();
|
||||
expect(theme.logo).toBeNull();
|
||||
expect(fs.readFileSync(theme.css, 'utf-8')).not.toMatch(/--[a-z-]+\s*:/);
|
||||
});
|
||||
|
||||
@@ -21,6 +22,25 @@ describe('resolveTheme', () => {
|
||||
expect(theme.favicon !== null && fs.existsSync(theme.favicon)).toBe(true);
|
||||
});
|
||||
|
||||
it('ships the asf brand logo for both colour modes', () => {
|
||||
const { logo } = resolveTheme('asf');
|
||||
|
||||
expect(logo).not.toBeNull();
|
||||
expect(fs.existsSync(logo!.onLight) && fs.existsSync(logo!.onDark)).toBe(true);
|
||||
});
|
||||
|
||||
it('treats a theme with only one logo variant as having no logo', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'themes-'));
|
||||
try {
|
||||
fs.mkdirSync(path.join(dir, 'half'));
|
||||
fs.writeFileSync(path.join(dir, 'half', 'theme.css'), '');
|
||||
fs.writeFileSync(path.join(dir, 'half', 'logo-on-light.png'), '');
|
||||
expect(resolveTheme('half', dir).logo).toBeNull();
|
||||
} finally {
|
||||
fs.rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it('lists the available themes', () => {
|
||||
expect(availableThemes()).toContain('asf');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user