function OptionsFieldUITest::exposeOptionMachineName

Same name in other branches
  1. 11.x core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php \Drupal\Tests\options\FunctionalJavascript\OptionsFieldUITest::exposeOptionMachineName()

Exposes the machine name input for a row.

Parameters

int $row: The row number.

1 call to OptionsFieldUITest::exposeOptionMachineName()
OptionsFieldUITest::testMachineNameSpecialCharacters in core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php
Tests `list_string` machine name with special characters.

File

core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php, line 188

Class

OptionsFieldUITest
Tests the Options field UI functionality.

Namespace

Drupal\Tests\options\FunctionalJavascript

Code

private function exposeOptionMachineName(int $row) : void {
    $index = $row - 1;
    $rows = $this->getSession()
        ->getPage()
        ->findAll('css', '#allowed-values-order tr.draggable');
    $this->assertSession()
        ->buttonExists('Edit', $rows[$index])
        ->click();
    $this->assertSession()
        ->waitForElementVisible('css', "[name='field_storage[subform][settings][allowed_values][table][{$index}][item][key]']");
}

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