public function EntityDisplayTest::testEntityView in Drupal 9
Same name in this branch
- 9 core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php \Drupal\Tests\field_ui\Functional\EntityDisplayTest::testEntityView()
- 9 core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php \Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest::testEntityView()
Same name and namespace in other branches
- 8 core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php \Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest::testEntityView()
Tests the use of regions for entity view displays.
1 method overrides EntityDisplayTest::testEntityView()
- ClaroEntityDisplayTest::testEntityView in core/
tests/ Drupal/ FunctionalJavascriptTests/ Theme/ ClaroEntityDisplayTest.php - Copied from parent.
File
- core/
modules/ field_ui/ tests/ src/ FunctionalJavascript/ EntityDisplayTest.php, line 75
Class
- EntityDisplayTest
- Tests the UI for entity displays.
Namespace
Drupal\Tests\field_ui\FunctionalJavascriptCode
public function testEntityView() {
$this
->drupalGet('entity_test/1');
$this
->assertSession()
->elementNotExists('css', '.field--name-field-test-text');
$this
->drupalGet('entity_test/structure/entity_test/display');
$this
->assertSession()
->elementExists('css', '.region-content-message.region-empty');
$this
->getSession()
->getPage()
->pressButton('Show row weights');
$this
->assertSession()
->waitForElementVisible('css', '[name="fields[field_test_text][region]"]');
$this
->assertTrue($this
->assertSession()
->optionExists('fields[field_test_text][region]', 'hidden')
->isSelected());
$this
->getSession()
->getPage()
->selectFieldOption('fields[field_test_text][region]', 'content');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->assertTrue($this
->assertSession()
->optionExists('fields[field_test_text][region]', 'content')
->isSelected());
$this
->submitForm([], 'Save');
$this
->assertSession()
->pageTextContains('Your settings have been saved.');
$this
->assertTrue($this
->assertSession()
->optionExists('fields[field_test_text][region]', 'content')
->isSelected());
$this
->drupalGet('entity_test/1');
$this
->assertSession()
->elementExists('css', '.field--name-field-test-text');
}