public function ConfigPageTest::testRequireOnPublishDisable in Require on Publish 8
Test that the 'Required on Publish' field can be succesfully disabled.
File
- tests/
src/ FunctionalJavascript/ ConfigPageTest.php, line 133
Class
- ConfigPageTest
- Tests the 'Require on Publish' functionality on field config pages.
Namespace
Drupal\Tests\require_on_publish\FunctionalJavascriptCode
public function testRequireOnPublishDisable() {
$this
->logIn();
// Unset 'Required on Publish'.
$this
->getSession()
->getPage()
->fillField('require_on_publish', 0);
// Save the form.
$this
->getSession()
->getPage()
->pressButton('Save settings');
// Ensure that 'Required on Publish' is false.
$required = $this
->getSession()
->getPage()
->findField('require_on_publish')
->getValue();
$this
->assertEquals(0, $required);
}