e2e 테스트 수정
CI / test (push) Successful in 4m41s
CI / e2e (push) Has been skipped
CI / pr_and_merge (push) Successful in 1m33s

This commit is contained in:
2025-12-02 12:15:05 +09:00
parent c331d5e14a
commit 5832b64d39
3 changed files with 70 additions and 12 deletions
+15 -1
View File
@@ -17,7 +17,21 @@ test("프리뷰 폼 제출 후 제출 내역 페이지에서 데이터가 보여
data: { email, password },
});
expect(signupRes.status()).toBe(201);
// 디버깅용: CI 등에서 500 이 떨어질 때 응답 바디를 함께 로그로 출력해 원인을 파악할 수 있게 한다.
const signupStatus = signupRes.status();
if (signupStatus !== 201) {
// text() 는 한 번만 읽을 수 있으므로, status 체크 이후에만 호출한다.
// CI 로그에서 이 메시지를 보고 실제 에러 원인(AUTH_JWT_SECRET, DATABASE_URL, Prisma 오류 등)을 추적한다.
console.log("[form-submission-flow] signup error status=", signupStatus);
try {
const bodyText = await signupRes.text();
console.log("[form-submission-flow] signup error body=", bodyText);
} catch (e) {
console.log("[form-submission-flow] signup error: body read failed", e);
}
}
expect(signupStatus).toBe(201);
const setCookieHeader = signupRes.headers()["set-cookie"];
expect(setCookieHeader).toBeTruthy();