You are here

public function MenuBlockTitleAdminTest::testMenuBlockToggleSettingsForm in Menu block title 8

Tests that disabling the checkbox and saving the form works.

File

tests/src/Functional/MenuBlockTitleAdminTest.php, line 74

Class

MenuBlockTitleAdminTest
Confirm settings are working for an admin.

Namespace

Drupal\Tests\menu_block_title\Functional

Code

public function testMenuBlockToggleSettingsForm() {
  $this
    ->drupalGet('/admin/structure/block/manage/sidebar_nav_main');
  $this
    ->assertSession()
    ->checkboxChecked('edit-third-party-settings-menu-block-title-modify-title');
  $this
    ->getSession()
    ->getPage()
    ->uncheckField('edit-third-party-settings-menu-block-title-modify-title');
  $this
    ->getSession()
    ->getPage()
    ->pressButton('Save block');
  $this
    ->drupalGet('/admin/structure/block/manage/sidebar_nav_main');
  $this
    ->assertSession()
    ->checkboxNotChecked('edit-third-party-settings-menu-block-title-modify-title');
}