diff --git a/core/modules/comment/src/Tests/CommentAnonymousTest.php b/core/modules/comment/src/Tests/CommentAnonymousTest.php index b7e5bd8..b67dd3c 100644 --- a/core/modules/comment/src/Tests/CommentAnonymousTest.php +++ b/core/modules/comment/src/Tests/CommentAnonymousTest.php @@ -48,7 +48,7 @@ function testAnonymous() { $edit['comment_body[0][value]'] = $body; $this->drupalPostForm($this->node->urlInfo(), $edit, t('Preview')); // Cannot use assertRaw here since both title and body are in the form. - $preview = (string) $this->cssSelect('.preview')[0]->asXML(); + $preview = (string) $this->cssSelect('.comment.by-anonymous')[0]->asXML(); $this->assertTrue(strpos($preview, $title) !== FALSE, 'Anonymous user can preview comment title.'); $this->assertTrue(strpos($preview, $body) !== FALSE, 'Anonymous user can preview comment body.');