diff --git a/core/modules/views/src/Tests/Handler/AreaEntityTest.php b/core/modules/views/src/Tests/Handler/AreaEntityTest.php index bc3fe6e..aa51b40 100644 --- a/core/modules/views/src/Tests/Handler/AreaEntityTest.php +++ b/core/modules/views/src/Tests/Handler/AreaEntityTest.php @@ -125,23 +125,26 @@ public function doTestRender($entities) { $view = Views::getView('test_entity_area'); $preview = $view->preview('default', [$entities[1]->id()]); $this->setRawContent(\Drupal::service('renderer')->render($preview)); + $view_class = 'view-dom-id-' . $view->dom_id; + $header_xpath = '//div[@class = "' . $view_class . '"]/div[1]'; + $footer_xpath = '//div[@class = "' . $view_class . '"]/div[3]'; - $result = $this->xpath('//div[@class = "view-header"]'); + $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.'); $this->assertTrue(strpos(trim((string) $result[0]), 'full') !== FALSE, 'The rendered entity appeared in the right view mode.'); - $result = $this->xpath('//div[@class = "view-footer"]'); + $result = $this->xpath($footer_xpath); $this->assertTrue(strpos(trim((string) $result[0]), $entities[1]->label()) !== FALSE, 'The rendered entity appears in the footer of the view.'); $this->assertTrue(strpos(trim((string) $result[0]), 'full') !== FALSE, 'The rendered entity appeared in the right view mode.'); $preview = $view->preview('default', array($entities[1]->id())); $this->setRawContent(drupal_render($preview)); - $result = $this->xpath('//div[@class = "view-header"]'); + $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.'); $this->assertTrue(strpos(trim((string) $result[0]), 'full') !== FALSE, 'The rendered entity appeared in the right view mode.'); - $result = $this->xpath('//div[@class = "view-footer"]'); + $result = $this->xpath($footer_xpath); $this->assertTrue(strpos(trim((string) $result[0]), $entities[1]->label()) !== FALSE, 'The rendered entity appears in the footer of the view.'); $this->assertTrue(strpos(trim((string) $result[0]), 'full') !== FALSE, 'The rendered entity appeared in the right view mode.'); @@ -158,8 +161,8 @@ public function doTestRender($entities) { $preview = $view->preview('default', array($entities[1]->id())); $this->setRawContent(drupal_render($preview)); - - $result = $this->xpath('//div[@class = "view-header"]'); + $view_class = 'view-dom-id-' . $view->dom_id; + $result = $this->xpath('//div[@class = "' . $view_class . '"]/div[1]'); $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.'); @@ -167,7 +170,8 @@ public function doTestRender($entities) { $view = Views::getView('test_entity_area'); $preview = $view->preview('default', array($entities[2]->id())); $this->setRawContent(drupal_render($preview)); - $result = $this->xpath('//div[@class = "view-footer"]'); + $view_class = 'view-dom-id-' . $view->dom_id; + $result = $this->xpath('//div[@class = "' . $view_class . '"]/div[3]'); $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/Handler/AreaViewTest.php b/core/modules/views/src/Tests/Handler/AreaViewTest.php index ef7498b..aa17063 100644 --- a/core/modules/views/src/Tests/Handler/AreaViewTest.php +++ b/core/modules/views/src/Tests/Handler/AreaViewTest.php @@ -44,7 +44,7 @@ public function testViewArea() { $this->executeView($view); $output = $view->render(); $output = drupal_render($output); - $this->assertTrue(strpos($output, 'view-test-simple-argument') !== FALSE, 'The test view is correctly embedded.'); + $this->assertTrue(strpos($output, 'view-dom-id-' . $view->dom_id) !== FALSE, 'The test view is correctly embedded.'); $view->destroy(); $view->setArguments(array(27)); diff --git a/core/modules/views/templates/views-exposed-form.html.twig b/core/modules/views/templates/views-exposed-form.html.twig index f5b5fc3..3fdc576 100644 --- a/core/modules/views/templates/views-exposed-form.html.twig +++ b/core/modules/views/templates/views-exposed-form.html.twig @@ -18,6 +18,6 @@ #} {{ q }} {% endif %} -
+
{{ form }}
diff --git a/core/modules/views/templates/views-mini-pager.html.twig b/core/modules/views/templates/views-mini-pager.html.twig index e17311a..8ebfa8c 100644 --- a/core/modules/views/templates/views-mini-pager.html.twig +++ b/core/modules/views/templates/views-mini-pager.html.twig @@ -12,11 +12,11 @@ */ #} {% if items.previous or items.next %} -