Skip to content

Commit 268d63e

Browse files
committed
feat: 백로그 조회 API에 우선순위 데이터(rankValue)추가
- initBacklog 테스트에 rankValue 정보 추가 - initBacklog Response DTO에 rankValue 정보 추가
1 parent 898d200 commit 268d63e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

backend/src/project/dto/InitBacklogResponse.dto.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class TaskDto {
1010
actualTime: number | null;
1111
status: TaskStatus;
1212
assignedMemberId: number | null;
13+
rankValue: string;
1314

1415
static of(task: Task): TaskDto {
1516
const dto = new TaskDto();
@@ -20,6 +21,7 @@ class TaskDto {
2021
dto.actualTime = task.actualTime;
2122
dto.status = task.status;
2223
dto.assignedMemberId = task.assignedMemberId;
24+
dto.rankValue = task.rankValue;
2325
return dto;
2426
}
2527
}
@@ -29,6 +31,7 @@ class StoryDto {
2931
title: string;
3032
point: number | null;
3133
status: StoryStatus;
34+
rankValue: string;
3235
taskList: TaskDto[];
3336

3437
static of(story: Story): StoryDto {
@@ -37,6 +40,7 @@ class StoryDto {
3740
dto.title = story.title;
3841
dto.point = story.point;
3942
dto.status = story.status;
43+
dto.rankValue = story.rankValue;
4044
dto.taskList = story.taskList.map(TaskDto.of);
4145
return dto;
4246
}
@@ -46,13 +50,15 @@ class EpicDto {
4650
id: number;
4751
name: string;
4852
color: EpicColor;
53+
rankValue: string;
4954
storyList: StoryDto[];
5055

5156
static of(epic: Epic): EpicDto {
5257
const dto = new EpicDto();
5358
dto.id = epic.id;
5459
dto.name = epic.name;
5560
dto.color = epic.color;
61+
dto.rankValue = epic.rankValue;
5662
dto.storyList = epic.storyList.map(StoryDto.of);
5763
return dto;
5864
}

backend/test/project/ws-backlog-page/ws-init-backlog.e2e-spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,16 @@ describe('WS epic', () => {
7575
expect(epic.id).toBe(epicId);
7676
expect(epic.name).toBe(epicName);
7777
expect(epic.color).toBe(epicColor);
78+
expect(epic.rankValue).toBe(middleRankValue);
79+
7880
expect(epic.storyList).toHaveLength(1);
7981
const story = epic.storyList[0];
8082
expect(story.id).toBe(storyId);
8183
expect(story.title).toBe(storyTitle);
8284
expect(story.point).toBe(storyPoint);
8385
expect(story.status).toBe(storyStatus);
86+
expect(story.rankValue).toBe(middleRankValue);
87+
8488
expect(story.taskList).toHaveLength(1);
8589
const task = story.taskList[0];
8690
expect(task.id).toBe(taskId);
@@ -90,6 +94,7 @@ describe('WS epic', () => {
9094
expect(task.actualTime).toBe(taskActualTime);
9195
expect(task.status).toBe(taskStatus);
9296
expect(task.assignedMemberId).toBe(taskAssignedMemberId);
97+
expect(task.rankValue).toBe(middleRankValue);
9398
} catch (e) {
9499
reject(e);
95100
}

0 commit comments

Comments
 (0)