refactor: trim dashboard card copy
This commit is contained in:
27
apps/web/test/dashboard-card-copy.test.js
Normal file
27
apps/web/test/dashboard-card-copy.test.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { describe, expect, test } from 'bun:test';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const appSource = readFileSync(join(import.meta.dir, '../src/App.tsx'), 'utf8');
|
||||
|
||||
describe('dashboard card copy', () => {
|
||||
test('removes verbose dashboard card descriptions and keeps concise labels', () => {
|
||||
expect(appSource).toContain('<CardTitle>Unified capacity</CardTitle>');
|
||||
expect(appSource).toContain('<CardTitle>Usage metrics</CardTitle>');
|
||||
expect(appSource).toContain('<CardTitle>Connected OpenAI accounts</CardTitle>');
|
||||
expect(appSource).toContain('description="Combined raw JSON."');
|
||||
expect(appSource).toContain(">Merged by default. Inspect each account below.<");
|
||||
expect(appSource).not.toContain(
|
||||
'Fast glance card for the first two numeric metrics extracted from the merged usage payload.',
|
||||
);
|
||||
expect(appSource).not.toContain(
|
||||
'CodexDash extracts numeric leaf nodes from the aggregated usage payload for quick overview cards.',
|
||||
);
|
||||
expect(appSource).not.toContain(
|
||||
'Raw aggregated JSON merged from every attached OpenAI Codex account.',
|
||||
);
|
||||
expect(appSource).not.toContain(
|
||||
'By default, these accounts are merged into one Codex usage view. Switch tabs to inspect individual account payloads and timestamps.',
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user