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 %} -
- {{ form }} -
+{{ form }} diff --git a/core/modules/views/templates/views-view-grouping.html.twig b/core/modules/views/templates/views-view-grouping.html.twig index 2418587..d786749 100644 --- a/core/modules/views/templates/views-view-grouping.html.twig +++ b/core/modules/views/templates/views-view-grouping.html.twig @@ -16,7 +16,5 @@ * @ingroup themeable */ #} -
-
{{ title }}
-
{{ content }}
-
+{{ title }} +{{ content }} diff --git a/core/modules/views/templates/views-view-summary.html.twig b/core/modules/views/templates/views-view-summary.html.twig index c2eaac6..45c00a4 100644 --- a/core/modules/views/templates/views-view-summary.html.twig +++ b/core/modules/views/templates/views-view-summary.html.twig @@ -20,8 +20,7 @@ * @ingroup themeable */ #} -
-
+ \ No newline at end of file diff --git a/core/modules/views/templates/views-view.html.twig b/core/modules/views/templates/views-view.html.twig index 9a661b8..6c2c947 100644 --- a/core/modules/views/templates/views-view.html.twig +++ b/core/modules/views/templates/views-view.html.twig @@ -39,55 +39,22 @@ %} {{ title_prefix }} - {% if title %} - {{ title }} - {% endif %} + {{ title }} {{ title_suffix }} - {% if header %} -
- {{ header }} -
- {% endif %} - {% if exposed %} -
- {{ exposed }} -
- {% endif %} - {% if attachment_before %} -
- {{ attachment_before }} -
- {% endif %} - {% if rows %} -
- {{ rows }} -
- {% elseif empty %} -
- {{ empty }} -
- {% endif %} + {{ header }} - {% if pager %} - {{ pager }} - {% endif %} - {% if attachment_after %} -
- {{ attachment_after }} -
- {% endif %} - {% if more %} - {{ more }} - {% endif %} - {% if footer %} -
- {{ footer }} -
- {% endif %} - {% if feed_icons %} -
- {{ feed_icons }} -
- {% endif %} + {{ exposed }} + {{ attachment_before }} + + {{ rows }} + {{ empty }} + + {{ pager }} + {{ attachment_after }} + {{ more }} + + {{ footer }} + + {{ feed_icons }}