/p/:key/report/(sprint|release)/🆔 what it is, its totals, the release notes and its tickets by stage. «Imprimir o guardar en PDF» opens the browser's dialog; on paper the app's header, tabs, tinted panels and lights are left out. Linked from Sprints and Releases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.3 KiB
TypeScript
49 lines
1.3 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',
|
|
'proponer',
|
|
'list',
|
|
'issues/:issueKey',
|
|
'backlog',
|
|
'sprints',
|
|
'calendar',
|
|
'roadmap',
|
|
'epics',
|
|
'trash',
|
|
'releases',
|
|
'report/:kind/:id',
|
|
'dashboard',
|
|
'analytics',
|
|
'settings',
|
|
'activity',
|
|
'members',
|
|
]);
|
|
});
|
|
});
|