test #432
@@ -260,6 +260,7 @@ class DefaultCreatorChannelCommunityQueryRepository(
|
|||||||
creatorCommunityComment.member.profileImage,
|
creatorCommunityComment.member.profileImage,
|
||||||
creatorCommunityComment.member.nickname,
|
creatorCommunityComment.member.nickname,
|
||||||
creatorCommunityComment.comment,
|
creatorCommunityComment.comment,
|
||||||
|
creatorCommunityComment.isSecret,
|
||||||
creatorCommunityComment.createdAt
|
creatorCommunityComment.createdAt
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -556,6 +557,7 @@ class DefaultCreatorChannelCommunityQueryRepository(
|
|||||||
writerProfilePath = get(creatorCommunityComment.member.profileImage),
|
writerProfilePath = get(creatorCommunityComment.member.profileImage),
|
||||||
writerNickname = get(creatorCommunityComment.member.nickname)!!,
|
writerNickname = get(creatorCommunityComment.member.nickname)!!,
|
||||||
content = get(creatorCommunityComment.comment)!!,
|
content = get(creatorCommunityComment.comment)!!,
|
||||||
|
isSecret = get(creatorCommunityComment.isSecret)!!,
|
||||||
createdAt = get(creatorCommunityComment.createdAt)!!
|
createdAt = get(creatorCommunityComment.createdAt)!!
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ class CreatorChannelCommunityQueryService(
|
|||||||
writerProfileImageUrl = writerProfilePath.toCdnUrl(cloudFrontHost) ?: defaultProfileImageUrl(),
|
writerProfileImageUrl = writerProfilePath.toCdnUrl(cloudFrontHost) ?: defaultProfileImageUrl(),
|
||||||
writerNickname = writerNickname.removeDeletedNicknamePrefix(),
|
writerNickname = writerNickname.removeDeletedNicknamePrefix(),
|
||||||
content = content,
|
content = content,
|
||||||
|
isSecret = isSecret,
|
||||||
createdAt = createdAt,
|
createdAt = createdAt,
|
||||||
latestReply = latestReply
|
latestReply = latestReply
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ data class CreatorChannelCommunityComment(
|
|||||||
val writerProfileImageUrl: String,
|
val writerProfileImageUrl: String,
|
||||||
val writerNickname: String,
|
val writerNickname: String,
|
||||||
val content: String,
|
val content: String,
|
||||||
|
val isSecret: Boolean,
|
||||||
val createdAt: LocalDateTime,
|
val createdAt: LocalDateTime,
|
||||||
val latestReply: CreatorChannelCommunityReply?
|
val latestReply: CreatorChannelCommunityReply?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ data class CreatorChannelCommunityCommentRecord(
|
|||||||
val writerProfilePath: String?,
|
val writerProfilePath: String?,
|
||||||
val writerNickname: String,
|
val writerNickname: String,
|
||||||
val content: String,
|
val content: String,
|
||||||
|
val isSecret: Boolean,
|
||||||
val createdAt: LocalDateTime
|
val createdAt: LocalDateTime
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ class CreatorChannelCommunityQueryServiceTest {
|
|||||||
assertEquals(20, detail.comments.comments.size)
|
assertEquals(20, detail.comments.comments.size)
|
||||||
assertEquals(true, detail.comments.hasNext)
|
assertEquals(true, detail.comments.hasNext)
|
||||||
assertEquals(101L, detail.comments.comments.first().writerId)
|
assertEquals(101L, detail.comments.comments.first().writerId)
|
||||||
|
assertEquals(false, detail.comments.comments.first().isSecret)
|
||||||
assertEquals("reply-writer", detail.comments.comments.first().latestReply?.writerNickname)
|
assertEquals("reply-writer", detail.comments.comments.first().latestReply?.writerNickname)
|
||||||
assertEquals(200L, detail.comments.comments.first().latestReply?.writerId)
|
assertEquals(200L, detail.comments.comments.first().latestReply?.writerId)
|
||||||
assertEquals("https://cdn.test/profile/default-profile.png", detail.comments.comments.first().writerProfileImageUrl)
|
assertEquals("https://cdn.test/profile/default-profile.png", detail.comments.comments.first().writerProfileImageUrl)
|
||||||
@@ -237,6 +238,7 @@ class CreatorChannelCommunityQueryServiceTest {
|
|||||||
assertEquals(50, comments.comments.size)
|
assertEquals(50, comments.comments.size)
|
||||||
assertEquals(true, comments.hasNext)
|
assertEquals(true, comments.hasNext)
|
||||||
assertEquals(101L, comments.comments.first().writerId)
|
assertEquals(101L, comments.comments.first().writerId)
|
||||||
|
assertEquals(false, comments.comments.first().isSecret)
|
||||||
assertEquals("https://cdn.test/profile/1.png", comments.comments.first().writerProfileImageUrl)
|
assertEquals("https://cdn.test/profile/1.png", comments.comments.first().writerProfileImageUrl)
|
||||||
assertEquals(100L, comments.comments[1].latestReply?.commentId)
|
assertEquals(100L, comments.comments[1].latestReply?.commentId)
|
||||||
assertEquals(200L, comments.comments[1].latestReply?.writerId)
|
assertEquals(200L, comments.comments[1].latestReply?.writerId)
|
||||||
@@ -499,7 +501,8 @@ private fun communityCommentRecord(
|
|||||||
commentId: Long,
|
commentId: Long,
|
||||||
parentCommentId: Long? = null,
|
parentCommentId: Long? = null,
|
||||||
writerProfilePath: String? = null,
|
writerProfilePath: String? = null,
|
||||||
writerNickname: String = "writer-$commentId"
|
writerNickname: String = "writer-$commentId",
|
||||||
|
isSecret: Boolean = false
|
||||||
): CreatorChannelCommunityCommentRecord {
|
): CreatorChannelCommunityCommentRecord {
|
||||||
return CreatorChannelCommunityCommentRecord(
|
return CreatorChannelCommunityCommentRecord(
|
||||||
commentId = commentId,
|
commentId = commentId,
|
||||||
@@ -509,6 +512,7 @@ private fun communityCommentRecord(
|
|||||||
writerProfilePath = writerProfilePath,
|
writerProfilePath = writerProfilePath,
|
||||||
writerNickname = writerNickname,
|
writerNickname = writerNickname,
|
||||||
content = "comment-$commentId",
|
content = "comment-$commentId",
|
||||||
|
isSecret = isSecret,
|
||||||
createdAt = LocalDateTime.of(2026, 7, 6, 10, 0).plusMinutes(commentId)
|
createdAt = LocalDateTime.of(2026, 7, 6, 10, 0).plusMinutes(commentId)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user