public function PanelizerContext::placeBlock in Lightning Layout 8
Places a block into a Panelizer layout via the wizard.
@When I place the :label block into the :region panelizer region
Parameters
string $label: The text name of the block.
string $region: The name of the region in which to place the block.
File
- tests/
contexts/ PanelizerContext.behat.inc, line 23
Class
Namespace
Acquia\LightningExtension\ContextCode
public function placeBlock($label, $region) {
$assert = $this
->assertSession();
$assert
->elementExists('named', [
'link',
'Add new block',
])
->click();
$this
->awaitAjax();
$assert
->elementExists('named', [
'link',
$label,
])
->click();
$this
->awaitAjax();
$this
->getSession()
->getPage()
->selectFieldOption('region', $region);
$this
->awaitAjax();
$assert
->elementExists('named', [
'button',
'Add block',
])
->press();
$this
->awaitAjax();
$this
->assertBlock($label, $region);
}