fix(sidebar): show group action without connections
This commit is contained in:
1 parent
e9fd89ad16
commit
f7f622229b
2 files changed
+17
-1
No files matched your search
@@ -182,7 +182,7 @@ defineExpose({ focusSearch });
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="h-full min-h-0 flex flex-col text-sm select-none">
|
<div class="h-full min-h-0 flex flex-col text-sm select-none">
|
||||||
<div v-if="store.treeNodes.length > 0" class="sticky top-0 z-10 bg-background px-2 py-1">
|
<div class="sticky top-0 z-10 bg-background px-2 py-1">
|
||||||
<div class="relative flex items-center gap-1">
|
<div class="relative flex items-center gap-1">
|
||||||
<div class="relative flex-1">
|
<div class="relative flex-1">
|
||||||
<Search class="absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground" />
|
<Search class="absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground" />
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import test from "node:test";
|
||||||
|
import assert from "node:assert/strict";
|
||||||
|
import { readFileSync } from "node:fs";
|
||||||
|
|
||||||
|
const connectionTreeSource = readFileSync(
|
||||||
|
new URL("../../apps/desktop/src/components/sidebar/ConnectionTree.vue", import.meta.url),
|
||||||
|
"utf8",
|
||||||
|
);
|
||||||
|
|
||||||
|
test("connection tree toolbar is visible before any connection exists", () => {
|
||||||
|
assert.ok(connectionTreeSource.includes(":title=\"t('connectionGroup.createGroup')\""));
|
||||||
|
assert.ok(
|
||||||
|
!connectionTreeSource.includes('v-if="store.treeNodes.length > 0" class="sticky'),
|
||||||
|
"the toolbar should not be hidden when the connection tree is empty",
|
||||||
|
);
|
||||||
|
});
|
||||||
Reference in new issue
Block a user