You are here

protected function LayoutBuilderQuickEditTest::enableLayouts in Drupal 10

Same name and namespace in other branches
  1. 9 core/modules/quickedit/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php \Drupal\Tests\quickedit\FunctionalJavascript\LayoutBuilderQuickEditTest::enableLayouts()

Enables layouts at an admin path.

Parameters

string $path: The manage display path.

File

core/modules/quickedit/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php, line 203

Class

LayoutBuilderQuickEditTest
Tests that Layout Builder functions with Quick Edit.

Namespace

Drupal\Tests\quickedit\FunctionalJavascript

Code

protected function enableLayouts($path) {

  // Save the current user to re-login after Layout Builder changes.
  $user = $this->loggedInUser;
  $this
    ->loginLayoutAdmin();
  $page = $this
    ->getSession()
    ->getPage();
  $this
    ->drupalGet($path);
  $page
    ->checkField('layout[enabled]');
  $page
    ->checkField('layout[allow_custom]');
  $page
    ->pressButton('Save');
  $this
    ->drupalLogin($user);
}