mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 16:09:43 +02:00
test: drive the phase-2 verbs end to end under a pty
The fake API server grows the routes the dashboard now calls (terminal tail, input, approvals answer, search, away digest, plan usage on status), and the new cases assert on what the server RECEIVED rather than on the frame: the prompt arrives as one line ending in a carriage return, and the answers as the exact action and option digit. Also covered: the tail refreshing in place, the search overlay selecting a live session, the digest rendering, one bell for an item announced twice, and the 409 path reported as "no longer on screen". The plan-usage chip is punctuated with the glyph tier's separator, so an ASCII terminal no longer gets a stray middle dot in the header. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -564,6 +564,11 @@ describe('formatPlanUsage', () => {
|
||||
expect(formatPlanUsage({ sevenDay: { usedPercentage: 90, resetAt: 1 } })).toBe('wk 90%');
|
||||
});
|
||||
|
||||
it('punctuates with the separator it is given, so an ASCII terminal gets none', () => {
|
||||
const usage = { fiveHour: { usedPercentage: 32, resetAt: 1 }, sevenDay: { usedPercentage: 61, resetAt: 2 } };
|
||||
expect(formatPlanUsage(usage, ' - ')).toBe('5h 32% - wk 61%');
|
||||
});
|
||||
|
||||
it('is empty when there is nothing to report, so the header shows no placeholder', () => {
|
||||
expect(formatPlanUsage(null)).toBe('');
|
||||
expect(formatPlanUsage(undefined)).toBe('');
|
||||
|
||||
Reference in New Issue
Block a user