feat(editor): add table ddl hover preview switch
This commit is contained in:
17 files changed
+54
-2
No files matched your search
@@ -4,6 +4,11 @@ import { describe, expect, it } from "vitest";
|
||||
const queryEditorSource = readFileSync(new URL("../../../components/editor/QueryEditor.vue", import.meta.url), "utf8");
|
||||
|
||||
describe("QueryEditor hover DDL copy", () => {
|
||||
it("gates only the table DDL branch on the preference, keeping column hover", () => {
|
||||
expect(queryEditorSource).not.toContain("if (!settingsStore.editorSettings.showTableDdlHoverPreview) return null;");
|
||||
expect(queryEditorSource).toContain("if (table && settingsStore.editorSettings.showTableDdlHoverPreview && !semanticQualifierIsRowSource");
|
||||
});
|
||||
|
||||
it("adds an accessible copy button that preserves SQL whitespace semantics", () => {
|
||||
expect(queryEditorSource).toContain('copyButton.textContent = t("grid.copyDdl");');
|
||||
expect(queryEditorSource).toContain('copyButton.setAttribute("aria-label", t("grid.copyDdl"));');
|
||||
|
||||
Reference in new issue
Block a user