mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2861 from srizzling/expand-filter-update
Expand CMS Panel Update + New Test File
This commit is contained in:
commit
705c75baa5
@ -184,14 +184,14 @@ class CmsUiContext extends BehatContext {
|
||||
* @When /^I expand the "([^"]*)" CMS Panel$/
|
||||
*/
|
||||
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();
|
||||
|
||||
$panel_toggle_element = $page->find('css', '.cms-content > .cms-panel > .cms-panel-toggle > .toggle-expand');
|
||||
assertNotNull($panel_toggle_element, 'Panel toggle not found');
|
||||
|
||||
if ($panel_toggle_element->isVisible()) {
|
||||
$panel_toggle_element->click();
|
||||
$toggle_elements = $page->findAll('css', '.toggle-expand');
|
||||
assertNotNull($toggle_elements, 'Panel toggle not found');
|
||||
foreach($toggle_elements as $toggle){
|
||||
if($toggle->isVisible()){
|
||||
$toggle->click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
tests/behat/features/files/document.pdf
Normal file
BIN
tests/behat/features/files/document.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user