diff --git a/core/modules/block_content/src/Tests/BlockContentListViewsTest.php b/core/modules/block_content/src/Tests/BlockContentListViewsTest.php index f1b5941..905443f 100644 --- a/core/modules/block_content/src/Tests/BlockContentListViewsTest.php +++ b/core/modules/block_content/src/Tests/BlockContentListViewsTest.php @@ -66,7 +66,8 @@ public function testListing() { // Confirm that once the user returns to the listing, the text of the label // (versus elsewhere on the page). - $this->assertFieldByXpath('//td/a', $label, 'Label found for added block.'); + $elements = $this->xpath('//td[contains(@class,"views-field-info")]'); + $this->assertEqual(trim((string) $elements[0]), $label, 'Label found for added block.'); // Check the number of table row cells. $elements = $this->xpath('//div[@class="layout-content"]//table/tbody/tr/td'); @@ -74,7 +75,7 @@ public function testListing() { // Check the contents of each row cell. The first cell contains the label, // the second contains the machine name, and the third contains the // operations list. - $this->assertIdentical((string) $elements[0]->xpath('a')[0], $label); + $this->assertIdentical(trim((string) $elements[0]), $label); // Edit the entity using the operations link. $blocks = $this->container @@ -96,7 +97,8 @@ public function testListing() { // Confirm that once the user returns to the listing, the text of the label // (versus elsewhere on the page). - $this->assertFieldByXpath('//td/a', $new_label, 'Label found for updated custom block.'); + $elements = $this->xpath('//td[contains(@class,"views-field-info")]'); + $this->assertEqual(trim((string) $elements[0]), $new_label, 'Label found for updated custom block.'); // Delete the added entity using the operations link. $this->assertLinkByHref('block/' . $block->id() . '/delete');