public function InlineEntityFormTest::testModalAutoOpenInsideInlineEntityForm in Entity Browser 8.2
Same name and namespace in other branches
- 8 tests/src/FunctionalJavascript/InlineEntityFormTest.php \Drupal\Tests\entity_browser\FunctionalJavascript\InlineEntityFormTest::testModalAutoOpenInsideInlineEntityForm()
Checks auto_open functionality for modals.
File
- tests/
src/ FunctionalJavascript/ InlineEntityFormTest.php, line 220
Class
- InlineEntityFormTest
- Test for integration of entity browser and inline entity form.
Namespace
Drupal\Tests\entity_browser\FunctionalJavascriptCode
public function testModalAutoOpenInsideInlineEntityForm() {
$this
->config('core.entity_form_display.node.ief_content.default')
->set('content.ief_media_field.third_party_settings.entity_browser_entity_form.entity_browser_id', 'ief_entity_browser_file_modal')
->save();
$this
->drupalGet('node/add/ief_content');
$page = $this
->getSession()
->getPage();
$page
->fillField('Title', 'Test IEF Title');
$page
->pressButton('Add existing Test File Media');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->getSession()
->switchToIFrame('entity_browser_iframe_ief_entity_browser_file_modal');
$this
->assertSession()
->waitForElementVisible('css', 'ief-entity-browser-file-modal-form');
$this
->assertSession()
->responseContains('Test entity browser file modal');
}