diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php index 361bade5f8..1d770e6170 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php @@ -77,6 +77,12 @@ public function testBlockContentCreation() { '%value' => $edit['info[0][value]'], ])); $this->assertResponse(200); + + // Test user with specific create permission has access to add that type + // via the UI. + $this->drupalLogin($this->drupalCreateUser(['create basic block content'])); + $this->drupalGet('block/add/basic'); + $this->assertSession()->statusCodeEquals(200); } /** diff --git a/core/modules/block_content/tests/src/Functional/PageEditTest.php b/core/modules/block_content/tests/src/Functional/PageEditTest.php index e751c70b09..ff8e122241 100644 --- a/core/modules/block_content/tests/src/Functional/PageEditTest.php +++ b/core/modules/block_content/tests/src/Functional/PageEditTest.php @@ -48,6 +48,9 @@ public function testPageEdit() { // Stay on the current page, without reloading. $this->drupalPostForm(NULL, $edit, t('Save')); + // Login as a user with specific edit permissions. + $this->drupalLogin($this->drupalCreateUser(['edit any basic block content'])); + // Edit the same block, creating a new revision. $this->drupalGet("block/" . $block->id()); $edit = [];