e2e 테스트 수정
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user