function ClaroEntityDisplayTest::testEntityView
Same name in other branches
- 9 core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php \Drupal\FunctionalJavascriptTests\Theme\ClaroEntityDisplayTest::testEntityView()
- 10 core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php \Drupal\FunctionalJavascriptTests\Theme\ClaroEntityDisplayTest::testEntityView()
- 11.x core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php \Drupal\FunctionalJavascriptTests\Theme\ClaroEntityDisplayTest::testEntityView()
Copied from parent.
This is Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest::testEntityView() with a line changed to reflect row weight toggle being a link instead of a button.
Overrides EntityDisplayTest::testEntityView
File
-
core/
tests/ Drupal/ FunctionalJavascriptTests/ Theme/ ClaroEntityDisplayTest.php, line 70
Class
- ClaroEntityDisplayTest
- Runs EntityDisplayTest in Claro.
Namespace
Drupal\FunctionalJavascriptTests\ThemeCode
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()
->clickLink('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');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.