diff --git a/core/modules/views/src/Tests/Handler/AreaEntityTest.php b/core/modules/views/src/Tests/Handler/AreaEntityTest.php index 28d867f..553432e 100644 --- a/core/modules/views/src/Tests/Handler/AreaEntityTest.php +++ b/core/modules/views/src/Tests/Handler/AreaEntityTest.php @@ -126,8 +126,8 @@ public function doTestRender($entities) { $preview = $view->preview('default', [$entities[1]->id()]); $this->setRawContent(\Drupal::service('renderer')->render($preview)); $view_class = 'js-view-dom-id-' . $view->dom_id; - $header_xpath = '//div[@class = "' . $view_class . '"]/div[1]'; - $footer_xpath = '//div[@class = "' . $view_class . '"]/div[3]'; + $header_xpath = '//div[@class = "' . $view_class . '"]/child::*[position()=1]/div/div'; + $footer_xpath = '//div[@class = "' . $view_class . '"]/child::*[position()=last()]/div/div'; $result = $this->xpath($header_xpath); $this->assertTrue(strpos(trim((string) $result[0]), $entities[0]->label()) !== FALSE, 'The rendered entity appears in the header of the view.'); @@ -162,7 +162,7 @@ public function doTestRender($entities) { $preview = $view->preview('default', array($entities[1]->id())); $this->setRawContent(drupal_render($preview)); $view_class = 'js-view-dom-id-' . $view->dom_id; - $result = $this->xpath('//div[@class = "' . $view_class . '"]/div[1]'); + $result = $this->xpath('//div[@class = "' . $view_class . '"]/child::*[position()=1]/div/div'); $this->assertTrue(strpos(trim((string) $result[0]), $entities[0]->label()) !== FALSE, 'The rendered entity appears in the header of the view.'); $this->assertTrue(strpos(trim((string) $result[0]), 'test') !== FALSE, 'The rendered entity appeared in the right view mode.'); @@ -171,7 +171,7 @@ public function doTestRender($entities) { $preview = $view->preview('default', array($entities[2]->id())); $this->setRawContent(drupal_render($preview)); $view_class = 'js-view-dom-id-' . $view->dom_id; - $result = $this->xpath('//div[@class = "' . $view_class . '"]/div[3]'); + $result = $this->xpath('//div[@class = "' . $view_class . '"]/child::*[position()=last()]'); $this->assertTrue(strpos($result[0], $entities[2]->label()) === FALSE, 'The rendered entity does not appear in the footer of the view.'); // Test the available view mode options. diff --git a/core/modules/views/src/Tests/Plugin/StyleMappingTest.php b/core/modules/views/src/Tests/Plugin/StyleMappingTest.php index 24b06d2..06dfc6b 100644 --- a/core/modules/views/src/Tests/Plugin/StyleMappingTest.php +++ b/core/modules/views/src/Tests/Plugin/StyleMappingTest.php @@ -53,7 +53,7 @@ protected function mappedOutputHelper($view) { $output = $view->preview(); $rendered_output = drupal_render($output); $this->storeViewPreview($rendered_output); - $rows = $this->elements->body->div->div->div; + $rows = $this->elements->body->div->div; $data_set = $this->dataSet(); $count = 0; diff --git a/core/modules/views/src/Tests/Plugin/StyleUnformattedTest.php b/core/modules/views/src/Tests/Plugin/StyleUnformattedTest.php index 0835d98..c7bebb1 100644 --- a/core/modules/views/src/Tests/Plugin/StyleUnformattedTest.php +++ b/core/modules/views/src/Tests/Plugin/StyleUnformattedTest.php @@ -31,8 +31,7 @@ function testDefaultRowClasses() { $view->setDisplay(); $output = $view->preview(); $this->storeViewPreview(drupal_render($output)); - - $rows = $this->elements->body->div->div->div; + $rows = $this->elements->body->div->div; $count = 0; $count_result = count($view->result); foreach ($rows as $row) { diff --git a/core/modules/views/templates/views-exposed-form.html.twig b/core/modules/views/templates/views-exposed-form.html.twig index 3fdc576..f8a180e 100644 --- a/core/modules/views/templates/views-exposed-form.html.twig +++ b/core/modules/views/templates/views-exposed-form.html.twig @@ -18,6 +18,4 @@ #} {{ q }} {% endif %} -