public function ModerationContext::openModerationSidebar in Lightning Workflow 8.3
Opens the moderation sidebar.
@When I open the moderation sidebar
Throws
\Behat\Mink\Exception\ElementNotFoundException If the moderation sidebar does not appear on the page.
File
- tests/
contexts/ ModerationContext.behat.inc, line 39
Class
- ModerationContext
- Contains miscellaneous step definitions for testing moderation UIs.
Namespace
Acquia\LightningExtension\ContextCode
public function openModerationSidebar() {
$this
->assertSession()
->elementExists('css', '#toolbar-bar')
->clickLink('Tasks');
$session = $this
->getSession();
$sidebar = $session
->getPage()
->waitFor(10, function (DocumentElement $page) {
return $page
->find('css', '.moderation-sidebar-container');
});
if (empty($sidebar)) {
throw new ElementNotFoundException($session
->getDriver(), 'element', 'css', '.moderation-sidebar-container');
}
}