MDL-45893 user_menu: responsive approach; fixed minor issues

This commit is contained in:
Jetha Chan 2014-10-03 17:02:02 +08:00
parent 6da0e4cfff
commit 854a647e62
11 changed files with 91 additions and 48 deletions

View file

@ -91,14 +91,13 @@ class behat_auth extends behat_base {
return $steps;
}
// If it is needed, it expands the navigation bar with the 'Log out' link.
if ($clicknavbar = $this->get_expand_navbar_step()) {
array_unshift($steps, $clicknavbar);
} else {
// Otherwise we need to expand the the user menu.
$xpath ="//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]";
array_unshift($steps, new When('I click on "'.$xpath.'" "xpath_element"'));
}
// There is no longer any need to worry about whether the navigation
// bar needs to be expanded; user_menu now lives outside the
// hamburger.
// However, the user menu *always* needs to be expanded.
$xpath ="//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]";
array_unshift($steps, new When('I click on "'.$xpath.'" "xpath_element"'));
return $steps;
}