test(layout): update app-shell search test for ssa role

ssa now has a site incident list, so its header search targets /ssa/incidents.
Use management for the no-search case.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 21:50:59 +08:00
co-authored by Claude Sonnet 5.5
parent f52e63ad09
commit 4ec37bd078
+6 -1
View File
@@ -49,8 +49,13 @@ describe('AppShell', () => {
expect(document.activeElement?.getAttribute('name')).toBe('q')
})
it('hides the search box for roles without an incident list', () => {
it('targets the site incident list for the SSA role', () => {
const { container } = render(<AppShell role="ssa" userName="Ada"><span /></AppShell>)
expect(container.querySelector('header form')!.getAttribute('action')).toBe('/ssa/incidents')
})
it('hides the search box for roles without an incident list', () => {
const { container } = render(<AppShell role="management" userName="Ada"><span /></AppShell>)
expect(container.querySelector('header form')).toBeNull()
})