Skip to content

Commit

Permalink
feat: locker location test 추가, mineLocker test 추가 (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
selfishAltruism committed Feb 6, 2024
1 parent 21b561f commit e39b3cb
Show file tree
Hide file tree
Showing 14 changed files with 496 additions and 24 deletions.
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
trace: 'on-first-retry',
headless: false,
headless: true,
},

projects: [
Expand Down
11 changes: 6 additions & 5 deletions src/@types/locker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ declare namespace Locker {
export interface FindByLocationResponseDto {
locationName: string;
lockerList: LockerLocationDto[];
/*
LockerLocationDto may be: id: string;
lockerNumber: number;
}

export interface LockerLocationDto {
id: string;
lockerNumber: string;
lockerLocationName: string;
updatedAt: string;
expireAt: string;
isActive: boolean;
isMine: boolean;
*/
isMine: boolean;
}

export interface FindByLocationResponse {
Expand Down
38 changes: 38 additions & 0 deletions tests/@types/board.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
declare namespace Board {
export interface Dto {
name: string;
description: string;
createRoleList: User.Role[];
category: string;
circleId: string;
}

export interface Item {
key: string;
name: string;
notification: boolean;
}

export interface Board {
category: string;
items: Item[];
}

export interface RootObject {
board: Board[];
}

export interface ResponseDto extends Dto {
id: string;
writable: boolean;
isDeleted: boolean;
circleName: string;
}

interface RequestDto extends Dto {}

export interface CreateRequestDto extends RequestDto {}

// TODO: 게시판 관리 구현 시 서버와 조정 필요
export interface UpdateRequestDto extends RequestDto {}
}
68 changes: 68 additions & 0 deletions tests/@types/circle.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
declare namespace Circle {
export type Status = 'AWAIT' | 'DROP' | 'LEAVE' | 'MEMBER' | 'REJECT';

export interface CreateRequestDto {
mainImage: string;
name: string;
description: string;
leaderId: string;
}

export type UpdateRequestDto = Omit<CreateRequestDto, 'leaderId'>;

export interface CircleUser {
id: string;
status: Status;
user: User.UserDto;
circle: FindByIdDto;
}
export type GetUserListResponseDto = CircleUser[];
export type GetUserListResponse = Model.CircleUser[];

//
export interface FindByIdDto {
id: string;
mainImage: string | null;
name: string;
description: string;
isJoined: boolean;
joinedAt: string | null;
leaderId: string;
leaderName: string;
createdAt: string;
numMember: number;
}

export interface UserApplyDto {
circle: Dto;
id: string;
status: 'AWAIT';
userId: string;
userName: string;
}

export interface Board {
id: string;
name: string;
postId: string | null;
postTitle: string | null;
postCreatedAt: string | null;
postNumComment: number | null;
postWriterName: string | null;
postWriterStudentId: string | null;
}

export interface FindBoardsDto {
circle: FindByIdDto;
boardList: Board[];
}

export interface FindBoards {
circle: Model.Circle;
boards: Model.CircleBoard[];
}

// Client
// 기본, 신청완료, 대기중, 가입됨, 제한
export type JoinStatus = 'NONE' | 'DONE' | 'AWAIT' | 'MEMBER' | 'BLOCK';
}
31 changes: 31 additions & 0 deletions tests/@types/comment.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
declare namespace PostComment {
export interface GetResponseDto {
content: CreateResponseDto[];
last: boolean;
}

export interface FindAllResponse {
comments: Model.Comment[];
last: boolean;
}

export interface CreateRequestDto {
postId: string;
content: string;
}

export interface CreateResponseDto {
postId: string;
id: string;
writerAdmissionYear: number;
writerName: string;
writerProfileImage: string | null;
content: string;
createdAt: string;
updatedAt: string;
numChildComment: number;
updatable: boolean;
deletable: boolean;
isDeleted: boolean;
}
}
26 changes: 26 additions & 0 deletions tests/@types/history.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
declare namespace HistoryData {
export interface Post {
boardId: string;
id: string;
circleName: string | null;
boardName: string;
title: string;
numComment: number;
createdAt: string;
updatedAt: string;
}

export interface Comment {
boardId: string;
postId: string;
parentCommentId: string | null;
circleName: string | null;
boardName: string;
postName: string;
id: string;
content: string;
tagUserName: string | null;
createdAt: string;
updatedAt: string;
}
}
17 changes: 17 additions & 0 deletions tests/@types/home.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
declare namespace Home {
export type GetHomePageResponseDto = {
board: {
id: string;
category: string;
name: string;
};
posts: {
content: Post.Dto[];
};
}[];

export type GetHomePageResponse = {
board: Model.Board;
posts: Model.Post[];
}[];
}
48 changes: 48 additions & 0 deletions tests/@types/locker.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
declare namespace Locker {
export interface Dto {
id: string;
name: string;
description: string;
enableLockerCount: number;
totalLockerCount: number;
}
export interface LocationDto {
id: string;
lockerNumber: number;
lockerLocationName: string;
updatedAt: string;
expireAt: string;
isActive: boolean;
isMine: boolean;
}

export interface FindAllLocationResponseDto {
lockerLocations: Dto[];
myLocker: LocationDto;
}

export interface FindAllLocationResponse {
lockers: Model.Locker[];
myLocker?: Model.LockerLocation;
}

export interface FindByLocationResponseDto {
locationName: string;
lockerList: LockerLocationDto[];
}

export interface LockerLocationDto {
id: string;
lockerNumber: string;
lockerLocationName: string;
updatedAt: string;
expireAt: string;
isActive: boolean;
isMine: boolean;
}

export interface FindByLocationResponse {
locationName: string;
lockerList: Model.LockerLocation[];
}
}
54 changes: 54 additions & 0 deletions tests/@types/post.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
declare namespace Post {
export interface Dto {
id: string;
title: string;
writerName: string;
writerAdmissionYear: number;
writerProfileImage: string | null;
content: string;
createdAt: Date;
updatedAt: Date;
numComment: number;
updatable: boolean;
deletable: boolean;
isDeleted: boolean;
}

export interface FindAllResponseDto {
boardId: string;
boardName: string;
writable: boolean;
post: {
content: Post.Dto[];
last: boolean;
};
}

export interface FindAllResponse {
boardId: string;
boardName: string;
writable: boolean;
post: {
content: Model.Post[];
last: boolean;
};
}

export interface CreateRequestDto {
boardId: string;
title: string;
content: string;
}

export interface UpdateRequestDto {
title: string;
content: string;
}

export interface FindByIdResponseDto {
boardId: string;
boardName: string;
commentList: PostComment.GetResponseDto;
content: Dto;
}
}
4 changes: 4 additions & 0 deletions tests/@types/quill-image-uploader.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module 'quill-image-uploader' {
const lib: unknown;
export default lib;
}
28 changes: 28 additions & 0 deletions tests/@types/replyComment.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
declare namespace ReplyComment {
export interface GetResponseDto {
childComments: {
content: CreateResponseDto[];
last: boolean;
};
parentComment: PostComment.CreateResponseDto;
}

export interface FindAllResponse {
parent: Model.Comment;
comments: Model.ReplyComment[];
last: boolean;
}

export interface CreateRequestDto {
parentCommentId: string;
content: string;
// 답글의 답글인 경우
refChildComment?: string;
tagUserName?: string;
}

export interface CreateResponseDto extends PostComment.CreateResponseDto {
refChildComment: string | null;
tagUserName: string | null;
}
}
Loading

0 comments on commit e39b3cb

Please sign in to comment.