public function ClaroEntityDisplayTest::testExtraFields in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php \Drupal\FunctionalJavascriptTests\Theme\ClaroEntityDisplayTest::testExtraFields()
- 9 core/tests/Drupal/FunctionalJavascriptTests/Theme/ClaroEntityDisplayTest.php \Drupal\FunctionalJavascriptTests\Theme\ClaroEntityDisplayTest::testExtraFields()
Copied from parent.
This is Drupal\Tests\field_ui\FunctionalJavascript\EntityDisplayTest::testExtraFields() with a line changed to reflect Claro's tabledrag selector.
File
- core/
tests/ Drupal/ FunctionalJavascriptTests/ Theme/ ClaroEntityDisplayTest.php, line 98
Class
- ClaroEntityDisplayTest
- Runs EntityDisplayTest in Claro.
Namespace
Drupal\FunctionalJavascriptTests\ThemeCode
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', '.js-tabledrag-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.');
}