Merge remote-tracking branch 'origin/3.0' into 3.1

This commit is contained in:
Ingo Schommer 2013-09-30 23:44:12 +02:00
commit 21c226a5d2

View File

@ -74,7 +74,10 @@ class CmsUiContext extends BehatContext
protected function getCmsTabsElement() protected function getCmsTabsElement()
{ {
$this->getSession()->wait(5000, "window.jQuery('.cms-content-header-tabs').size() > 0"); $this->getSession()->wait(
5000,
"window.jQuery && window.jQuery('.cms-content-header-tabs').size() > 0"
);
$page = $this->getSession()->getPage(); $page = $this->getSession()->getPage();
$cms_content_header_tabs = $page->find('css', '.cms-content-header-tabs'); $cms_content_header_tabs = $page->find('css', '.cms-content-header-tabs');
@ -87,7 +90,7 @@ class CmsUiContext extends BehatContext
{ {
$this->getSession()->wait( $this->getSession()->wait(
5000, 5000,
"window.jQuery('.cms-content-toolbar').size() > 0 " "window.jQuery && window.jQuery('.cms-content-toolbar').size() > 0 "
. "&& window.jQuery('.cms-content-toolbar').children().size() > 0" . "&& window.jQuery('.cms-content-toolbar').children().size() > 0"
); );
@ -100,7 +103,10 @@ class CmsUiContext extends BehatContext
protected function getCmsTreeElement() protected function getCmsTreeElement()
{ {
$this->getSession()->wait(5000, "window.jQuery('.cms-tree').size() > 0"); $this->getSession()->wait(
5000,
"window.jQuery && window.jQuery('.cms-tree').size() > 0"
);
$page = $this->getSession()->getPage(); $page = $this->getSession()->getPage();
$cms_tree_element = $page->find('css', '.cms-tree'); $cms_tree_element = $page->find('css', '.cms-tree');
@ -193,7 +199,10 @@ class CmsUiContext extends BehatContext
*/ */
public function iClickTheCmsTab($tab) public function iClickTheCmsTab($tab)
{ {
$this->getSession()->wait(5000, "window.jQuery('.ui-tabs-nav').size() > 0"); $this->getSession()->wait(
5000,
"window.jQuery && window.jQuery('.ui-tabs-nav').size() > 0"
);
$page = $this->getSession()->getPage(); $page = $this->getSession()->getPage();
$tabsets = $page->findAll('css', '.ui-tabs-nav'); $tabsets = $page->findAll('css', '.ui-tabs-nav');
@ -407,7 +416,8 @@ class CmsUiContext extends BehatContext
// wait for ajax dropdown to load // wait for ajax dropdown to load
$this->getSession()->wait( $this->getSession()->wait(
5000, 5000,
"jQuery('#" . $container->getAttribute('id') . " .treedropdownfield-panel li').length > 0" "window.jQuery && "
. "window.jQuery('#" . $container->getAttribute('id') . " .treedropdownfield-panel li').length > 0"
); );
} else { } else {
// wait for dropdown overlay to appear (might be animated) // wait for dropdown overlay to appear (might be animated)