This commit is contained in:
@@ -36,10 +36,18 @@ describe('sidebar navigation', () => {
|
||||
expect(body).toContain('href="/maintenance"');
|
||||
expect(body).toContain('href="/metrics"');
|
||||
expect(body).toContain('href="/bank"');
|
||||
expect(body).toContain('href="/afk"');
|
||||
expect(body).not.toContain('href="/settings"');
|
||||
expect(body).not.toContain('href="/server-keys"');
|
||||
});
|
||||
|
||||
it('marks the AFK overview active for viewers', () => {
|
||||
currentPage.set({ url: new URL('http://localhost/afk?view=sessions'), data: {} });
|
||||
const body = render(Navigation, { props: { role: 'viewer' } }).body;
|
||||
expect(body).toMatch(/<a[^>]*href="\/afk"[^>]*aria-current="page"/);
|
||||
expect(body).not.toMatch(/<a[^>]*href="\/bank"[^>]*aria-current="page"/);
|
||||
});
|
||||
|
||||
it('does not show invented attention counts before the fleet snapshot loads', () => {
|
||||
expect(render(Navigation, { props: { role: 'admin' } }).body).not.toMatch(
|
||||
/needs? attention/
|
||||
|
||||
Reference in New Issue
Block a user