From 4ec37bd078e793db54996a0b4cc8893ab1d1d804 Mon Sep 17 00:00:00 2001 From: weeihan Date: Fri, 6 Nov 2026 21:50:23 +0800 Subject: [PATCH] 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 --- tests/components/layout/app-shell.test.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/components/layout/app-shell.test.tsx b/tests/components/layout/app-shell.test.tsx index c769ba8..023257d 100644 --- a/tests/components/layout/app-shell.test.tsx +++ b/tests/components/layout/app-shell.test.tsx @@ -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() + expect(container.querySelector('header form')!.getAttribute('action')).toBe('/ssa/incidents') + }) + + it('hides the search box for roles without an incident list', () => { + const { container } = render() expect(container.querySelector('header form')).toBeNull() })