diff --git a/core/modules/comment/src/Tests/CommentCSSTest.php b/core/modules/comment/src/Tests/CommentCSSTest.php index 47a31cc..0c95b59 100644 --- a/core/modules/comment/src/Tests/CommentCSSTest.php +++ b/core/modules/comment/src/Tests/CommentCSSTest.php @@ -115,7 +115,7 @@ function testCommentClasses() { } // Verify the unpublished class. - $comments = $this->xpath('//*[contains(@class, "comment") and contains(@class, "unpublished")]'); + $comments = $this->xpath('//*[contains(@class, "comment")]//mark[.="unpublished"]'); if ($case['comment_status'] == CommentInterface::NOT_PUBLISHED && $case['user'] == 'admin') { $this->assertTrue(count($comments) == 1, 'unpublished class found.'); } diff --git a/core/modules/comment/src/Tests/CommentPreviewTest.php b/core/modules/comment/src/Tests/CommentPreviewTest.php index ae92de0..877d9f2 100644 --- a/core/modules/comment/src/Tests/CommentPreviewTest.php +++ b/core/modules/comment/src/Tests/CommentPreviewTest.php @@ -76,7 +76,7 @@ function testCommentPreview() { $this->assertFieldByName('comment_body[0][value]', $edit['comment_body[0][value]'], 'Comment field displayed.'); // Check that the user picture is displayed. - $this->assertFieldByXPath("//article[contains(@class, 'preview')]//div[contains(@class, 'user-picture')]//img", NULL, 'User picture displayed.'); + $this->assertFieldByXPath('//article[contains(@class, "comment") and mark[.="preview"]]//div[contains(@class, "user-picture")]//img', NULL, 'User picture displayed.'); } /** diff --git a/core/modules/history/src/Tests/Views/HistoryTimestampTest.php b/core/modules/history/src/Tests/Views/HistoryTimestampTest.php index 44f67f9..17312ea 100644 --- a/core/modules/history/src/Tests/Views/HistoryTimestampTest.php +++ b/core/modules/history/src/Tests/Views/HistoryTimestampTest.php @@ -71,7 +71,7 @@ public function testHandlers() { $this->assertEqual(count($view->result), 2); $output = $view->preview(); $this->setRawContent(\Drupal::service('renderer')->renderRoot($output)); - $result = $this->xpath('//span[@class=:class]', array(':class' => 'marker')); + $result = $this->xpath('//*[contains(@class, "views-row")]//mark[.="read"]'); $this->assertEqual(count($result), 1, 'Just one node is marked as new'); // Test the history filter.