You are here

public function JavascriptStatesTest::testJavascriptStates in Drupal 9

Same name and namespace in other branches
  1. 10 core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php \Drupal\FunctionalJavascriptTests\Core\Form\JavascriptStatesTest::testJavascriptStates()

Tests the JavaScript #states functionality of form elements.

To avoid the large cost of a dataProvider in FunctionalJavascript tests, this is a single public test method that invokes a series of protected methods to do assertions on specific kinds of triggering elements.

File

core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php, line 59

Class

JavascriptStatesTest
Tests the state of elements based on another elements.

Namespace

Drupal\FunctionalJavascriptTests\Core\Form

Code

public function testJavascriptStates() {
  $this
    ->doCheckboxTriggerTests();
  $this
    ->doCheckboxesTriggerTests();
  $this
    ->doTextfieldTriggerTests();
  $this
    ->doRadiosTriggerTests();
  $this
    ->doSelectTriggerTests();
  $this
    ->doMultipleTriggerTests();
}