function EntityDisplayTest::testExtraFields
Same name in other branches
- 8.9.x core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php \Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest::testExtraFields()
- 10 core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php \Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest::testExtraFields()
- 11.x core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php \Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest::testExtraFields()
Tests extra fields.
1 method overrides EntityDisplayTest::testExtraFields()
- ClaroEntityDisplayTest::testExtraFields in core/
tests/ Drupal/ FunctionalJavascriptTests/ Theme/ ClaroEntityDisplayTest.php - Copied from parent.
File
-
core/
modules/ field_ui/ tests/ src/ FunctionalJavascript/ EntityDisplayTest.php, line 100
Class
- EntityDisplayTest
- Tests the UI for entity displays.
Namespace
Drupal\Tests\field_ui\FunctionalJavascriptCode
public function testExtraFields() {
entity_test_create_bundle('bundle_with_extra_fields');
$this->drupalGet('entity_test/structure/bundle_with_extra_fields/display');
$this->assertSession()
->waitForElement('css', '.tabledrag-handle');
$id = $this->getSession()
->getPage()
->find('css', '[name="form_build_id"]')
->getValue();
$extra_field_row = $this->getSession()
->getPage()
->find('css', '#display-extra-field');
$disabled_region_row = $this->getSession()
->getPage()
->find('css', '.region-hidden-title');
$extra_field_row->find('css', '.handle')
->dragTo($disabled_region_row);
$this->assertSession()
->assertWaitOnAjaxRequest();
$this->assertSession()
->waitForElement('css', "[name='form_build_id']:not([value='{$id}'])");
$this->submitForm([], 'Save');
$this->assertSession()
->pageTextContains('Your settings have been saved.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.