mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 13:35:42 +09:00
fix(selfhost): branding image origins and theme colour (#3389)
This commit is contained in:
1 parent
cca8227ca6
commit
edc913096a
27 files changed
+724
-49
No files matched your search
@@ -362,4 +362,17 @@ describe('instance config billing on a hosted instance', () => {
|
||||
}).execute();
|
||||
expect(updated.app_public.branding.theme_color).toBe('#123456');
|
||||
});
|
||||
|
||||
it('rejects a theme colour that is not hex', async () => {
|
||||
const admin = await createAdmin(context.harness);
|
||||
for (const theme_color of ['rgb(123, 44, 228)', 'rebeccapurple', '#12345']) {
|
||||
await patchConfig(context.harness, admin, {app_public: {branding: {theme_color}}})
|
||||
.expect(HTTP_STATUS.BAD_REQUEST, APIErrorCodes.INVALID_FORM_BODY)
|
||||
.execute();
|
||||
}
|
||||
const cleared = await patchConfig(context.harness, admin, {
|
||||
app_public: {branding: {theme_color: null}},
|
||||
}).execute();
|
||||
expect(cleared.app_public.branding.theme_color).toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user