diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php index 7475dab64a..2255564210 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php @@ -294,10 +294,12 @@ protected function openBlockForm($block_selector, $contextual_link_container = ' */ public function testQuickEditLinks() { $this->container->get('module_installer')->install(['quickedit']); + $this->container->get('module_installer')->uninstall(['settings_tray_test_css']); $this->grantPermissions(Role::load(RoleInterface::AUTHENTICATED_ID), ['access in-place editing']); $quick_edit_selector = '#quickedit-entity-toolbar'; $node_selector = '[data-quickedit-entity-id="node/1"]'; $body_selector = '[data-quickedit-field-id="node/1/body/en/full"]'; + $user_input_selector = 'input[name="uid[0][target_id]"]'; $web_assert = $this->assertSession(); // Create a Content type and two test nodes. $this->createContentType(['type' => 'page']); @@ -305,7 +307,10 @@ public function testQuickEditLinks() { $this->grantPermissions($auth_role, [ 'edit any page content', 'access content', + 'access user profiles', ]); + + $author = $this->createUser(); $node = $this->createNode( [ 'title' => 'Page One', @@ -337,6 +342,10 @@ public function testQuickEditLinks() { // In Edit mode clicking field should open QuickEdit toolbar. $page->find('css', $body_selector)->click(); $this->assertElementVisibleAfterWait('css', $quick_edit_selector); + $this->getSession()->executeScript("jQuery('[data-quickedit-field-id=\"node/" . $node->id() . "/uid/en/full\"]').click()"); + $this->assertElementVisibleAfterWait('css', $user_input_selector); + $this->getSession()->executeScript("jQuery('$user_input_selector').click()"); + $this->getSession()->evaluateScript("jQuery('$user_input_selector').is(':focus')"); $this->disableEditMode(); // Exiting Edit mode should close QuickEdit toolbar.