Unverified Commit 3a3a0392 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2866386 by Lendude, dawehner, ckaotik, mbovan, Berdir, dmsmidt,...

Issue #2866386 by Lendude, dawehner, ckaotik, mbovan, Berdir, dmsmidt, neclimdul: Assert the view path is set correctly after second ajax request
parent d7ab8310
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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']);
  }

  /**