feat(sql-file): show per-file execution statistics

This commit is contained in:
Abeautifulsnow
2026-07-30 18:41:56 +08:00
committed by GitHub
parent 51315e549f
commit 6c3c6864f3
14 changed files with 496 additions and 26 deletions
+11
View File
@@ -24,6 +24,17 @@ test("SQL file execution dialog keeps actions visible within narrow viewports",
assert.match(dialogSource, /<DialogFooter class="shrink-0">/);
});
test("SQL file execution summary reserves space for aggregate columns", () => {
assert.match(dialogSource, /v-if="!running && previews\.length > 1 && perFileResults\.length > 0"/);
assert.doesNotMatch(dialogSource, /terminalStatus === 'done' && previews\.length > 1 && perFileResults\.length > 0/);
assert.match(dialogSource, /<table class="w-full table-fixed">/);
assert.match(dialogSource, /<colgroup>[\s\S]*<col \/>[\s\S]*<col class="w-\[4\.5rem\]" \/>[\s\S]*<col class="w-\[5\.5rem\]" \/>[\s\S]*<\/colgroup>/);
assert.match(dialogSource, /<td class="px-2\.5 py-1\.5 truncate" :title="item\.fileName">/);
assert.match(dialogSource, /<thead class="sticky top-0 z-10 border-b border-border bg-muted text-foreground shadow-/);
assert.match(dialogSource, /<tfoot class="sticky bottom-0 z-10 border-t-2 border-primary\/35 bg-muted font-semibold text-foreground/);
assert.match(dialogSource, /<th scope="row" class="px-2\.5 py-2 text-left">\{\{ t\("sqlFile\.totalFiles"/);
});
test("SQL file execution dialog preserves cancel, close, and retry actions", () => {
assert.match(dialogSource, /<template v-if="running">[\s\S]*@click="open = false"[\s\S]*@click="cancelExecution"/);
assert.match(dialogSource, /<template v-else>[\s\S]*@click="open = false"[\s\S]*:disabled="!canStart" @click="startExecution"/);