merge: integrate display-only dashboard metrics
This commit is contained in:
commit
cc09506a06
6 files changed
+24
-45
No files matched your search
@@ -10,12 +10,21 @@ const [app, index, styles, taskService, server] = await Promise.all([
|
||||
readFile(new URL('../control-plane/src/server.ts', import.meta.url), 'utf8')
|
||||
]);
|
||||
|
||||
test('dashboard summary cards share one visual treatment and expose an accessible selected state', () => {
|
||||
test('dashboard summary cards are uniform display-only totals and leave filtering to the explicit controls', () => {
|
||||
const summaryRenderer = app.slice(
|
||||
app.indexOf('function renderOperationsDashboardSummary()'),
|
||||
app.indexOf('function operationsDashboardRankScale')
|
||||
);
|
||||
assert.match(app, /label: '操作次数'[^\n]+tone: 'total'/);
|
||||
assert.doesNotMatch(app, /tone: 'primary'/);
|
||||
assert.match(app, /card\.setAttribute\('aria-pressed', String\(isSelected\)\)/);
|
||||
assert.match(summaryRenderer, /const card = el\('article', `operations-dashboard-stat operations-dashboard-stat-\$\{item\.tone\}`\)/);
|
||||
assert.doesNotMatch(summaryRenderer, /selectedStatus|isSelected|operationsStatus|aria-pressed/);
|
||||
assert.doesNotMatch(app, /\$\('#operationsDashboardSummary'\)\?\.addEventListener\('click'/);
|
||||
assert.match(index, /<option value="all">全部结果<\/option>/);
|
||||
assert.match(app, /function resetOperationsDashboardFilters\(\)[\s\S]*?\$\('#operationsDashboardStatus'\)\.value = 'all';/);
|
||||
assert.match(styles, /\.operations-dashboard-summary\s*{[\s\S]*?grid-template-columns: repeat\(5, minmax\(0, 1fr\)\)/);
|
||||
assert.match(styles, /\.operations-dashboard-stat\.is-active\s*{[\s\S]*?background: var\(--dashboard-accent-soft\);[\s\S]*?transform: none;/);
|
||||
assert.doesNotMatch(styles, /\.operations-dashboard-stat\[data-operations-status\]/);
|
||||
assert.doesNotMatch(styles, /\.operations-dashboard-stat\.is-active/);
|
||||
assert.doesNotMatch(styles, /operations-dashboard-stat-primary/);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user