test: drop source-text assertion tests and merge locale checks

This commit is contained in:
t8y2 committed 2026-09-23 22:10:06 +08:00
1 parent 349d77d180
commit 8897e12714
257 files changed
+166 -12815

No files matched your search

-18
View File
@@ -1,5 +1,4 @@
import { strict as assert } from "node:assert";
import { readFileSync } from "node:fs";
import { test } from "vitest";
import { filterObjectBrowserTableColumns } from "../../apps/desktop/src/lib/table/objectBrowserTableInfo.ts";
@@ -47,20 +46,3 @@ test("returns every column for empty searches and preserves match order", () =>
["note", "empty_note"],
);
});
test("keeps the data-grid table properties search on the shared column filter", () => {
const source = readFileSync("apps/desktop/src/components/grid/DataGrid.vue", "utf8");
assert.match(source, /filterObjectBrowserTableColumns\(tableInfoColumns\.value, searchQuery\.value\)/);
});
test("both table DDL surfaces use the persisted wrapping preference", () => {
const sources = ["apps/desktop/src/components/grid/DataGrid.vue", "apps/desktop/src/components/objects/ObjectBrowser.vue"].map((path) => readFileSync(path, "utf8"));
for (const source of sources) {
assert.doesNotMatch(source, /const (?:ddlWrap|tableInfoWrap) = ref\(true\)/);
assert.match(source, /:class="\{ 'bg-accent': settingsStore\.editorSettings\.tableDdlWordWrap \}"/);
assert.match(source, /:class="settingsStore\.editorSettings\.tableDdlWordWrap \? 'whitespace-pre-wrap break-words' : 'whitespace-pre'"/);
assert.match(source, /settingsStore\.updateEditorSettings\(\{\s*tableDdlWordWrap: !settingsStore\.editorSettings\.tableDdlWordWrap,?\s*\}\)/);
}
});