$this->
placeBlock('system_branding_block',
[ 'id' => 'branding',
]);
} /**
* Tests the visibility of contextual links.
*/
public function testContextualLinksVisibility() { $this->
drupalGet('user'
);
$contextualLinks =
$this->
assertSession()->
waitForElement('css', '.contextual button'
);
$this->
assertEmpty($contextualLinks);
// Ensure visibility remains correct after cached paged load.
$this->
drupalGet('user'
);
$contextualLinks =
$this->
assertSession()->
waitForElement('css', '.contextual button'
);
$this->
assertEmpty($contextualLinks);
// Grant permissions to use contextual links on blocks.
$this->
grantPermissions(Role::
load(Role::AUTHENTICATED_ID
),
[ 'access contextual links',
'administer blocks',
]);