Ajoute projet et migration milestone
Signed-off-by: Gato <cedric@goutailler-olivier.fr>
This commit is contained in:
@@ -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]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user