feat(web): /admin/quarantine aggregated queue with resolution actions
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
{ href: '/admin', label: 'Overview', icon: LayoutGrid },
|
||||
{ href: '/admin/integrations', label: 'Integrations', icon: Plug },
|
||||
{ href: '/admin/requests', label: 'Requests', icon: ListChecks },
|
||||
{ href: '/admin/quarantine', label: 'Quarantine', icon: ShieldX, placeholder: true },
|
||||
{ href: '/admin/quarantine', label: 'Quarantine', icon: ShieldX },
|
||||
{ href: '/admin/users', label: 'Users', icon: Users, placeholder: true },
|
||||
{ href: '/admin/library', label: 'Library', icon: FolderTree, placeholder: true }
|
||||
];
|
||||
|
||||
@@ -38,14 +38,29 @@ describe('AdminSidebar', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('Quarantine link is active when on /admin/quarantine', () => {
|
||||
state.pageUrl = new URL('http://localhost/admin/quarantine');
|
||||
render(AdminSidebar);
|
||||
expect(screen.getByRole('link', { name: /quarantine/i })).toHaveAttribute(
|
||||
'aria-current',
|
||||
'page'
|
||||
);
|
||||
});
|
||||
|
||||
test('Quarantine renders as a real link', () => {
|
||||
state.pageUrl = new URL('http://localhost/admin');
|
||||
render(AdminSidebar);
|
||||
const link = screen.getByRole('link', { name: /quarantine/i });
|
||||
expect(link).toHaveAttribute('href', '/admin/quarantine');
|
||||
});
|
||||
|
||||
test('placeholder items render as non-links with aria-disabled', () => {
|
||||
state.pageUrl = new URL('http://localhost/admin');
|
||||
render(AdminSidebar);
|
||||
expect(screen.queryByRole('link', { name: /quarantine/i })).not.toBeInTheDocument();
|
||||
const quar = screen.getByText(/quarantine/i);
|
||||
expect(quar.closest('[aria-disabled="true"]')).toBeInTheDocument();
|
||||
// Users + Library are also placeholders today.
|
||||
// Users + Library are still placeholders today.
|
||||
expect(screen.queryByRole('link', { name: /^users$/i })).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole('link', { name: /^library$/i })).not.toBeInTheDocument();
|
||||
const users = screen.getByText(/^users$/i);
|
||||
expect(users.closest('[aria-disabled="true"]')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user