public function EntityBrowserContext::switchToEBTab in Lightning Media 8
Same name and namespace in other branches
- 8.2 tests/contexts/EntityBrowserContext.behat.inc \Acquia\LightningExtension\Context\EntityBrowserContext::switchToEBTab()
Clicks on a tab with the specified text in an active entity browser and waits for it to load.
@When I switch to the :tab Entity Browser tab
Parameters
string $tab: The text of the tab to switch to.
File
- tests/
contexts/ EntityBrowserContext.behat.inc, line 95
Class
- EntityBrowserContext
- Contains step definitions for interacting with entity browser instances.
Namespace
Acquia\LightningExtension\ContextCode
public function switchToEBTab($tab) {
$this
->assertSession()
->elementExists('css', 'nav.eb-tabs')
->clickLink($tab);
// I don't see any way to assert the tab specifically has loaded. So,
// instead we just wait a reasonable amount of time.
sleep(5);
}