mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 18:36:15 -08:00
test(settings): harden shared controls normalization coverage
This commit is contained in:
1 parent
2246840f71
commit
0e49a6f3e1
1 file changed
+16
@@ -92,6 +92,7 @@ describe('SettingsStore dashboard rail settings', () => {
|
||||
|
||||
await store.loadSettings();
|
||||
|
||||
expect(store.webPlayerSharedControls?.()).toBe(false);
|
||||
expect(store.getSettings().webPlayerSharedControls).toBe(false);
|
||||
});
|
||||
|
||||
@@ -110,6 +111,21 @@ describe('SettingsStore dashboard rail settings', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('serializes a malformed string "true" shared web controls update as false', async () => {
|
||||
const store = injector.get(SettingsStore);
|
||||
|
||||
await store.updateSettings({
|
||||
webPlayerSharedControls: 'true' as unknown as boolean,
|
||||
});
|
||||
|
||||
expect(storage.set).toHaveBeenCalledWith(
|
||||
STORE_KEY.Settings,
|
||||
expect.objectContaining({
|
||||
webPlayerSharedControls: false,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
it('deep-merges partial stored dashboard rail settings with enabled defaults', async () => {
|
||||
storedSettings = {
|
||||
player: VideoPlayer.VideoJs,
|
||||
|
||||
Reference in new issue
Block a user