Merge pull request #2861 from srizzling/expand-filter-update

Expand CMS Panel Update + New Test File
This commit is contained in:
Ingo Schommer 2014-02-18 23:38:31 +13:00
commit 705c75baa5
2 changed files with 8 additions and 8 deletions

View File

@ -184,14 +184,14 @@ class CmsUiContext extends BehatContext {
* @When /^I expand the "([^"]*)" CMS Panel$/ * @When /^I expand the "([^"]*)" CMS Panel$/
*/ */
public function iExpandTheCmsPanel() { public function iExpandTheCmsPanel() {
// TODO Make dynamic, currently hardcoded to first panel //Tries to find the first visiable toggle in the page
$page = $this->getSession()->getPage(); $page = $this->getSession()->getPage();
$toggle_elements = $page->findAll('css', '.toggle-expand');
$panel_toggle_element = $page->find('css', '.cms-content > .cms-panel > .cms-panel-toggle > .toggle-expand'); assertNotNull($toggle_elements, 'Panel toggle not found');
assertNotNull($panel_toggle_element, 'Panel toggle not found'); foreach($toggle_elements as $toggle){
if($toggle->isVisible()){
if ($panel_toggle_element->isVisible()) { $toggle->click();
$panel_toggle_element->click(); }
} }
} }

Binary file not shown.