Commit a535004e authored by Dan Poltawski's avatar Dan Poltawski
Browse files

MDL-45893 behat: quick fix for usermenu logout button

(This needs revisiting properly - I am not an xpath expert)
parent 8f97a5c6
......@@ -94,6 +94,10 @@ class behat_auth extends behat_base {
// 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"'));
return $steps;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment