function SettingsTrayTestBase::pressToolbarEditButton

Same name in other branches
  1. 9 core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php \Drupal\Tests\settings_tray\FunctionalJavascript\SettingsTrayTestBase::pressToolbarEditButton()
  2. 8.9.x core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php \Drupal\Tests\settings_tray\FunctionalJavascript\SettingsTrayTestBase::pressToolbarEditButton()
  3. 11.x core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php \Drupal\Tests\settings_tray\FunctionalJavascript\SettingsTrayTestBase::pressToolbarEditButton()

Press the toolbar Edit button provided by the contextual module.

2 calls to SettingsTrayTestBase::pressToolbarEditButton()
SettingsTrayTestBase::disableEditMode in core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php
Disables edit mode by pressing edit button in the toolbar.
SettingsTrayTestBase::enableEditMode in core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php
Enables edit mode by pressing edit button in the toolbar.

File

core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayTestBase.php, line 82

Class

SettingsTrayTestBase
Base class for Settings Tray tests.

Namespace

Drupal\Tests\settings_tray\FunctionalJavascript

Code

protected function pressToolbarEditButton() {
    $this->assertSession()
        ->waitForElement('css', '[data-contextual-id] .contextual-links a');
    $edit_button = $this->getSession()
        ->getPage()
        ->find('css', static::TOOLBAR_EDIT_LINK_SELECTOR);
    $edit_button->mouseOver();
    $edit_button->press();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.