function JavascriptStatesTest::testJavascriptStates

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/Core/Form/JavascriptStatesTest.php \Drupal\FunctionalJavascriptTests\Core\Form\JavascriptStatesTest::testJavascriptStates()
  2. 11.x 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 66

Class

JavascriptStatesTest
Tests the state of elements based on another elements.

Namespace

Drupal\FunctionalJavascriptTests\Core\Form

Code

public function testJavascriptStates() : void {
    $this->doCheckboxTriggerTests();
    $this->doCheckboxesTriggerTests();
    $this->doTextfieldTriggerTests();
    $this->doRadiosTriggerTests();
    $this->doSelectTriggerTests();
    $this->doMultipleSelectTriggerTests();
    $this->doMultipleTriggerTests();
    $this->doNestedTriggerTests();
    $this->doElementsDisabledStateTests();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.