Skip to content

[DEV-256/BE] test: QnaSetMyController 테스트 작성#371

Merged
zxc534 merged 36 commits intodevfrom
DEV-256/feat/qna-set-my-controller-통합-테스트-작성
Feb 15, 2026

Hidden character warning

The head ref may contain hidden characters: "DEV-256/feat/qna-set-my-controller-\ud1b5\ud569-\ud14c\uc2a4\ud2b8-\uc791\uc131"
Merged

[DEV-256/BE] test: QnaSetMyController 테스트 작성#371
zxc534 merged 36 commits intodevfrom
DEV-256/feat/qna-set-my-controller-통합-테스트-작성

Conversation

@zxc534
Copy link
Collaborator

@zxc534 zxc534 commented Feb 13, 2026

관련 이슈

close #370

작업한 내용

  • QnaSetMyController 통합 테스트 작성

PR 리뷰시 참고할 사항

@zxc534 zxc534 self-assigned this Feb 13, 2026
@vercel
Copy link

vercel bot commented Feb 13, 2026

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

Project Deployment Actions Updated (UTC)
web-team4-refit Ready Ready Preview, Comment Feb 15, 2026 3:31pm

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @zxc534, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 Q&A 세트 관리 기능의 견고성을 높이기 위해 QnaSetControllerQnaSetService에 대한 포괄적인 통합 테스트를 도입하는 데 중점을 둡니다. 또한, 어려운 질문 마킹 해제 로직의 중요한 버그를 수정하고, Q&A 세트 수정 및 PDF 하이라이팅 업데이트가 특정 인터뷰 검토 상태(QNA_SET_DRAFT)에서만 가능하도록 유효성 검사를 추가하여 데이터 일관성을 강화했습니다. 테스트 지원을 위해 IntegrationTest 기반 클래스에 새로운 헬퍼 메서드와 리포지토리 주입이 포함되었습니다.

Highlights

  • QnaSetController 업데이트: 통합 테스트를 위한 TODO 주석이 추가되었으며, updateQnaSetupdatePdfHighlighting API의 Swagger 설명이 QnaSetDraft 상태를 명시하도록 수정되었습니다.
  • QnaSet 모델 수정: unmarkDifficult 메서드의 isMarkedDifficult 필드 설정 로직이 true에서 false로 수정되어 버그가 해결되었습니다.
  • QnaSetService 유효성 검사 강화: updateQnaSetupdatePdfHighlighting 메서드에 인터뷰 검토 상태가 QNA_SET_DRAFT일 때만 허용하도록 유효성 검사 로직이 추가되었습니다.
  • QnaSetService 코드 정리: 중복 ID를 제거하는 데 사용되던 removeDuplicatedIds 프라이빗 헬퍼 메서드가 제거되었습니다.
  • IntegrationTest 기반 클래스 확장: QnaSet 관련 모델 및 리포지토리 임포트, QnaSetCategory 필드 및 리포지토리 추가, 그리고 Q&A 세트 및 PDF 하이라이팅 생성을 위한 헬퍼 메서드가 도입되었습니다.
  • 새로운 통합 테스트 추가: QnaSetIntegrationTestQnaSetMyIntegrationTest가 추가되어 Q&A 세트의 생성, 수정, 삭제, 마킹, PDF 하이라이팅 관리, 빈출 카테고리 조회 및 검색 기능에 대한 광범위한 통합 테스트가 구현되었습니다.
Changelog
  • backend/src/main/java/com/shyashyashya/refit/core/IntegrationTest.java
    • QnaSetCreateRequest, PdfHighlightingUpdateRequest 등 Q&A 세트 관련 DTO 및 모델 임포트가 추가되었습니다.
    • QnaSetCategory 필드 및 관련 리포지토리(QnaSetRepository, PdfHighlightingRepository, PdfHighlightingRectRepository, QnaSetCategoryRepository)가 주입되었습니다.
    • 테스트 데이터 생성을 위한 헬퍼 메서드(createAndSaveQnaSet, createQnaSet, createAndSavePdfHighlighting)가 추가되었습니다.
    • QnaSetCategory 인스턴스 초기화 로직이 추가되었습니다.
  • backend/src/main/java/com/shyashyashya/refit/domain/qnaset/api/QnaSetController.java
    • 통합 테스트 작성을 위한 TODO 주석이 추가되었습니다.
    • updateQnaSetupdatePdfHighlighting API의 Swagger 설명에서 허용되는 인터뷰 상태가 '기록중'에서 'QnaSetDraft'로 명확히 변경되었습니다.
  • backend/src/main/java/com/shyashyashya/refit/domain/qnaset/model/QnaSet.java
    • unmarkDifficult 메서드에서 isMarkedDifficult 필드를 true에서 false로 수정하는 버그가 해결되었습니다.
  • backend/src/main/java/com/shyashyashya/refit/domain/qnaset/service/QnaSetService.java
    • updateQnaSetupdatePdfHighlighting 메서드에 InterviewReviewStatus.QNA_SET_DRAFT 상태 유효성 검사가 추가되었습니다.
    • 사용되지 않는 removeDuplicatedIds 프라이빗 메서드가 제거되었습니다.
  • backend/src/test/java/com/shyashyashya/refit/integration/qnaset/QnaSetIntegrationTest.java
    • Q&A 세트 생성, 어려운 질문 마킹/마킹 해제, Q&A 세트 수정, Q&A 세트 삭제, PDF 하이라이팅 등록/수정 및 조회 기능에 대한 통합 테스트가 새로 추가되었습니다.
    • 각 기능에 대해 성공 및 실패 케이스(예: 잘못된 인터뷰 상태, 접근 권한 없음)를 검증합니다.
  • backend/src/test/java/com/shyashyashya/refit/integration/qnaset/QnaSetMyIntegrationTest.java
    • 사용자 본인의 빈출 질문 카테고리 조회 및 특정 카테고리 질문 조회, 그리고 나의 면접 질문 검색 기능에 대한 통합 테스트가 새로 추가되었습니다.
    • 질문이 있는/없는 카테고리 조회 및 모든 질문 검색 시의 결과를 검증합니다.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 QnaSetMyController에 대한 통합 테스트를 추가하고, 이 과정에서 발견된 버그를 수정하며 관련 코드를 개선하는 작업을 포함하고 있습니다. 전반적으로 테스트 커버리지를 높이고 코드 품질을 개선하는 좋은 변경이라고 생각합니다. 한 가지 발견된 잠재적 NullPointerException 문제에 대한 의견을 남겼습니다. 해당 부분을 확인하고 조치해주시면 더 안정적인 코드가 될 것 같습니다.

Copy link
Collaborator

@kckc0608 kckc0608 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@lja3723 lja3723 left a comment

Choose a reason for hiding this comment

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

LGTM

@zxc534 zxc534 merged commit 5e5e6ea into dev Feb 15, 2026
3 checks passed
@zxc534 zxc534 deleted the DEV-256/feat/qna-set-my-controller-통합-테스트-작성 branch February 15, 2026 15:34
kckc0608 added a commit that referenced this pull request Feb 16, 2026
* feat: 나의 최근 한달동안 기록전 면접 조회

* test: 나의 최근 한 달 기록전 면접 리스트 조회 테스트 작성

* [DEV-234] feat: 데스크탑 record 페이지 개발 (#360)

* feat: LiveAudioVisualizer 데스크탑, 모바일로 분리

* feat: 복기 대기 중인 면접 mock API 연동

* feat: /record 페이지 추가

* feat: 로딩 오버레이 추가

* refactor: query 사용하게 변경

* [DEV-220/FE] feat: 자소서 연동 mock-api 연결 (#356)

* fix: 하이라이팅 API 응답에 맞추어 pageNumber로 변수명 통일

* feat: 자기소개서 연결된 텍스트 실시간으로 보이도록 UI 변경 및 버튼 파일 분리

* feat: useSuspenseQueries 사용하여 질답별 하이라이트 조회 API 연결 및 하이라이트 생성, 수정 API 연결

* feat: 뒤로 가기 버튼 추가

* feat: 질답 조회 API 연결 및 fallback skeleton 처리 추가

* feat: 하이라이팅 관련 mock handler 추가

* fix: 하이라이팅 API 응답에 맞추어 pageNumber로 변수명 통일

* fix: minimized sidebar skeleton 추가

* fix: qnaSetId null filter 추가

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* [DEV-221/FE] feat: 스크랩 모달 UI 구현 및 회고 작성 페이지 일부 mock-api 연결 (#359)

* feat: 회고 페이지 mock-api 등록

* feat: 질답 리스트 조회 API 연결

* feat: 스크랩 모달 구현 및 스크랩 폴더 목록 조회 API 연결

* fix: 모달 사이즈에 따라 title mb 스타일 수정

* feat: 회고 저장 useUpdateQnaSet API 연동 및 스크랩 아이콘 추가

* feat: 사이드바에서 번호 변경 시, 회고 저장되도록 추가 예정

* fix: Number(interviewId) 변수화

* fix: 초기 페이지 0으로 변경

* fix: import 에러 수정

* feat: 프론트 요청에 따라 dto 응답에 review status 를 응답하도록 추가 (#367)

* [DEV-257/BE] docs: 모든 API 응답의 필수 필드에 @NotNull 어노테이션 추가 (#376)

* docs: 프론트 요청에 따라 response 필드 중 not null 필드에 @NotNull 어노테이션 추가

* feat: user profile image url 필드에 not null 제약 추가 및 @NotNull 어노테이션 추가

* [DEV-258/FE] fix: 스크롤 폴더 이름 입력 안되는 이슈 수정 (#374)

* fix: prevIsOpen 제거하고 key 기반 리마운트로 초기화 처리

* fix: 다른 폴더 선택 뿐만 아니라 열기/닫기(activeModal 상태 변경) 시에도 key 바뀌도록 수정

* [DEV-261/BE] refactor: Swagger의 Pageable 객체 렌더링 개선 (#382)

* [DEV-263/BE] feat: 사용자 조회 API 응답에 동의 여부 필드 추가 (#386)

* [DEV-176/BE] test: QnaSetController 테스트 작성 (#369)

* feat: QnaSetIntegrationTest 생성

* test: 질답_세트_생성에_성공한다 작성

* feat: 질답 세트 생성 시 interview가 qnaSetDraft 상태인지 검증 로직 추가

* test: 인터뷰 상태에 검증 추가로 테스트 로직 수정

* chore: 프롬프트 파일 삭제

* test: 어려웠던 질문 마킹 등록/해제 테스트 작성

* feat: 인터뷰 상태 검증 로직 추가

* test: 질답 세트 수정 테스트 작성

* test: 면접 생성을 메소드 사용하여 간소화

* test: 질답 세트 수정 테스트 추가

* test: 질문 답변 세트 삭제 테스트 작성

* docs: 하이라이팅 등록/수정 API swagger 작성

* feat: PDF 하이라이팅 업데이트 시 면접 상태 검증 로직 추가

* test: PDF 하이라이팅 등록 테스트 작성

* test: createAndSavePdfHighlighting 메소드 구현

* test: PDF 하이라이팅 조회 테스트 작성

* chore: spotless 적용

* test: 실제 값 검증 로직을 추가

* fix: unmark 메소드가 값을 false로 설정하도록 수정

* chore: 잘못된 테스트 이름 수정

* [DEV-256/BE] test: QnaSetMyController 테스트 작성 (#371)

* feat: QnaSetIntegrationTest 생성

* test: 질답_세트_생성에_성공한다 작성

* feat: 질답 세트 생성 시 interview가 qnaSetDraft 상태인지 검증 로직 추가

* test: 인터뷰 상태에 검증 추가로 테스트 로직 수정

* chore: 프롬프트 파일 삭제

* test: 어려웠던 질문 마킹 등록/해제 테스트 작성

* feat: 인터뷰 상태 검증 로직 추가

* test: 질답 세트 수정 테스트 작성

* test: 면접 생성을 메소드 사용하여 간소화

* test: 질답 세트 수정 테스트 추가

* test: 질문 답변 세트 삭제 테스트 작성

* docs: 하이라이팅 등록/수정 API swagger 작성

* feat: PDF 하이라이팅 업데이트 시 면접 상태 검증 로직 추가

* test: PDF 하이라이팅 등록 테스트 작성

* test: createAndSavePdfHighlighting 메소드 구현

* test: PDF 하이라이팅 조회 테스트 작성

* chore: spotless 적용

* test: 실제 값 검증 로직을 추가

* fix: unmark 메소드가 값을 false로 설정하도록 수정

* chore: 잘못된 테스트 이름 수정

* test: qnaSetCategory 테스트 데이터 추가

* test: qnaSetMy 통합 테스트 작성

* refactor: 테스트 코드의 공통 부분을 외부 클래스의 BeforeEach로 분리

* chore: QnaSetDraft->질답 세트 검토 중, 명칭 변경

* chore: 테스트 코드 들여쓰기 수정

* chore: 일회성 변수 타입을 var로 수정

* test: 테스트에 업데이트된 값 검증 추가

* test: 질답 세트 수정 테스트 ParameterizedTest+EnumSource로 케이스 추가

* test: 테스트 케이스 추가

* chore: given/when/then 주석 추가

* chore: spoless 적용

* [DEV-188/BE] feat: llm 요청에 대한 인터페이스 설계 및 구현 (#378)

* refactor: 요청 URL을 Enum으로 분리

* feat: Gemini 생성 결과에 JSON 이외 텍스트 처리 로직 추가

* chore: gemini 요청 모델을 gemma 3 27B로 변경

* chore: spotless 적용

* feat: Embedding 요청 응답 dto 작성

* feat: 임베딩 요청 메소드 추가

* feat: 임베딩 요청 임시 API 추가

* chore: 불필요한 로그 제거

* chore: 메소드 명칭 수정

* chore: 에러 코드에서 의미가 명확하게 드러나도록 수정

* chore: 정적 팩토리 메소드 네이밍 수정

* chore: GenerateModel 필드명 변경 id->name

* refactor: 테스트 메소드의 계층 분리 제거

* refactor: 임베딩 테스트 메소드를 테스트 컨트롤러로 이동

* chore: spotless 적용

* refactor: 최근 한달의 정의를 30일에서 실제 월 별 1달로 수정

* feat: 나의 최근 한달동안 기록전 면접 조회

# Conflicts:
#	backend/src/main/java/com/shyashyashya/refit/domain/interview/dto/InterviewSimpleDto.java

* test: 나의 최근 한 달 기록전 면접 리스트 조회 테스트 작성

* refactor: 최근 한달의 정의를 30일에서 실제 월 별 1달로 수정

---------

Co-authored-by: forhyundaisofteer <forhyundaisofteer@gmail.com>
Co-authored-by: Joohee Hwang <2170095@ewhain.net>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Jangan Lee <lja3723@gmail.com>
Co-authored-by: Yeong-beom Song <72022985+zxc534@users.noreply.github.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.

[DEV-256/BE] feat: qna set my controller 통합 테스트 작성

3 participants