public function LayoutBuilderQuickEditTest::testPlaceFieldBlockFromDifferentEntityType in Drupal 9
Tests Quick Edit integration with a block from a different entity type.
File
- core/
modules/ quickedit/ tests/ src/ Functional/ LayoutBuilderQuickEditTest.php, line 47
Class
- LayoutBuilderQuickEditTest
- Tests Layout Builder integration with Quick Edit.
Namespace
Drupal\Tests\quickedit\FunctionalCode
public function testPlaceFieldBlockFromDifferentEntityType() {
$page = $this
->getSession()
->getPage();
$this
->drupalLogin($this
->drupalCreateUser([
'configure any layout',
'administer node display',
'access in-place editing',
]));
// From the manage display page, go to manage the layout.
$this
->drupalGet('admin/structure/types/manage/bundle_with_section_field/display/default');
$this
->submitForm([
'layout[enabled]' => TRUE,
], 'Save');
$this
->submitForm([
'layout[allow_custom]' => TRUE,
], 'Save');
// Place a field block for a user entity field.
$this
->drupalGet('node/1/layout');
$page
->clickLink('Add block');
$page
->clickLink('Name');
$page
->pressButton('Add block');
$page
->pressButton('Save layout');
$this
->drupalGet('node/1');
$this
->assertSession()
->statusCodeEquals(200);
}