test(sidebar): 同步 openObjectSourceDialog 正则到 editableSource

This commit is contained in:
t8y2 2026-08-06 00:39:05 +08:00
parent 445b6473f4
commit b58c221e16
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -64,9 +64,9 @@ test("query-tab object source opens clean isolated tabs and honors backend edita
const runtimeHost = readFileSync("apps/desktop/src/components/sidebar/SidebarTreeRuntimeHost.vue", "utf8");
const openObjectSourceBody = functionBody(runtimeHost, "openObjectSourceDialog");
assert.match(openObjectSourceBody, /createTab\(connectionId, database, `Source - \$\{node\.label\}`, "query", schema, result\.source, node\.catalog, \{ forceNew: true \}\)/);
assert.match(openObjectSourceBody, /result\.editable !== false/);
assert.match(openObjectSourceBody, /!\["SEQUENCE", "TRIGGER", "TYPE", "TYPE_BODY"\]\.includes\(objectType\)/);
assert.match(openObjectSourceBody, /createTab\(connectionId, database, `Source - \$\{node\.label\}`, "query", schema, editableSource, node\.catalog, \{ forceNew: true \}\)/);
assert.match(openObjectSourceBody, /raw\.editable !== false/);
assert.match(openObjectSourceBody, /!\["SEQUENCE", "TRIGGER", "TYPE", "TYPE_BODY"\]\.includes\(resolvedType\)/);
assert.match(openObjectSourceBody, /signature: node\.signature/);
assert.doesNotMatch(openObjectSourceBody, /queryStore\.updateSql/);
});