fix(settings): open settings with reactive color schemes

This commit is contained in:
t8y2 committed 2026-08-19 20:44:56 +08:00
1 parent 4e74f77cc8
commit 5011468a9a
5 files changed
+33 -11

No files matched your search

@@ -71,7 +71,8 @@ describe("settings store type color scheme persistence", () => {
it("stages scheme edits in the settings draft", () => {
const dialogSource = readFileSync(new URL("../../components/editor/EditorSettingsDialog.vue", import.meta.url), "utf8");
expect(dialogSource).toContain("editDataGridTypeColorSchemes.value = structuredClone(schemes)");
expect(dialogSource).toContain("editDataGridTypeColorSchemes.value = cloneDataGridTypeColorSchemes(schemes)");
expect(dialogSource).not.toContain("structuredClone(settingsStore.editorSettings.dataGridTypeColorSchemes)");
expect(dialogSource).toContain("editActiveDataGridTypeColorSchemeId.value = activeId");
expect(dialogSource).not.toMatch(/settingsStore\.updateEditorSettings\w*\(\{[^}]*DataGridTypeColorScheme/);
});