diff --git a/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php index 10e74faaf1..b4444eff2b 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/QuickEditImageTest.php @@ -52,6 +52,8 @@ protected function setUp() { } /** + * Test that quick editor works correctly with images. + * * @covers ::isCompatible * @covers ::getAttachments */ diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php index 57b4074b7c..bb6cef5877 100644 --- a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php +++ b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php @@ -21,7 +21,14 @@ class QuickEditIntegrationTest extends QuickEditJavascriptTestBase { /** * {@inheritdoc} */ - public static $modules = ['node', 'editor', 'ckeditor', 'taxonomy', 'block', 'block_content', 'settings_tray_test_css']; + public static $modules = [ + 'node', + 'editor', + 'ckeditor', + 'taxonomy', + 'block', + 'block_content', + ]; /** * A user with permissions to edit Articles and use Quick Edit. @@ -74,15 +81,18 @@ protected function setUp() { $this->createEntityReferenceField('node', 'article', $field_name, 'Tags', 'taxonomy_term', 'default', $handler_settings, FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); // Add formatter & widget for "tags" field. - entity_get_form_display('node', 'article', 'default') - ->setComponent($field_name, [ - 'type' => 'entity_reference_autocomplete_tags', - ]) + \Drupal::entityTypeManager() + ->getStorage('entity_form_display') + ->load('node.article.default') + ->setComponent($field_name, ['type' => 'entity_reference_autocomplete_tags']) ->save(); - entity_get_display('node', 'article', 'default') + \Drupal::entityTypeManager() + ->getStorage('entity_view_display') + ->load('node.article.default') ->setComponent($field_name, ['type' => 'entity_reference_label']) ->save(); + $this->drupalPlaceBlock('page_title_block'); $this->drupalPlaceBlock('system_main_block'); // Log in as a content author who can use Quick Edit and edit Articles. @@ -122,7 +132,7 @@ public function testArticleNode() { ], 'field_tags' => [ ['target_id' => $term->id()], - ] + ], ]); $this->drupalGet('node/' . $node->id()); @@ -273,7 +283,7 @@ public function testCustomBlock() { $block_content_type = BlockContentType::create([ 'id' => 'basic', 'label' => 'basic', - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); block_content_add_body_field($block_content_type->id()); diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php index 8b905ef6f2..e5925970ac 100644 --- a/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php +++ b/core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php @@ -34,11 +34,11 @@ class QuickEditJavascriptTestBase extends JavascriptTestBase { /** * Starts in-place editing of the given entity instance. * - * @param $entity_type_id + * @param string $entity_type_id * The entity type ID. - * @param $entity_id + * @param int $entity_id * The entity ID. - * @param $entity_instance_id + * @param int $entity_instance_id * The entity instance ID. (Instance on the page.) */ protected function startQuickEditViaToolbar($entity_type_id, $entity_id, $entity_instance_id) { @@ -114,9 +114,9 @@ protected function saveQuickEdit() { /** * Awaits Quick Edit to be initiated for all instances of the given entity. * - * @param $entity_type_id + * @param string $entity_type_id * The entity type ID. - * @param $entity_id + * @param int $entity_id * The entity ID. */ protected function awaitQuickEditForEntity($entity_type_id, $entity_id) { @@ -130,9 +130,9 @@ protected function awaitQuickEditForEntity($entity_type_id, $entity_id) { * * @param string $entity_type_id * The entity type ID. - * @param string $entity_id + * @param int $entity_id * The entity ID. - * @param string $entity_instance_id + * @param int $entity_instance_id * The entity instance ID. (Instance on the page.) * @param string $field_name * The field name. @@ -177,11 +177,11 @@ protected function assertQuickEditEntityToolbar($expected_entity_label, $expecte /** * Asserts all EntityModels (entity instances) on the page. * - * @see Drupal.quickedit.EntityModel - * * @param array $expected_entity_states * Must describe the expected state of all in-place editable entity * instances on the page. + * + * @see Drupal.quickedit.EntityModel */ protected function assertEntityInstanceStates(array $expected_entity_states) { $js_get_all_field_states_for_entity = <<