function FieldUiTestTrait::assertFieldExistsOnOverview
Asserts that the field appears on the overview form.
Parameters
string $label: The field label.
Throws
\Behat\Mink\Exception\ElementNotFoundException
4 calls to FieldUiTestTrait::assertFieldExistsOnOverview()
- EntityReferenceAdminTest::testFieldAdminHandler in core/
modules/ field/ tests/ src/ Functional/ EntityReference/ EntityReferenceAdminTest.php - Tests the Entity Reference Admin UI.
- FieldUiJSTestTrait::fieldUIAddExistingFieldJS in core/
modules/ field_ui/ tests/ src/ Traits/ FieldUiJSTestTrait.php - Adds an existing field through the Field UI.
- FieldUiTestTrait::fieldUIAddExistingField in core/
modules/ field_ui/ tests/ src/ Traits/ FieldUiTestTrait.php - Adds an existing field through the Field UI.
- FieldUiTestTrait::fieldUIAddNewField in core/
modules/ field_ui/ tests/ src/ Traits/ FieldUiTestTrait.php - Creates a new field through the Field UI.
File
-
core/
modules/ field_ui/ tests/ src/ Traits/ FieldUiTestTrait.php, line 206
Class
- FieldUiTestTrait
- Provides common functionality for the Field UI test classes.
Namespace
Drupal\Tests\field_ui\TraitsCode
protected function assertFieldExistsOnOverview(string $label) {
$field_labels = array_map(fn($element): string => html_entity_decode($element->getHtml()), $this->getSession()
->getPage()
->findAll('css', 'table#field-overview tr td:first-child .field-label-text'));
$this->assertContains($label, $field_labels);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.