[FEAT] restaurant-service 배포환경 API 시나리오 테스트 추가 - #64
Conversation
📝 WalkthroughWalkthrough두 개의 E2E 테스트 시나리오가 변경됨. 기존 체크인 E2E 테스트는 Asia/Seoul 타임존으로 갱신되고 슬롯 선택·대기열 폴링·예약 흐름이 정교해짐. 새로운 레스토랑 API 시나리오는 소유자 등록부터 사용자 조회까지 전체 흐름을 테스트하며 다중 토큰 형식 추출과 에러 검증을 포함함. ChangesE2E 체크인 및 레스토랑 API 시나리오 테스트
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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 `@src/test/mvp/prod-full-checkin-e2e.http`:
- Around line 430-434: The test's STEP 8 only logs selected.startTime which can
be undefined because the response may use slot.slotStartTime; update the logging
so `@selectedSlotStartTime` always gets a value by using selected.startTime
fallback to selected.slotStartTime (or vice versa) where the logs are emitted
(the block that checks if (selected) and calls client.log for `@timeSlotId` and
`@selectedSlotStartTime`), ensuring you reference both selected.startTime and
selected.slotStartTime so the variable is never undefined.
- Around line 376-389: The test currently treats any 409 as a successful path
which can mask other conflicts; in the client.test "타임슬롯 일괄 생성 또는 기존 슬롯 존재 확인"
change the 409 branch to assert the conflict is the expected TS_008 case (e.g.
assert response.body.code === "TS_008" or response.body.errorCode === "TS_008"
depending on your API) and only log/continue when that check passes, otherwise
fail the test; keep the existing assert(response.body.success === true) for
non-409 responses and ensure you reference response.status and
response.body.code/errorCode in the checks.
In `@src/test/mvp/prod-restaurant-api-scenario.http`:
- Around line 16-27: The file contains hardcoded production credentials
(`@ownerLoginId`, `@ownerPassword`, `@ownerName`, `@ownerEmail`, `@ownerPhone` and
`@userLoginId`, `@userPassword`, `@userName`, `@userEmail`, `@userPhone`); remove these
literal values from src/test/mvp/prod-restaurant-api-scenario.http and replace
them with environment-backed placeholders (e.g., reference keys that map to
http-client.private.env.json or process/CI secrets), update the repo to read
those values at runtime and ensure http-client.private.env.json is gitignored
(or instruct CI to inject the secrets) so credentials are never committed to
source control.
- Around line 318-321: The test in client.test currently only asserts
response.body exists but allows an empty array; update the assertion to verify
the created restaurant is present by checking response.body.data contains the
previously created restaurantId (use response.body.data.some(item => item.id ===
restaurantId) or equivalent) and fail the test if not found; keep this check
inside the same client.test block that reads response.status and response.body
to ensure the scenario verifies the newly created restaurant is returned.
- Around line 354-358: The test currently only checks that response.body.data is
a non-empty array; add an assertion to verify the created course appears in the
results by checking that some item in response.body.data has id ===
createdCourseId (or the appropriate key used for course id), e.g., use
Array.prototype.some on response.body.data to assert presence of createdCourseId
so the test fails if the created course is not returned; update the client.test
block (the handler using client.test, response, and response.body.data) to
include this additional assertion.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f8c24d7f-32e7-419c-b434-a8d6e546f333
📒 Files selected for processing (2)
src/test/mvp/prod-full-checkin-e2e.httpsrc/test/mvp/prod-restaurant-api-scenario.http
📝 작업 내용
🚀 주요 변경 사항
✅ 자체 체크리스트 (필수)
./gradlew build실행 결과 정상 (인증샷 첨부)📸 테스트 인증샷
💬 리뷰어 전달사항 (선택)
📎 참고 자료
Summary by CodeRabbit
릴리스 노트