mirror of
https://github.com/SoPat712/Speeder.git
synced 2026-08-20 12:06:19 -04:00
fix(settings): recognize all managed raw backups
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
"popupControllerButtons",
|
||||
"popupMatchHoverControls",
|
||||
"rememberSpeed",
|
||||
"shortcutTargetMode",
|
||||
"showAmbientLoopControls",
|
||||
"showPopupControlBar",
|
||||
"siteRules",
|
||||
"siteRulesFormat",
|
||||
|
||||
@@ -89,6 +89,17 @@ describe("canonical settings storage", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps every managed setting recognizable in legacy raw backups", () => {
|
||||
evaluateScript("extension/shared/import-export.js");
|
||||
const importExport = window.SpeederShared.importExport;
|
||||
|
||||
window.vscGetManagedSyncKeys().forEach(function (key) {
|
||||
expect(importExport.isRecognizedRawSettingsObject({ [key]: null })).toBe(
|
||||
true
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it("provides titles for built-in video rules and round-trips title edits sparsely", () => {
|
||||
const settings = window.vscExpandStoredSettings({});
|
||||
expect(settings.siteRules.map((rule) => rule.title)).toEqual([
|
||||
|
||||
@@ -241,6 +241,24 @@ describe("shared helpers", () => {
|
||||
localSettings: null
|
||||
});
|
||||
|
||||
expect(
|
||||
importExportUtils.extractImportSettings({
|
||||
showAmbientLoopControls: true
|
||||
})
|
||||
).toEqual({
|
||||
isWrappedBackup: false,
|
||||
settings: { showAmbientLoopControls: true },
|
||||
localSettings: null
|
||||
});
|
||||
|
||||
expect(
|
||||
importExportUtils.extractImportSettings({ shortcutTargetMode: "closest" })
|
||||
).toEqual({
|
||||
isWrappedBackup: false,
|
||||
settings: { shortcutTargetMode: "closest" },
|
||||
localSettings: null
|
||||
});
|
||||
|
||||
expect(importExportUtils.isRecognizedRawSettingsObject({ wat: true })).toBe(
|
||||
false
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user