]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/CommentTest.php
add tests for priority
[bookstack] / tests / Entity / CommentTest.php
index a04933ada6d653c61027cb3768d729048a5695ab..b3e9f3cd0ed40413336204fedb0e4e632587e174 100644 (file)
@@ -135,4 +135,14 @@ class CommentTest extends TestCase
         $respHtml->assertElementCount('.comment-branch', 4);
         $respHtml->assertElementContains('.comment-branch .comment-branch', 'My nested comment');
     }
+
+    public function test_comments_are_visible_in_the_page_editor()
+    {
+        $page = $this->entities->page();
+
+        $this->asAdmin()->postJson("/comment/$page->id", ['text' => 'My great comment to see in the editor']);
+
+        $respHtml = $this->withHtml($this->get($page->getUrl('/edit')));
+        $respHtml->assertElementContains('.comment-box .content', 'My great comment to see in the editor');
+    }
 }