diff --git a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php index 7fa9d04d6d8662a3607ce097bcf7b40d915137cd..8febc85c5f78e518e2d3a1875723e5a6e89f5568 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php @@ -64,6 +64,12 @@ public function testBasicPagination() { $page = $this->getSession()->getPage(); + $settings = $this->getDrupalSettings(); + + // Make sure the the view_path is set correctly. + $expected_view_path = '/test-content-ajax'; + $this->assertEquals($expected_view_path, current($settings['views']['ajaxViews'])['view_path']); + // Set the number of items displayed per page to 5 using the exposed pager. $page->selectFieldOption('edit-items-per-page', 5); $page->pressButton('Filter'); @@ -117,6 +123,10 @@ public function testBasicPagination() { $rows = $page->findAll('css', 'tbody tr'); $this->assertCount(1, $rows); $this->assertContains('Node 11 content', $rows[0]->getHtml()); + + // Make sure the AJAX calls don't change the view_path. + $settings = $this->getDrupalSettings(); + $this->assertEquals($expected_view_path, current($settings['views']['ajaxViews'])['view_path']); } /**