protected function MoveBlockHelperTrait::openMoveForm in Layout Builder Restrictions 8.2
Open block for the body field.
Parameters
int $delta: The section delta where the field should be.
string $region: The region where the field should be.
string $field: The field class that should be targeted.
array $initial_blocks: The initial blocks that should be shown in the draggable table.
6 calls to MoveBlockHelperTrait::openMoveForm()
- MoveBlockBlacklistTest::testMovePluginBlock in modules/
layout_builder_restrictions_by_region/ tests/ src/ FunctionalJavascript/ MoveBlockBlacklistTest.php - Tests moving a plugin block.
- MoveBlockCategoryRestrictionTest::testMovePluginBlock in modules/
layout_builder_restrictions_by_region/ tests/ src/ FunctionalJavascript/ MoveBlockCategoryRestrictionTest.php - Tests moving a plugin block.
- MoveBlockRestrictionTest::testLayoutLibraryMovePluginBlock in tests/
src/ FunctionalJavascript/ MoveBlockRestrictionTest.php - Move a plugin block in the Layout Library.
- MoveBlockRestrictionTest::testMoveContentBlock in tests/
src/ FunctionalJavascript/ MoveBlockRestrictionTest.php - Tests moving a content block.
- MoveBlockRestrictionTest::testMovePluginBlock in tests/
src/ FunctionalJavascript/ MoveBlockRestrictionTest.php - Tests moving a plugin block.
File
- tests/
src/ Traits/ MoveBlockHelperTrait.php, line 129
Class
- MoveBlockHelperTrait
- General-purpose methods for moving blocks in Layout Builder.
Namespace
Drupal\Tests\layout_builder_restrictions\TraitsCode
protected function openMoveForm($delta, $region, $field, array $initial_blocks) {
$assert_session = $this
->assertSession();
$body_field_locator = "[data-layout-delta=\"{$delta}\"] [data-region=\"{$region}\"] ." . $field;
$this
->clickContextualLink($body_field_locator, 'Move');
$assert_session
->assertWaitOnAjaxRequest();
$this
->assertNotEmpty($assert_session
->waitForElementVisible('named', [
'select',
'Region',
]));
$assert_session
->fieldValueEquals('Region', "{$delta}:{$region}");
$this
->assertBlockTable($initial_blocks);
}