You are here

public function ConfigPageTest::testWarningToggleDisable in Require on Publish 8

Test that the warning toggle can be disabled.

File

tests/src/FunctionalJavascript/ConfigPageTest.php, line 171

Class

ConfigPageTest
Tests the 'Require on Publish' functionality on field config pages.

Namespace

Drupal\Tests\require_on_publish\FunctionalJavascript

Code

public function testWarningToggleDisable() {
  $this
    ->logIn();
  $this
    ->getSession()
    ->getPage()
    ->fillField('require_on_publish', 1);
  $this
    ->getSession()
    ->getPage()
    ->fillField('warn_on_empty', 0);
  $this
    ->getSession()
    ->getPage()
    ->pressButton('Save settings');
  $warning = $this
    ->getSession()
    ->getPage()
    ->findField('warn_on_empty')
    ->getValue();
  $this
    ->assertEquals($warning, 0);
}