mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-09-10 23:15:40 +00:00
test(web): close the generic-id gap in the admin suite (TASK-2759)
The final mutation matrix, re-run on the tip, found one survivor in 26 (mutation, test-file) pairs: reinstating the retired GENERIC_AGENT_IDS filter in the shared helper left the admin suite green, because every fixture there used 'wren' — a value the filter would not have swallowed. Exactly the hole I closed in the feed and audit-log suites earlier in this run, repeated when I added this file eight commits later. The lesson landed in two files and not in my habit, so it is now a case in all four. Claude-Session: https://claude.ai/code/session_01Cpr3teiHHsgcTmg2xhHA86
This commit is contained in:
@@ -88,6 +88,17 @@ describe('admin user activity — agent name', () => {
|
||||
expect(host.querySelector('.activity-agent')).toBeNull();
|
||||
});
|
||||
|
||||
// A named fixture alone does not discriminate: reinstating the retired
|
||||
// GENERIC_AGENT_IDS filter in the shared helper left this whole file green
|
||||
// until this case existed, because nothing here used a value the filter
|
||||
// would have swallowed. Same omission the feed and audit-log suites had —
|
||||
// I repeated it when adding this file later.
|
||||
it('renders a generic-looking client id verbatim', async () => {
|
||||
await mountWith([event({ metadata: JSON.stringify({ agent: 'claude-code' }) })]);
|
||||
|
||||
expect(host.querySelector('.activity-agent')!.textContent).toBe('claude-code');
|
||||
});
|
||||
|
||||
it('isolates the name so a bidi control cannot reorder the row', async () => {
|
||||
await mountWith([event({ metadata: JSON.stringify({ agent: 'wrengnimalb' }) })]);
|
||||
|
||||
@@ -149,4 +160,10 @@ describe('admin user overview — agent name', () => {
|
||||
|
||||
expect(host.querySelector('.recent-agent')).toBeNull();
|
||||
});
|
||||
|
||||
it('renders a generic-looking client id verbatim', async () => {
|
||||
await mountOverview([event({ metadata: JSON.stringify({ agent: 'claude-code' }) })]);
|
||||
|
||||
expect(host.querySelector('.recent-agent')!.textContent).toBe('claude-code');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user