Commit e1a7b35c authored by xjm's avatar xjm
Browse files

Issue #2938309 by tedbow, tacituseu, Wim Leers: Only install Quick Edit when...

Issue #2938309 by tedbow, tacituseu, Wim Leers: Only install Quick Edit when necessary for Settings Tray tests
parent 6f8bc7b1
......@@ -11,6 +11,7 @@
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 @@ protected function setUp() {
'access contextual links',
'access toolbar',
'administer nodes',
'access in-place editing',
'search content',
]);
$this->drupalLogin($user);
......@@ -294,6 +293,8 @@ protected function openBlockForm($block_selector, $contextual_link_container = '
* 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 @@ protected function createBlockContentType($label, $create_body = FALSE) {
* "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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment