protected function FieldLayoutTest::assertFieldInRegion in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php \Drupal\Tests\field_layout\FunctionalJavascript\FieldLayoutTest::assertFieldInRegion()
Asserts that a field exists in a given region.
Parameters
string $field_selector: The field selector, one of field id|name|label|value.
string $region_name: The machine name of the region.
1 call to FieldLayoutTest::assertFieldInRegion()
- FieldLayoutTest::testEntityForm in core/
modules/ field_layout/ tests/ src/ FunctionalJavascript/ FieldLayoutTest.php - Tests the use of field layout for entity form displays.
File
- core/
modules/ field_layout/ tests/ src/ FunctionalJavascript/ FieldLayoutTest.php, line 310
Class
- FieldLayoutTest
- Tests using field layout for entity displays.
Namespace
Drupal\Tests\field_layout\FunctionalJavascriptCode
protected function assertFieldInRegion($field_selector, $region_name) {
$region_element = $this
->getSession()
->getPage()
->find('css', ".layout__region--{$region_name}");
$this
->assertNotNull($region_element);
$this
->assertSession()
->fieldExists($field_selector, $region_element);
}