feat(workbench): add expense stats detail modal

This commit is contained in:
caoxiaozhu
2026-06-03 14:59:55 +08:00
parent 3130c42d76
commit 20cb60e247
9 changed files with 1047 additions and 7 deletions

View File

@@ -152,8 +152,24 @@ test('workbench progress rows show update time first', () => {
assert.match(workbench, /<time :datetime="item\.updatedAt \|\| ''">\{\{ item\.displayTime \}\}<\/time>/)
assert.match(workbench, /displayTime: formatProgressTime\(item\?\.updatedAt\)/)
assert.match(workbench, /function formatProgressTime\(value\)/)
assert.doesNotMatch(workbench, />全部进度/)
assert.match(workbenchStyles, /\.progress-row\s*\{[\s\S]*grid-template-columns:\s*minmax\(78px,\s*0\.44fr\)/)
assert.match(workbenchStyles, /\.progress-row\.has-long-duration-divider::before\s*\{[\s\S]*content:\s*"10日以上"/)
assert.match(workbenchStyles, /\.progress-row\.has-long-duration-divider::before\s*\{[\s\S]*left:\s*50%;[\s\S]*transform:\s*translateX\(-50%\);/)
assert.match(workbenchStyles, /\.progress-row\.has-long-duration-divider::before\s*\{[\s\S]*color:\s*var\(--theme-primary-active\);/)
assert.match(workbenchStyles, /\.progress-row\.has-long-duration-divider::after\s*\{[\s\S]*rgba\(var\(--theme-primary-rgb/)
assert.match(workbenchStyles, /\.progress-time\s*\{[\s\S]*color:\s*var\(--workbench-muted\);/)
assert.match(workbenchResponsiveStyles, /grid-template-areas:[\s\S]*"time identity result"[\s\S]*"steps steps steps"/)
})
test('workbench expense stats detail opens a local modal instead of the assistant', () => {
assert.match(workbench, /import ExpenseStatsDetailModal from '\.\/ExpenseStatsDetailModal\.vue'/)
assert.match(workbench, /<ExpenseStatsDetailModal/)
assert.match(workbench, /const expenseStatsModalOpen = ref\(false\)/)
assert.match(workbench, /const expenseStatsDetail = computed\(\(\) => props\.workbenchSummary\.expenseStatsDetail \|\| \{\}\)/)
assert.match(workbench, /@click="openExpenseStatsModal"/)
assert.match(workbench, /:aria-expanded="expenseStatsModalOpen"/)
assert.match(workbench, /function openExpenseStatsModal\(\)/)
assert.match(workbench, /function closeExpenseStatsModal\(\)/)
assert.doesNotMatch(workbench, /查看我的费用统计详情/)
})