$page->
checkField('settings[handler_settings][target_bundles][type_three]'
);
$this->
assertElementExistsAfterWait('css', '[name="settings[handler_settings][target_bundles][type_three]"][checked="checked"]'
);
$page->
pressButton('Save settings'
);
$assert_session->
pageTextContains('Saved Shatner configuration.'
);
$this->
drupalGet('/admin/structure/types/manage/article/fields/node.article.field_shatner'
);
$assert_session->
checkboxNotChecked('set_default_value'
);
$page->
checkField('set_default_value'
);
$this->
assertElementExistsAfterWait('css', "#field_shatner-media-library-wrapper-default_value_input"
) ->
pressButton('Add media'
);
$this->
waitForText('Add or select media'
);
$this->
selectMediaItem(0
);
$this->
pressInsertSelected();
$page->
pressButton('Save settings'
);
$assert_session->
pageTextContains('Saved Shatner configuration.'
);
$this->
drupalGet('/admin/structure/types/manage/article/fields/node.article.field_shatner'
);
$assert_session->
checkboxChecked('set_default_value'
);
// Create a new instance of an existing field storage and assert that it
// automatically uses the media library.
$this->
drupalGet('/admin/structure/types/manage/page/fields/reuse'
);