feat(editor): configure multi-statement result view
This commit is contained in:
17 files changed
+112
-6
No files matched your search
@@ -100,6 +100,10 @@ describe("EDITOR_SETTINGS_DRAFT_KEYS", () => {
|
||||
expect(EDITOR_SETTINGS_DRAFT_KEYS).toContain("dataGridTextFilterPanelHeight");
|
||||
});
|
||||
|
||||
it("includes the multi-statement default view", () => {
|
||||
expect(EDITOR_SETTINGS_DRAFT_KEYS).toContain("multiStatementDefaultView");
|
||||
});
|
||||
|
||||
it("includes the cell detail button visibility", () => {
|
||||
expect(EDITOR_SETTINGS_DRAFT_KEYS).toContain("dataGridCellDetailButtonVisible");
|
||||
});
|
||||
@@ -185,6 +189,10 @@ describe("editorSettingsDraftFromSettings", () => {
|
||||
expect(draft.dataGridTextFilterPanelHeight).toBe(224);
|
||||
});
|
||||
|
||||
it("maps the multi-statement default view from settings", () => {
|
||||
expect(editorSettingsDraftFromSettings(makeSettings({ multiStatementDefaultView: "summary" })).multiStatementDefaultView).toBe("summary");
|
||||
});
|
||||
|
||||
it("preserves the table-open default for legacy settings", () => {
|
||||
const settings = makeSettings();
|
||||
delete (settings as Partial<EditorSettings>).tableOpenPageSize;
|
||||
@@ -307,6 +315,13 @@ describe("editorSettingsPatchFromDraft", () => {
|
||||
expect(editorSettingsPatchFromDraft(visible, hidden)).toEqual({ dataGridCellDetailButtonVisible: true });
|
||||
});
|
||||
|
||||
it("includes the multi-statement default view when changed", () => {
|
||||
const result = editorSettingsDraftFromSettings(makeSettings({ multiStatementDefaultView: "result" }));
|
||||
const summary = editorSettingsDraftFromSettings(makeSettings({ multiStatementDefaultView: "summary" }));
|
||||
|
||||
expect(editorSettingsPatchFromDraft(summary, result)).toEqual({ multiStatementDefaultView: "summary" });
|
||||
});
|
||||
|
||||
it("includes continueOnErrorOnBatch in patch when changed", () => {
|
||||
const settings = makeSettings({ continueOnErrorOnBatch: false });
|
||||
const draft = editorSettingsDraftFromSettings(settings);
|
||||
|
||||
@@ -66,6 +66,18 @@ describe("settings search", () => {
|
||||
expect(SETTINGS_SEARCH_DEFINITIONS.map((definition) => definition.id)).not.toContain("editor-global-query-timeout");
|
||||
});
|
||||
|
||||
it("indexes the multi-statement default view and its settings control", () => {
|
||||
expect(SETTINGS_SEARCH_DEFINITIONS).toContainEqual({
|
||||
id: "multi-statement-default-view",
|
||||
category: "data",
|
||||
titleKey: "settings.multiStatementDefaultView",
|
||||
descriptionKey: "settings.multiStatementDefaultViewDescription",
|
||||
targetId: "multi-statement-default-view",
|
||||
});
|
||||
expect(settingsDialogSource).toContain('data-settings-search-id="multi-statement-default-view"');
|
||||
expect(settingsDialogSource).toContain('v-model="editMultiStatementDefaultView"');
|
||||
});
|
||||
|
||||
it("matches translated title, description, and category without changing declared order", () => {
|
||||
const entries = resolveSettingsSearchEntries(definitions, { isWeb: false, visibleCategories: allCategories }, translate, categoryLabels);
|
||||
expect(searchSettings(entries, "TYPEFACE", "en").map((entry) => entry.id)).toEqual(["font"]);
|
||||
|
||||
@@ -45,6 +45,7 @@ export const EDITOR_SETTINGS_DRAFT_KEYS = [
|
||||
"dataGridQuickEntry",
|
||||
"dataGridFilterEditorView",
|
||||
"dataGridTextFilterPanelHeight",
|
||||
"multiStatementDefaultView",
|
||||
"dataGridAutoTransposeSingleRow",
|
||||
"dataGridCellDetailButtonVisible",
|
||||
"dataGridCrosshairHighlight",
|
||||
|
||||
@@ -180,6 +180,7 @@ export const SETTINGS_SEARCH_DEFINITIONS: readonly SettingsSearchDefinition[] =
|
||||
{ id: "navigation-disconnect-tabs", category: "navigation", titleKey: "settings.disconnectTabHandlingMode", descriptionKey: "settings.disconnectTabHandlingModeDescription", targetId: "navigation" },
|
||||
{ id: "query-page-size", category: "data", titleKey: "settings.queryPageSize", descriptionKey: "settings.queryPageSizeDescription", targetId: "data" },
|
||||
{ id: "data-page-size", category: "data", titleKey: "settings.tableOpenPageSize", descriptionKey: "settings.tableOpenPageSizeDescription", targetId: "data" },
|
||||
{ id: "multi-statement-default-view", category: "data", titleKey: "settings.multiStatementDefaultView", descriptionKey: "settings.multiStatementDefaultViewDescription", targetId: "multi-statement-default-view" },
|
||||
{ id: "query-result-max-rows", category: "data", titleKey: "settings.queryResultMaxRows", descriptionKey: "settings.queryResultMaxRowsDescription", targetId: "data" },
|
||||
{ id: "data-grid-header-comments", category: "data", titleKey: "settings.showColumnCommentsInHeader", descriptionKey: "settings.showColumnCommentsInHeaderDescription", targetId: "data" },
|
||||
{ id: "data-grid-header-types", category: "data", titleKey: "settings.showColumnTypesInHeader", descriptionKey: "settings.showColumnTypesInHeaderDescription", targetId: "data" },
|
||||
|
||||
Reference in new issue
Block a user