Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [Feature] Admin AgendaTeam 전체 조회하기 #898

Closed
1 task
yhames opened this issue Jul 23, 2024 · 0 comments · Fixed by #918
Closed
1 task

✨ [Feature] Admin AgendaTeam 전체 조회하기 #898

yhames opened this issue Jul 23, 2024 · 0 comments · Fixed by #918
Assignees
Labels
enhancement New feature or request

Comments

@yhames
Copy link
Contributor

yhames commented Jul 23, 2024

Description

✨ [Feature] Admin AgendaTeam 전체 조회하기

Todo

  • Admin AgendaTeam 전체 조회하기

ETC

Request

URI

GET /agenda/admin/team/list?agenda_id={agenda_id}

삭제된 팀, 비공개 팀도 보이게

Request body

{
	"page": number,
	"size": number,
}

Response

Status code

  • 200
  • 400
  • 401
    • 어드민이 아니에요
  • 404
    • AGENDA_NOT_FOUND

Response body

[
		{
				"teamName": string,
				"teamStatus": string, // ENUM 참조
				"teamScore": number,
				"teamIsPrivate": bool,
				"teamLeaderIntraId": string,
				"teamMateCount" : number,
				"teamKey": string,  // 랜덤하게 생성되는 팀별 고유 키
			}
		...
],

GWT

Feature: 팀 전체 조회

	Scenario: 팀 전체 리스트를 조회합니다.
		Given agenda가 생성되어 있습니다.
		And team이 생성되어 있습니다. // request / cancel / approve
		And 조회할 팀이 속한 agenda_id를 쿼리파라미터로 받습니다.
		And 조회할 페이지의 페이지 넘버와 size를 조회받습니다.
		When 팀 전체조회 요청을 받으면
		Then 팀 전체조회가 성공하고 200을 반환합니다.
		
	Scenario: 존재하지 않는 대회의 팀 전체를 조회합니다.
		Given 존재하지 않는 agendaId를 쿼리 파라미터로 받습니다.
		When 해당 팀 전체조회 요청을 받으면
		Then 팀 전체조회가 실패하고 404 에러코드를 반환합니다. // AGENDA_NOT_FOUND 404

	Scenario: size가 없이 팀 전체를 조회합니다.
		Given agenda가 생성되어 있습니다.
		And team이 생성되어 있습니다. (request/cancel/approve)
		And 조회할 팀이 속한 agenda_id를 쿼리파라미터로 받습니다.
		And page만 request body로 전달받습니다. (size == null)
		When 팀 전체 조회를 요청합니다.
		Then 200 코드와 함께 20개 기준 page에 해당하는 대회 리스트 20개를 반환합니다.
		
	Scenario: 유효하지 않은 page로 팀 전체를 조회합니다.
		Given agenda가 생성되어 있습니다.
		And team이 생성되어 있습니다. (request/cancel/approve)
		And 조회할 팀이 속한 agenda_id를 쿼리파라미터로 받습니다.
		And size와 전체 페이지 개수보다 큰 page를 reqeust body로 전달합니다.
		When 팀 전체 조회를 요청합니다.
		Then 200 코드와 함께 빈 리스트를 반환합니다.

	Scenario: page가 없이 팀 전체를 조회합니다.
		Given agenda가 생성되어 있습니다.
		And team이 생성되어 있습니다. (request/cancel/approve)
		And 조회할 팀이 속한 agenda_id를 쿼리파라미터로 받습니다.
		And size만 reqeust body로 전달합니다. (page == null)
		When 팀 전체 조회를 요청합니다.
		Then 400 에러 코드를 반환합니다.
		
	Scenario: page와 size 모두 없이 팀 전체를 조회합니다.
		Given agenda가 생성되어 있습니다.
		And team이 생성되어 있습니다. (request/cancel/approve)
		And 조회할 팀이 속한 agenda_id를 쿼리파라미터로 받습니다.
		When 팀 전체 조회를 요청합니다.
		Then 400 에러 코드를 반환합니다.
		
	Scenario: 30 초과의 size로 팀 전체를 조회합니다.
		Given agenda가 생성되어 있습니다.
		And team이 생성되어 있습니다. (request/cancel/approve)
		And 조회할 팀이 속한 agenda_id를 쿼리파라미터로 받습니다.
		And page와 30 초과의 size를 reqeust body로 전달합니다.
		When 팀 전체 조회를 요청합니다.
		Then 400 에러 코드를 반환합니다.
		
	Scenario: 1 이하의 size로 팀 전체를 조회합니다.
		Given agenda가 생성되어 있습니다.
		And team이 생성되어 있습니다. (request/cancel/approve)
		And 조회할 팀이 속한 agenda_id를 쿼리파라미터로 받습니다.
		And page와 1 이하의 size를 reqeust body로 전달합니다.
		When 팀 전체 조회를 요청합니다.
		Then 400 에러 코드를 반환합니다.
@yhames yhames added the enhancement New feature or request label Jul 23, 2024
@yhames yhames added this to the 7th Sprint 4 milestone Jul 23, 2024
@yhames yhames self-assigned this Jul 23, 2024
@AreSain AreSain removed this from the 7th Sprint 4 milestone Jul 29, 2024
@yhames yhames linked a pull request Jul 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants