fix(layout): wrap deep connection group path in editor toolbar
This commit is contained in:
1 parent
522e0dddf3
commit
b3b5e7cf29
2 files changed
+12
-2
No files matched your search
@@ -3,6 +3,7 @@ import { describe, expect, it } from "vitest";
|
||||
|
||||
const searchableSelectSource = readFileSync(new URL("../../../components/ui/searchable-select/SearchableSelect.vue", import.meta.url), "utf8");
|
||||
const dataTransferDialogSource = readFileSync(new URL("../../../components/transfer/DataTransferDialog.vue", import.meta.url), "utf8");
|
||||
const editorToolbarSource = readFileSync(new URL("../../../components/layout/EditorToolbar.vue", import.meta.url), "utf8");
|
||||
|
||||
describe("SearchableSelect layout", () => {
|
||||
it("keeps slotted option labels inside a shrinkable overflow boundary", () => {
|
||||
@@ -18,4 +19,11 @@ describe("SearchableSelect layout", () => {
|
||||
expect(truncatedConnectionLabels).toHaveLength(2);
|
||||
expect(fixedConnectionIcons).toHaveLength(2);
|
||||
});
|
||||
|
||||
it("wraps deep connection group paths without hiding connection names", () => {
|
||||
expect(editorToolbarSource).toContain('item-class="min-h-9 h-auto py-1"');
|
||||
expect(editorToolbarSource).toMatch(/<span class="[^"]*max-w-48[^"]*shrink-0[^"]*whitespace-normal[^"]*break-words[^"]*">\s*\{\{ connectionGroupLabel\(option\) \}\}\s*<\/span>/);
|
||||
expect(editorToolbarSource).toContain('<TruncatedTextTooltip :text="label" class="block min-w-[7rem] flex-1 text-sm font-medium"');
|
||||
expect(editorToolbarSource).not.toContain('<TruncatedTextTooltip :text="connectionGroupLabel(option)"');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user