diff --git a/core/modules/block/src/Tests/BlockUiTest.php b/core/modules/block/src/Tests/BlockUiTest.php index 1cc073c..5320942 100644 --- a/core/modules/block/src/Tests/BlockUiTest.php +++ b/core/modules/block/src/Tests/BlockUiTest.php @@ -170,15 +170,14 @@ public function testCandidateBlockList() { */ public function testContextAwareUnsatisfiedBlocks() { $arguments = array( - ':ul_class' => 'block-list', - ':li_class' => 'test-context-aware', - ':href' => 'admin/structure/block/add/test_block_instantiation/classy', - ':text' => 'Test context-aware block', + ':category' => 'Block test', + ':href' => 'admin/structure/block/add/test_context_aware_unsatisfied/classy', + ':text' => 'Test context-aware unsatisfied block', ); $this->drupalGet('admin/structure/block'); $this->clickLinkPartialName('Place block'); - $elements = $this->xpath('//details[@id="edit-category-block-test"]//ul[contains(@class, :ul_class)]/li[contains(@class, :li_class)]/a[contains(@href, :href) and text()=:text]', $arguments); + $elements = $this->xpath('//tr[.//td/div[text()=:text] and .//td[text()=:category] and .//td//a[contains(@href, :href)]]', $arguments); $this->assertTrue(empty($elements), 'The context-aware test block does not appear.'); $definition = \Drupal::service('plugin.manager.block')->getDefinition('test_context_aware_unsatisfied');