import assert from 'node:assert/strict'; import { readFile } from 'node:fs/promises'; import test from 'node:test'; const [app, index, styles, taskService] = await Promise.all([ readFile(new URL('./app.js', import.meta.url), 'utf8'), readFile(new URL('./index.html', import.meta.url), 'utf8'), readFile(new URL('./styles.css', import.meta.url), 'utf8'), readFile(new URL('../control-plane/src/task-service.ts', import.meta.url), 'utf8') ]); test('dashboard summary cards share one visual treatment and expose an accessible selected state', () => { assert.match(app, /label: '操作次数'[^\n]+tone: 'total'/); assert.doesNotMatch(app, /tone: 'primary'/); assert.match(app, /card\.setAttribute\('aria-pressed', String\(isSelected\)\)/); 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-primary/); }); test('waiting-for-input work is folded into in-progress instead of exposing a follow-up state', () => { assert.doesNotMatch(index, /