}
}
+.comments-container {
+ padding-inline: $-xl;
+ @include smaller-than($m) {
+ padding-inline: $-xs;
+ }
+}
.comment-box {
border-radius: 4px;
border: 1px solid #DDD;
height: calc(100% - $-m);
}
+.comment-branch .comment-branch .comment-branch .comment-branch .comment-thread-indicator {
+ display: none;
+}
+
#tag-manager .drag-card {
max-width: 500px;
}
</div>
@endif
- <div class="px-xl comments-container mb-l print-hidden">
+ <div class="comments-container mb-l print-hidden">
@include('comments.comments', ['commentTree' => $commentTree, 'page' => $page])
<div class="clearfix"></div>
</div>
$pageView->assertDontSee($script, false);
$pageView->assertSee('sometextinthecommentupdated');
}
+
+ public function test_reply_comments_are_nested()
+ {
+ $this->asAdmin();
+ $page = $this->entities->page();
+
+ $this->postJson("/comment/$page->id", ['text' => 'My new comment']);
+ $this->postJson("/comment/$page->id", ['text' => 'My new comment']);
+
+ $respHtml = $this->withHtml($this->get($page->getUrl()));
+ $respHtml->assertElementCount('.comment-branch', 3);
+ $respHtml->assertElementNotExists('.comment-branch .comment-branch');
+
+ $comment = $page->comments()->first();
+ $resp = $this->postJson("/comment/$page->id", ['text' => 'My nested comment', 'parent_id' => $comment->local_id]);
+ $resp->assertStatus(200);
+
+ $respHtml = $this->withHtml($this->get($page->getUrl()));
+ $respHtml->assertElementCount('.comment-branch', 4);
+ $respHtml->assertElementContains('.comment-branch .comment-branch', 'My nested comment');
+ }
}