From e1a7b35c410eed666287ea86d360adfd934f064e Mon Sep 17 00:00:00 2001 From: xjm Date: Fri, 26 Jan 2018 12:32:20 -0600 Subject: [PATCH] Issue #2938309 by tedbow, tacituseu, Wim Leers: Only install Quick Edit when necessary for Settings Tray tests --- .../src/FunctionalJavascript/SettingsTrayBlockFormTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php index 88a2f8190cd5..c677d0878a1b 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php @@ -11,6 +11,7 @@ use Drupal\settings_tray_test\Plugin\Block\SettingsTrayFormAnnotationNoneBlock; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; use Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase; use Drupal\user\Entity\Role; +use Drupal\user\RoleInterface; /** * Testing opening and saving block forms in the off-canvas dialog. @@ -36,7 +37,6 @@ class SettingsTrayBlockFormTest extends OffCanvasTestBase { 'toolbar', 'contextual', 'settings_tray', - 'quickedit', 'search', 'block_content', 'settings_tray_test', @@ -62,7 +62,6 @@ class SettingsTrayBlockFormTest extends OffCanvasTestBase { 'access contextual links', 'access toolbar', 'administer nodes', - 'access in-place editing', 'search content', ]); $this->drupalLogin($user); @@ -294,6 +293,8 @@ class SettingsTrayBlockFormTest extends OffCanvasTestBase { * Tests QuickEdit links behavior. */ public function testQuickEditLinks() { + $this->container->get('module_installer')->install(['quickedit']); + $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"]'; @@ -511,6 +512,8 @@ class SettingsTrayBlockFormTest extends OffCanvasTestBase { * "Quick edit settings" is settings_tray.module link. */ public function testCustomBlockLinks() { + $this->container->get('module_installer')->install(['quickedit']); + $this->grantPermissions(Role::load(RoleInterface::AUTHENTICATED_ID), ['access in-place editing']); $this->drupalGet('user'); $page = $this->getSession()->getPage(); $links = $page->findAll('css', "#block-custom .contextual-links li a");