// Make sure the highlight remains when contextual links are revealed with
// the mouse.
$this->toggleContextualTriggerVisibility('.block-field-blocknodebundle-with-section-fieldbody'); $active_section = $page->find('css', '.block-field-blocknodebundle-with-section-fieldbody'); $active_section->pressButton('Open configuration options'); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.block-field-blocknodebundle-with-section-fieldbody .contextual.open'));
// @todo Remove the reload once https://www.drupal.org/node/2918718 is
// completed.
$this->getSession()->reload();
publicfunctiontestRevisionContextualLinks(){ // Confirm that the "Edit" and "Delete" contextual links appear for the
// default revision.
$this->drupalGet('node/' . $this->nodes[0]->id()); $page = $this->getSession()->getPage(); $page->waitFor(10, function D)use($page){ return$page->find('css', "main .contextual"); });
// If the body block contextual link is hidden, make it visible.
if($body_block_contextual_link_button->hasClass('visually-hidden')){ $this->toggleContextualTriggerVisibility($body_field_selector); }
// For the purposes of this test, the contextual link must be accessed with
// discrete steps instead of using ContextualLinkClickTrait.
$body_block->pressButton('Open configuration options'); $body_block->clickLink('Configure'); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '#drupal-off-canvas')); $assert_session->assertWaitOnAjaxRequest();
// After the contextual link opens the dialog, move the mouse pointer
// elsewhere on the page. If mouse up were not working correctly this would