assertPageNotReloaded example

$page->fillField('settings[label]', 'This is the label');
    $page->checkField('settings[label_display]');

    // Save the new block, and ensure it is displayed on the page.     $page->pressButton('Add block');
    $assert_session->assertWaitOnAjaxRequest();
    $assert_session->assertNoElementAfterWait('css', '#drupal-off-canvas');
    $assert_session->addressEquals($layout_url);
    $assert_session->pageTextContains('Powered by Drupal');
    $assert_session->pageTextContains('This is the label');
    $this->assertPageNotReloaded();

    // Until the layout is saved, the new block is not visible on the node page.     $this->drupalGet($node_url);
    $assert_session->pageTextNotContains('Powered by Drupal');

    // When returning to the layout edit mode, the new block is visible.     $this->drupalGet($layout_url);
    $assert_session->pageTextContains('Powered by Drupal');

    // Save the layout, and the new block is visible.     $page->pressButton('Save layout');
    
Home | Imprint | This part of the site doesn't use cookies.