Files
task-stream/apps/web/src/app/app.routes.spec.ts
Josep Piguillem 0606f53026 feat: an ordered backlog
A Backlog tab lists the tickets still to start in the order the team will
take them; drag them, or use the arrows, to reorder. Moving a ticket only
rewrites that ticket's rank, read from the event store, and board columns
follow the same order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:01:44 +02:00

42 lines
1.2 KiB
TypeScript

import { authGuard } from '@task-stream/web/identity/presenters';
import { appRoutes } from './app.routes';
describe('appRoutes', () => {
it('keeps home behind the auth guard, and public projects and «Explorar» open', () => {
const paths = appRoutes.map((route) => route.path);
expect(paths).toEqual(
expect.arrayContaining(['login', 'auth/callback', '', '**']),
);
const app = appRoutes.find((route) => route.path === '' && route.children);
const children = app?.children ?? [];
expect(children.map((route) => route.path)).toEqual([
'',
'explorar',
'p/:key',
]);
expect(children[0].canActivate).toContain(authGuard);
expect(children[1].canActivate).toBeUndefined();
expect(children[2].canActivate).toBeUndefined();
});
it('exposes every project section', () => {
const project = appRoutes
.find((route) => route.path === '')
?.children?.find((route) => route.path === 'p/:key');
expect(project?.children?.map((route) => route.path)).toEqual([
'',
'board',
'issues/:issueKey',
'backlog',
'epics',
'releases',
'dashboard',
'analytics',
'settings',
'activity',
'members',
]);
});
});