protected function BlockListElementsTest::assertBlockElementsExists in Block permissions 8
Asserts that block configuration elements exist.
Parameters
string $id: Block id.
1 call to BlockListElementsTest::assertBlockElementsExists()
- BlockListElementsTest::testBlockListPage in tests/
src/ Functional/ BlockListElementsTest.php - Tests configuration elements on the block list page.
File
- tests/
src/ Functional/ BlockListElementsTest.php, line 80
Class
- BlockListElementsTest
- Tests visibility of configuration elements on the block_admin_display_form.
Namespace
Drupal\Tests\block_permissions\FunctionalCode
protected function assertBlockElementsExists($id) {
$row = $this
->assertSession()
->elementExists('css', "tr[data-drupal-selector=\"edit-blocks-{$id}\"]");
// Configurations dropbutton exists.
$this
->assertSession()
->elementExists('css', 'ul.dropbutton', $row);
// Weight selector exists.
$this
->assertSession()
->elementExists('css', 'select.block-weight', $row);
// Region selector exists.
$this
->assertSession()
->elementExists('css', 'select.block-region-select', $row);
// Draggable element exists.
$this
->assertStringContainsString('draggable', $row
->getAttribute('class'));
}