$assert_session->elementTextContains('css','.layout-builder__message.layout-builder__message--overrides','You are editing the layout for this Bundle with section field content item.');
$assert_session->linkNotExists('Edit the template for all Bundle with section field content items instead.');
}
/**
* Tests Layout Builder overrides without Field UI installed.
$assert_session->elementTextContains('css','.layout-builder__message.layout-builder__message--overrides','You are editing the layout for this Bundle with section field content item.');
$assert_session->linkNotExists('Edit the template for all Bundle with section field content items instead.');
}
/**
* Tests functionality of Layout Builder for overrides.
*/
publicfunctiontestOverrides(){
$assert_session=$this->assertSession();
$page=$this->getSession()->getPage();
$this->drupalLogin($this->drupalCreateUser([
'configure any layout',
'administer node display',
]));
// From the manage display page, go to manage the layout.
$assert_session->elementTextContains('css','.layout-builder__message.layout-builder__message--overrides','You are editing the layout for this Bundle with section field content item. Edit the template for all Bundle with section field content items instead.');
$assert_session->linkExists('Edit the template for all Bundle with section field content items instead.');
$page->clickLink('Add block');
$page->clickLink('Powered by Drupal');
$page->fillField('settings[label]','This is an override');
$page->checkField('settings[label_display]');
$page->pressButton('Add block');
$page->pressButton('Save layout');
$assert_session->pageTextContains('This is an override');
$assert_session->elementTextContains('css','.layout-builder__message.layout-builder__message--overrides','You are editing the layout for this Bundle with section field content item.');
$assert_session->linkNotExists('Edit the template for all Bundle with section field content items instead.');
}
/**
* Tests Layout Builder overrides without Field UI installed.
$assert_session->elementTextContains('css','.layout-builder__message.layout-builder__message--overrides','You are editing the layout for this Bundle with section field content item.');
$assert_session->linkNotExists('Edit the template for all Bundle with section field content items instead.');
}
/**
* Tests functionality of Layout Builder for overrides.
*/
publicfunctiontestOverrides(){
$assert_session=$this->assertSession();
$page=$this->getSession()->getPage();
$this->drupalLogin($this->drupalCreateUser([
'configure any layout',
'administer node display',
]));
// From the manage display page, go to manage the layout.
$assert_session->elementTextContains('css','.layout-builder__message.layout-builder__message--overrides','You are editing the layout for this Bundle with section field content item. Edit the template for all Bundle with section field content items instead.');
$assert_session->linkExists('Edit the template for all Bundle with section field content items instead.');
$page->clickLink('Add block');
$page->clickLink('Powered by Drupal');
$page->fillField('settings[label]','This is an override');
$page->checkField('settings[label_display]');
$page->pressButton('Add block');
$page->pressButton('Save layout');
$assert_session->pageTextContains('This is an override');