You are here

protected function LayoutBuilderQuickEditTest::enableLayouts in Drupal 8

Enables layouts at an admin path.

Parameters

string $path: The manage display path.

2 calls to LayoutBuilderQuickEditTest::enableLayouts()
LayoutBuilderQuickEditTest::testEnableDisableLayoutBuilder in core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php
Tests Quick Edit boots correctly with Layout Builder defaults & overrides.
LayoutBuilderQuickEditTest::testQuickEditIgnoresDuplicateFields in core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php
Tests that Quick Edit still works even when there are duplicate fields.

File

core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderQuickEditTest.php, line 183

Class

LayoutBuilderQuickEditTest
Tests that Layout Builder functions with Quick Edit.

Namespace

Drupal\Tests\layout_builder\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);
}