Ajoute projet et migration milestone

Signed-off-by: Gato <cedric@goutailler-olivier.fr>
This commit is contained in:
2026-05-31 10:00:36 +02:00
parent 401da09f8f
commit 54d1534d4d
39 changed files with 1565 additions and 288 deletions
+5 -3
View File
@@ -7,6 +7,7 @@ import { Issues } from './issues';
import { IssueEntity, IssuesStore } from './issues.store';
import { MilestoneEntity, MilestonesStore } from '../milestones/milestones.store';
import { StatusesStore } from '../statuses/statuses.store';
import { ProjectContextService } from '../projects/project-context.service';
const makeIssue = (overrides: Partial<IssueEntity> = {}): IssueEntity => ({
id: 99,
@@ -174,6 +175,7 @@ describe('Issues', () => {
{ provide: IssuesStore, useValue: store },
{ provide: MilestonesStore, useValue: milestonesStore },
{ provide: StatusesStore, useValue: statusesStore },
{ provide: ProjectContextService, useValue: { projectId: signal(1), project: signal(null) } },
],
}).compileComponents();
@@ -281,10 +283,10 @@ describe('Issues', () => {
});
describe('createIssue', () => {
it('navigates to /issues/new', () => {
it('navigates to /projects/:pid/issues/new', () => {
const spy = vi.spyOn(router, 'navigate').mockResolvedValue(true);
(component as any).createIssue();
expect(spy).toHaveBeenCalledWith(['/issues/new']);
expect(spy).toHaveBeenCalledWith(['/projects', 1, 'issues', 'new']);
});
});
@@ -292,7 +294,7 @@ describe('Issues', () => {
it('navigates to the issue detail page', async () => {
const spy = vi.spyOn(router, 'navigate').mockResolvedValue(true);
(component as any).openIssue(42);
expect(spy).toHaveBeenCalledWith(['/issues', 42]);
expect(spy).toHaveBeenCalledWith(['/projects', 1, 'issues', 42]);
});
});