Skip to content

여러 댓글 합치기와 대댓글 버튼을 픽스처로 잠근다 - #47

Merged
Jang990 merged 2 commits into
mainfrom
test/#45
Sep 10, 2026
Merged

여러 댓글 합치기와 대댓글 버튼을 픽스처로 잠근다#47
Jang990 merged 2 commits into
mainfrom
test/#45

Conversation

@Jang990

@Jang990 Jang990 commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Closes #45

무엇을 바꿨나

buildFixturePage 가 댓글마다 대댓글을 받아 원댓글 thread 안에 중첩해 그린다.
대댓글이 필요한 댓글만 객체로 넘기고, 문자열로 넘기는 기존 호출은 그대로 둔다.

commentTexts: ['00:01 첫 곡', { text: '평범한 댓글', replyTexts: ['05:00 대댓글 곡'] }]

대댓글 구조는 2026-09-10 실제 시청 페이지에서 확인했다.

ytd-comment-thread-renderer
  > ytd-comment-replies-renderer > div#expanded-threads > yt-sub-thread > div
      > ytd-comment-thread-renderer > div#comment-container
          > ytd-comment-view-model#comment > ... > yt-attributed-string#content-text

src/ 는 바뀌지 않았다.

확인

  • npm test 162개 통과 (기존 159 + 3)
  • npm run test:e2e 37개 통과 (기존 32 + 5)

합치기 테스트 2개는 첫 커밋부터 통과했다. 이미 동작하던 것이라 이 PR은 회귀만 막는다.
대댓글 테스트 3개는 픽스처에 대댓글이 없어서 실패했고, 픽스처를 고쳐 통과시켰다.

대댓글에 버튼이 달리는 근거는 youtubeComments.js 의 셀렉터가 자손 셀렉터라는 것 하나뿐이다.
ytd-comment-view-model#comment > #content-text 처럼 조이면 대댓글 버튼이 사라지는데,
이제 그 순간 이 테스트들이 깨진다.

미확인

없음. 프로덕션 코드가 바뀌지 않아 브라우저에서 볼 것이 없다.

🤖 Generated with Claude Code

https://claude.ai/code/session_019T2bcCVRY6d1cr8bbP7vrW

Jang990 and others added 2 commits September 10, 2026 18:04
대댓글은 지금도 동작하지만 그것을 지키는 테스트가 없다. 셀렉터를 조이면
소리 없이 사라지는 자리라 기대값을 먼저 적는다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019T2bcCVRY6d1cr8bbP7vrW
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019T2bcCVRY6d1cr8bbP7vrW
@Jang990 Jang990 added the test 테스트 추가·정비 label Sep 10, 2026
@Jang990
Jang990 merged commit e920ed2 into main Sep 10, 2026
2 checks passed
@Jang990
Jang990 deleted the test/#45 branch September 10, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test 테스트 추가·정비

Projects

None yet

Development

Successfully merging this pull request may close these issues.

여러 댓글 합치기와 대댓글 버튼을 픽스처로 잠근다

1 participant