assertCorrectContextualLinksInNode example

// Ensure the contextual links are correct before the layout is saved.     $this->assertCorrectContextualLinksInUi();

    // Ensure the contextual links are correct when the Layout Builder is loaded     // after being saved.     $page->hasButton('Save layout');
    $page->pressButton('Save layout');
    $this->drupalGet('node/1/layout');
    $this->assertCorrectContextualLinksInUi();

    $this->drupalGet('node/1');
    $this->assertCorrectContextualLinksInNode();
  }

  /** * Adds block to the layout via Layout Builder's UI. * * @param string $block_name * The block name as it appears in the Add block form. */
  protected function addBlock($block_name) {
    $assert_session = $this->assertSession();
    $page = $this->getSession()->getPage();

    
Home | Imprint | This part of the site doesn't use cookies.