You are here

public function JSInteractionTest::testFieldValueNotSettable in Drupal 10

Assert an exception is thrown when the field is never enabled.

File

core/tests/Drupal/FunctionalJavascriptTests/Tests/JSInteractionTest.php, line 39

Class

JSInteractionTest
Tests fault tolerant interactions.

Namespace

Drupal\FunctionalJavascriptTests\Tests

Code

public function testFieldValueNotSettable() {
  $this
    ->expectException(Exception::class);
  $this
    ->drupalGet('/js_interaction_test');
  $this
    ->assertSession()
    ->fieldExists('target_field')
    ->setValue('Test');
}