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:
@@ -49,8 +49,13 @@ describe('AppShell', () => {
|
|||||||
expect(document.activeElement?.getAttribute('name')).toBe('q')
|
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>)
|
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()
|
expect(container.querySelector('header form')).toBeNull()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user