feat(xugu): mark public synonym scope in sidebar
This commit is contained in:
1 parent
b3fcb3a6f1
commit
0a239bddb2
2 files changed
+11
-1
No files matched your search
+6
@@ -3,6 +3,7 @@ import { fileURLToPath } from "node:url";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const runtimeSource = readFileSync(fileURLToPath(new URL("../SidebarTreeRuntimeHost.vue", import.meta.url)), "utf8");
|
||||
const treeItemSource = readFileSync(fileURLToPath(new URL("../TreeItem.vue", import.meta.url)), "utf8");
|
||||
|
||||
function functionSource(name: string): string {
|
||||
const start = runtimeSource.indexOf(`function ${name}(`);
|
||||
@@ -25,4 +26,9 @@ describe("Xugu public synonym actions", () => {
|
||||
expect(functionSource("dropSchema")).toContain("isXuguPublicSynonymTreeNode");
|
||||
expect(functionSource("confirmDropSchema")).toContain("isXuguPublicSynonymTreeNode");
|
||||
});
|
||||
|
||||
it("uses a distinct link icon for the database-global synonym scope", () => {
|
||||
expect(treeItemSource).toContain("isXuguPublicSynonymTreeNode(databaseType, node.type, node.schema)");
|
||||
expect(treeItemSource).toContain('return { icon: Link2, colorClass: "text-sky-500" }');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user