public function PanelsIPEContext::openCategory in Lightning Layout 8
Opens a particular block category of the "Manage Content" tab.
@When I open the :category category
Parameters
string $category: The category to open.
Return value
\Behat\Mink\Element\NodeElement The tab contents.
1 call to PanelsIPEContext::openCategory()
- PanelsIPEContext::assertPlugin in tests/
contexts/ PanelsIPEContext.behat.inc - Asserts that a particular block plugin is available.
File
- tests/
contexts/ PanelsIPEContext.behat.inc, line 79
Class
- PanelsIPEContext
- Contains step definitions for interacting with Panels IPE.
Namespace
Acquia\LightningExtension\ContextCode
public function openCategory($category) {
$tab = $this
->openTab('Manage Content');
// Assert that the category exists...
$link = $this
->assertSession()
->elementExists('css', '.ipe-category[data-category="' . $category . '"]', $tab);
// ...but only open it if not already active.
if ($link
->hasClass('active') == FALSE) {
$link
->click();
$this
->awaitAjax();
}
return $tab;
}