Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

feat(tests): add currentWhereInput to various test cases

t8y29858fc40d209
diff --git a/packages/app-tests/dataGridEditor.test.ts b/packages/app-tests/dataGridEditor.test.ts
index 1978563f4e..f0381a66d1 100644
--- a/packages/app-tests/dataGridEditor.test.ts
+++ b/packages/app-tests/dataGridEditor.test.ts
@@ -122,6 +122,7 @@ test("row data helper reuses unchanged rows and clones dirty rows only", () => {
searchText: ref(""),
whereFilterInput: ref(""),
orderByInput: ref(""),
+ currentWhereInput: computed(() => undefined),
rowStatusFilter: ref("all"),
getRowItem: () => undefined,
pageSize: ref(100),
@@ -170,6 +171,7 @@ test("cloning a row copies non-generated primary key values without executing sa
searchText: ref(""),
whereFilterInput: ref(""),
orderByInput: ref(""),
+ currentWhereInput: computed(() => undefined),
rowStatusFilter,
pageSize: ref(100),
currentPage: ref(1),
@@ -246,6 +248,7 @@ test("cloning a row clears auto-generated key columns", async () => {
searchText: ref(""),
whereFilterInput: ref(""),
orderByInput: ref(""),
+ currentWhereInput: computed(() => undefined),
rowStatusFilter,
pageSize: ref(100),
currentPage: ref(1),
@@ -299,6 +302,7 @@ test("saving deleted rows reloads current table data", async () => {
searchText: ref("ada"),
whereFilterInput: ref("name ILIKE '%a%'"),
orderByInput: ref("id DESC"),
+ currentWhereInput: computed(() => "name ILIKE '%a%'"),
rowStatusFilter,
pageSize: ref(50),
currentPage: ref(3),
@@ -357,6 +361,7 @@ test("saving inserted rows reloads current table data", async () => {
searchText: ref("linus"),
whereFilterInput: ref("name ILIKE '%l%'"),
orderByInput: ref("id DESC"),
+ currentWhereInput: computed(() => "name ILIKE '%l%'"),
rowStatusFilter,
pageSize: ref(50),
currentPage: ref(2),
@@ -404,6 +409,7 @@ test("saving edited rows without deletes does not reload table data", async () =
searchText: ref(""),
whereFilterInput: ref(""),
orderByInput: ref(""),
+ currentWhereInput: computed(() => undefined),
rowStatusFilter,
pageSize: ref(50),
currentPage: ref(1),
@@ -460,6 +466,7 @@ test("saving manually typed JSON from a MySQL grid normalizes smart quotes", asy
searchText: ref(""),
whereFilterInput: ref(""),
orderByInput: ref(""),
+ currentWhereInput: computed(() => undefined),
rowStatusFilter,
pageSize: ref(50),
currentPage: ref(1),
@@ -537,6 +544,7 @@ test("failed table data save records a failed history entry", async () => {
sql: computed(() => "SELECT id, title FROM pp_questions"),
searchText: ref(""),
whereFilterInput: ref(""),
+ currentWhereInput: computed(() => undefined),
orderByInput: ref(""),
rowStatusFilter,
pageSize: ref(50),