Skip to content

test: 솔로 토너먼트 E2E 테스트 시나리오 추가 - #389

Merged
iOdiO89 merged 8 commits into
devfrom
test/388-solo-tournament-e2e
Jul 31, 2026
Merged

test: 솔로 토너먼트 E2E 테스트 시나리오 추가#389
iOdiO89 merged 8 commits into
devfrom
test/388-solo-tournament-e2e

Conversation

@kanghaeun

@kanghaeun kanghaeun commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

작업 요약

  • 솔로 토너먼트 핵심 여정(생성 → 아이템 담기 → 매치 진행 → 결과)에 대한 Playwright E2E 테스트 추가
  • 테스트 작성을 위해 토너먼트 상태별·위시·회원 목 데이터와 fixture 확장

범위

  • 해피패스 + 핵심 가드만 다룸
  • 아이템 담기는 위시에서 가져오기(by-wish) 방식으로 검증

구조

tournament/[id]/match, tournament/[id]/result는 RSC가 서버사이드에서 getTournament을 직접 호출하는데, SSR 목 스텁 서버(e2e/setup/mockApiServer.ts)는 경로당 응답이 고정이라 같은 id로 PENDING → IN_PROGRESS → COMPLETED 상태 전이를 표현할 수 없음.

단계별로 토너먼트 id를 분리해 3개 spec으로 작성함.

id 상태 spec
1 (11, 13, 14) PENDING 생성·담기·시작 가드
2 IN_PROGRESS 매치 진행
3 COMPLETED 영수증 결과

작업 상세 내용

테스트 spec

tournamentItemAdd.spec.ts (PENDING)

  • 홈에서 생성 → /tournament/{id}/create 진입
  • 위시에서 상품 4개 가져오기 → 장바구니에 담김 확인
  • 가드: 후보 2개 미만 → 시작 버튼 비활성화
  • 가드: 후보 수가 2의 거듭제곱이 아님 → 부전승 안내 모달
  • 후보 4개로 시작 → 로딩 페이지 이동

tournamentMatch.spec.ts (id 2 — IN_PROGRESS)

  • 4강 두 매치 진행 → 결승 라운드 전환 확인
  • 결승 선택 시 기록 요청(payload)이 올바르게 전송되는지 확인

tournamentResult.spec.ts (id 3 — COMPLETED)

  • 영수증에 1~4위 상품·순위 렌더링 확인
  • 저장·공유 버튼 노출 확인, 홈으로 가기 이동 확인

목 데이터 / fixture 확장

(e2e/mocks/, e2e/fixtures/mockApiFixture.ts, e2e/setup/mockApiServer.ts)

  • mocks/tournament.ts: 토너먼트 후보 아이템 4종, 담긴 개수별 PENDING 변형, IN_PROGRESS/COMPLETED 목 추가
  • mocks/wish.ts 신규: by-wish 담기 테스트용 위시 목록
  • mocks/me.ts: 회원 전용 UI(위시에서 가져오기 등) 검증용 MOCK_MEMBER_ME 추가
  • mockApiFixture.ts: 커서 페이지네이션 응답(pageResponse)을 다루는 api.getPage() 추가
  • mockApiServer.ts: 상태·개수 변형별 토너먼트 SSR 응답 등록

이번 범위에서 제외한 것

항목 사유
장바구니 8개 꽉참/자동 스크롤 로직 순수 함수 유닛 테스트 영역
영수증 이미지 실제 저장(html-to-image + Web Share)·공유 클립보드 동작 버튼 노출까지만 검증 (headless 환경이 모바일 공유 시트를 대변하지 못함)
로딩 대진표/영수증 뽑기 애니메이션 수동 QA 영역

스크린샷

image

연관 이슈

closes #388

Summary by CodeRabbit

  • 테스트
    • 토너먼트 생성부터 위시 기반 아이템 담기까지의 흐름을 검증하고, 후보 수에 따른 시작 제한 및 부전승 안내 표시/닫기 동작을 확인했습니다.
    • 4강 매치 연속 진행 시 결승 화면 전환과 결승 기록 전송 payload에 currentRound 포함 여부를 검증했습니다.
    • 완료 결과 페이지에서 제목/순위 렌더링, 영수증 저장·공유 버튼 표시, 홈 이동 동작을 확인했습니다.

kanghaeun and others added 4 commits July 26, 2026 20:48
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
piki Ready Ready Preview Jul 31, 2026 4:16am

@github-actions

Copy link
Copy Markdown

Discord 스레드 연동용 메타데이터입니다. discord-pr-bot 워크플로가 자동 생성하며, 수정·삭제하면 PR 과 Discord 알림 연동이 끊깁니다.

@github-actions
github-actions Bot requested a review from iOdiO89 July 26, 2026 15:39
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@iOdiO89, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c2adaa02-0175-4d6e-8d53-a284bb66b7d1

📥 Commits

Reviewing files that changed from the base of the PR and between ed1a80a and 89fcb05.

📒 Files selected for processing (1)
  • apps/web/src/app/tournament/[id]/_common/_types/tournamentResponse.ts
📝 Walkthrough

Walkthrough

토너먼트 E2E 테스트를 위해 페이지 응답 목킹, 회원·위시·토너먼트 상태별 목 데이터, SSR 라우트와 생성·아이템 추가·매치·결과 시나리오가 추가되었습니다.

Changes

솔로 토너먼트 E2E 검증

Layer / File(s) Summary
페이지 응답 목킹 확장
apps/web/e2e/fixtures/mockApiFixture.ts
getPagePageResponseT를 추가하고 페이지 메타데이터를 성공 응답에 병합합니다.
토너먼트 시나리오 목 데이터
apps/web/e2e/mocks/me.ts, apps/web/e2e/mocks/tournament.ts, apps/web/e2e/mocks/wish.ts
회원 사용자, pending·in-progress·completed 토너먼트, 토너먼트 아이템과 위시 목록 목 데이터를 추가합니다.
SSR 목 라우트 연결
apps/web/e2e/setup/mockApiServer.ts
회원 사용자와 토너먼트 ID별 상태 응답을 SSR 라우트에 연결합니다.
생성 및 아이템 추가 E2E
apps/web/e2e/specs/tournament/tournamentItemAdd.spec.ts
토너먼트 생성, 위시 아이템 추가, 후보 수 가드와 시작 페이지 이동을 검증합니다.
매치 및 결과 E2E
apps/web/e2e/specs/tournament/tournamentMatch.spec.ts, apps/web/e2e/specs/tournament/tournamentResult.spec.ts
준결승에서 결승으로의 전환과 결승 기록 요청, 결과 페이지의 순위·버튼 렌더링 및 홈 이동을 검증합니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Playwright
  participant mockApiFixture
  participant mockApiServer
  participant TournamentCreatePage
  Playwright->>mockApiFixture: getPage 위시 응답 등록
  Playwright->>mockApiServer: 토너먼트 SSR 응답 등록
  Playwright->>TournamentCreatePage: 위시 아이템 선택
  TournamentCreatePage->>mockApiFixture: 선택 아이템 제출
  mockApiFixture-->>TournamentCreatePage: 갱신된 토너먼트 데이터 반환
Loading

Possibly related PRs

  • TeamPiKi/client#319: Playwright API fixture의 페이지 응답 목킹 구조와 직접 연결됩니다.

Suggested reviewers: iodio89

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 주요 변경인 솔로 토너먼트 E2E 테스트 시나리오 추가를 정확하고 간결하게 요약합니다.
Linked Issues check ✅ Passed 추가된 목, fixture, SSR 라우트, 3개 E2E 스펙이 #388의 생성·담기·매치·결과 흐름과 가드 검증 요구를 충족합니다.
Out of Scope Changes check ✅ Passed 기능 범위는 요청된 솔로 토너먼트 E2E 테스트와 지원용 목/fixture 확장에 한정되어 보입니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/388-solo-tournament-e2e

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/e2e/mocks/tournament.ts`:
- Around line 149-155: Update MOCK_TOURNAMENT_IN_PROGRESS_FINAL’s
inProgress.remainingItems to contain the selected finalists from the original
[11, 12, 13, 14] order—items 11 and 13—rather than using slice(0, 2), so the
final re-fetch and subsequent request checks exclude eliminated item 12.

In `@apps/web/e2e/specs/tournament/tournamentItemAdd.spec.ts`:
- Line 25: In apps/web/e2e/specs/tournament/tournamentItemAdd.spec.ts:25,
replace method/path-only interception with waitForRequest-based validation that
asserts the create request includes the entered tournament name. At
apps/web/e2e/specs/tournament/tournamentItemAdd.spec.ts:46-48, likewise capture
the wish-add request and assert it contains the selected item identifiers;
preserve the existing successful API responses while validating both required
payloads.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 29527511-e8e5-4f31-aa8a-875e6e7bf0bf

📥 Commits

Reviewing files that changed from the base of the PR and between 2657672 and a49d2bc.

📒 Files selected for processing (8)
  • apps/web/e2e/fixtures/mockApiFixture.ts
  • apps/web/e2e/mocks/me.ts
  • apps/web/e2e/mocks/tournament.ts
  • apps/web/e2e/mocks/wish.ts
  • apps/web/e2e/setup/mockApiServer.ts
  • apps/web/e2e/specs/tournament/tournamentItemAdd.spec.ts
  • apps/web/e2e/specs/tournament/tournamentMatch.spec.ts
  • apps/web/e2e/specs/tournament/tournamentResult.spec.ts

Comment thread apps/web/e2e/mocks/tournament.ts
Comment thread apps/web/e2e/specs/tournament/tournamentItemAdd.spec.ts
@github-actions github-actions Bot added the WEB label Jul 26, 2026
@iOdiO89
iOdiO89 merged commit e72517b into dev Jul 31, 2026
7 checks passed
@iOdiO89
iOdiO89 deleted the test/388-solo-tournament-e2e branch July 31, 2026 04:19
iOdiO89 added a commit that referenced this pull request Jul 31, 2026
* chore: E2E 목 데이터·fixture 확장 (토너먼트 상태별·위시·회원)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: 솔로 토너먼트 생성·아이템 담기 E2E 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: 솔로 토너먼트 매치 진행 E2E 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: 솔로 토너먼트 결과 영수증 E2E 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: 결승 진출 목 데이터를 실제 승자(11·13) 기준으로 수정

* test: 토너먼트 생성·위시 담기 요청 payload 검증 추가

* fix: test에서 사용하는 타입 export로 변경

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Jung Sun A <amber0809@naver.com>
Co-authored-by: iOdiO89 <117376841+iOdiO89@users.noreply.github.com>
iOdiO89 added a commit that referenced this pull request Jul 31, 2026
* feat: 로그인 전 온보딩 슬라이드 추가

* fix: 온보딩 하단 CTA 공통 컴포넌트 적용 및 짧은 화면 일러스트 겹침 해결

- 인디케이터/다음 버튼을 BottomCta(hasGradient)로 감쌈 — 시안의 36px Top Gradient와 동일
- main을 min-h-dvh -> h-dvh로 변경. 상한이 없어 페이지가 늘어나면서 flex-1이 축소되지 않던 문제
- 일러스트 max-h-full은 부모 높이를 순환 참조해 클램프되지 않아, h-full + preserveAspectRatio 기반으로 교체

* test: 솔로 토너먼트 E2E 테스트 시나리오 추가 (#389)

* chore: E2E 목 데이터·fixture 확장 (토너먼트 상태별·위시·회원)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: 솔로 토너먼트 생성·아이템 담기 E2E 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: 솔로 토너먼트 매치 진행 E2E 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: 솔로 토너먼트 결과 영수증 E2E 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: 결승 진출 목 데이터를 실제 승자(11·13) 기준으로 수정

* test: 토너먼트 생성·위시 담기 요청 payload 검증 추가

* fix: test에서 사용하는 타입 export로 변경

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Jung Sun A <amber0809@naver.com>
Co-authored-by: iOdiO89 <117376841+iOdiO89@users.noreply.github.com>

* style: 온보딩 carousel indicator cursor-pointer 추가

---------

Co-authored-by: kanghaeun <145974230+kanghaeun@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: 솔로 토너먼트 E2E 테스트 시나리오 도입

2 participants