diff --git a/core/modules/views_ui/src/Tests/PreviewTest.php b/core/modules/views_ui/src/Tests/PreviewTest.php index d2dcd12..85073fb 100644 --- a/core/modules/views_ui/src/Tests/PreviewTest.php +++ b/core/modules/views_ui/src/Tests/PreviewTest.php @@ -275,7 +275,7 @@ public function testPreviewSortLink() { $this->getPreviewAJAX('test_click_sort', 'page_1', 0); // Test that the header label is present. - $elements = $this->xpath('//th[contains(@class, :class)]/a', array(':class' => 'views-field views-field-name')); + $elements = $this->cssSelect('th.views-field.views-field-name a'); $this->assertTrue(!empty($elements), 'The header label is present.'); // Verify link. @@ -285,7 +285,7 @@ public function testPreviewSortLink() { $this->clickPreviewLinkAJAX($elements[0]['href'], 0); // Test that the header label is present. - $elements = $this->xpath('//th[contains(@class, :class)]/a', array(':class' => 'views-field views-field-name is-active')); + $elements = $this->cssSelect('th.is-active.views-field.views-field-name a'); $this->assertTrue(!empty($elements), 'The header label is present.'); // Verify link.