feat(sidebar): expose visible object filters in the connection tree
* feat(sidebar): expose visible object filter * fix(sidebar): refine visible filter status * refactor(sidebar): move visible filter status to details * fix(sidebar): clarify visible filter action
This commit is contained in:
1 parent
cc5a4068d2
commit
dfb9971849
26 files changed
+793
-9
No files matched your search
@@ -12,6 +12,7 @@ function host(): SidebarTreeRuntimeHost {
|
||||
handleRowClick: vi.fn(),
|
||||
handleRowDoubleClick: vi.fn(),
|
||||
handleRowKeydown: vi.fn(),
|
||||
openPrimaryVisibleFilter: vi.fn(),
|
||||
openDataInNewTab: vi.fn(),
|
||||
requestPaste: vi.fn(() => false),
|
||||
toggleNode: vi.fn(),
|
||||
@@ -46,6 +47,17 @@ describe("sidebar tree runtime", () => {
|
||||
expect(runtimeHost.handleRowClick).toHaveBeenCalledTimes(100);
|
||||
});
|
||||
|
||||
it("forwards the direct primary visible-filter action to the bound host", () => {
|
||||
const runtime = createSidebarTreeRuntime();
|
||||
const runtimeHost = host();
|
||||
const connection = { id: "connection-1", label: "Connection", type: "connection", connectionId: "connection-1" } satisfies TreeNode;
|
||||
runtime.bindHost(runtimeHost);
|
||||
|
||||
runtime.openPrimaryVisibleFilter(connection);
|
||||
|
||||
expect(runtimeHost.openPrimaryVisibleFilter).toHaveBeenCalledWith(connection);
|
||||
});
|
||||
|
||||
it("rejects superseded and disposed generations without affecting another runtime", () => {
|
||||
const runtime = createSidebarTreeRuntime();
|
||||
const otherRuntime = createSidebarTreeRuntime();
|
||||
|
||||
Reference in new issue
Block a user