Merge branch 'MDL-58826_master' of https://github.com/marxjohnson/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2017-06-06 01:44:18 +02:00
commit fa58bc0a36

View File

@ -49,6 +49,10 @@ class behat_theme_boost_behat_course extends behat_course {
// Find the menu.
$menunode = $activitynode->find('css', 'a[data-toggle=dropdown]');
if (!$menunode) {
throw new ExpectationException(sprintf('Could not find actions menu for the activity "%s"', $activityname),
$this->getSession());
}
$expanded = $menunode->getAttribute('aria-expanded');
if ($expanded == 'true') {
return;
@ -71,6 +75,10 @@ class behat_theme_boost_behat_course extends behat_course {
$activitynode = $this->get_activity_node($activityname);
// Find the menu.
$menunode = $activitynode->find('css', 'a[data-toggle=dropdown]');
if (!$menunode) {
throw new ExpectationException(sprintf('Could not find actions menu for the activity "%s"', $activityname),
$this->getSession());
}
$expanded = $menunode->getAttribute('aria-expanded');
if ($expanded != 'true') {
return;
@ -90,6 +98,10 @@ class behat_theme_boost_behat_course extends behat_course {
$activitynode = $this->get_activity_node($activityname);
// Find the menu.
$menunode = $activitynode->find('css', 'a[data-toggle=dropdown]');
if (!$menunode) {
throw new ExpectationException(sprintf('Could not find actions menu for the activity "%s"', $activityname),
$this->getSession());
}
$expanded = $menunode->getAttribute('aria-expanded');
if ($expanded != 'true') {
throw new ExpectationException(sprintf("The action menu for '%s' is not open", $activityname), $this->getSession());