function LayoutBuilderQuickEditTest::testPlaceFieldBlockFromDifferentEntityType

Same name and namespace in other branches
  1. 8.9.x core/modules/layout_builder/tests/src/Functional/LayoutBuilderQuickEditTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderQuickEditTest::testPlaceFieldBlockFromDifferentEntityType()

Tests Quick Edit integration with a block from a different entity type.

File

core/modules/quickedit/tests/src/Functional/LayoutBuilderQuickEditTest.php, line 53

Class

LayoutBuilderQuickEditTest
Tests Layout Builder integration with Quick Edit.

Namespace

Drupal\Tests\quickedit\Functional

Code

public function testPlaceFieldBlockFromDifferentEntityType() {
  $page = $this->getSession()
    ->getPage();
  $this->drupalLogin($this->drupalCreateUser([
    'configure any layout',
    'access in-place editing',
  ]));
  // 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);
}

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