You are here

protected function LayoutBuilderRestrictionsTestBase::setUp in Layout Builder Restrictions 8.2

Overrides BrowserTestBase::setUp

7 calls to LayoutBuilderRestrictionsTestBase::setUp()
BlockPlacementBlacklistTest::setUp in modules/layout_builder_restrictions_by_region/tests/src/FunctionalJavascript/BlockPlacementBlacklistTest.php
BlockPlacementWhitelistTest::setUp in modules/layout_builder_restrictions_by_region/tests/src/FunctionalJavascript/BlockPlacementWhitelistTest.php
DashboardsIntegrationTest::setUp in tests/src/FunctionalJavascript/DashboardsIntegrationTest.php
LanguageCategoriesTest::setUp in tests/src/FunctionalJavascript/LanguageCategoriesTest.php
LayoutLibraryIntegrationTest::setUp in tests/src/FunctionalJavascript/LayoutLibraryIntegrationTest.php

... See full list

7 methods override LayoutBuilderRestrictionsTestBase::setUp()
BlockPlacementBlacklistTest::setUp in modules/layout_builder_restrictions_by_region/tests/src/FunctionalJavascript/BlockPlacementBlacklistTest.php
BlockPlacementWhitelistTest::setUp in modules/layout_builder_restrictions_by_region/tests/src/FunctionalJavascript/BlockPlacementWhitelistTest.php
DashboardsIntegrationTest::setUp in tests/src/FunctionalJavascript/DashboardsIntegrationTest.php
LanguageCategoriesTest::setUp in tests/src/FunctionalJavascript/LanguageCategoriesTest.php
LayoutLibraryIntegrationTest::setUp in tests/src/FunctionalJavascript/LayoutLibraryIntegrationTest.php

... See full list

File

tests/src/FunctionalJavascript/LayoutBuilderRestrictionsTestBase.php, line 17

Class

LayoutBuilderRestrictionsTestBase
General-purpose methods for testing restrictions.

Namespace

Drupal\Tests\layout_builder_restrictions\FunctionalJavascript

Code

protected function setUp() : void {
  parent::setUp();

  // Create a node bundle.
  $this
    ->createContentType([
    'type' => 'bundle_with_section_field',
  ]);
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'access administration pages',
    'administer blocks',
    'administer node display',
    'administer node fields',
    'configure any layout',
    'create and edit custom blocks',
  ]));
  $this
    ->getSession()
    ->resizeWindow(1200, 4000);
  $assert_session = $this
    ->assertSession();
  $page = $this
    ->getSession()
    ->getPage();

  // From the manage display page, go to manage the layout.
  $this
    ->navigateToManageDisplay();

  // Checking is_enable will show allow_custom.
  $page
    ->checkField('layout[enabled]');
  $page
    ->checkField('layout[allow_custom]');
  $page
    ->pressButton('Save');
}