public function FormTest::testMainAdminForm in Style Switcher 8.2
Same name and namespace in other branches
- 3.0.x tests/src/Functional/FormTest.php \Drupal\Tests\styleswitcher\Functional\FormTest::testMainAdminForm()
Tests the main admin form exists and functions.
File
- tests/
src/ Functional/ FormTest.php, line 46
Class
- FormTest
- Tests Style Switcher forms.
Namespace
Drupal\Tests\styleswitcher\FunctionalCode
public function testMainAdminForm() {
$assert = $this
->assertSession();
// Test the form exists.
$this
->drupalGet($this->adminPath);
$assert
->elementExists('css', 'form#styleswitcher-admin');
$assert
->checkboxChecked('enable_overlay');
// Test the form is configurable.
$edit = [
'enable_overlay' => '0',
];
$this
->submitForm($edit, 'Save configuration');
$assert
->pageTextContains('The configuration options have been saved.');
$assert
->checkboxNotChecked('enable_overlay');
}