Created
June 30, 2016 13:20
-
-
Save davidscotson/efc5c4bbd13a984289424385bd189add to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/auth/tests/behat/behat_auth.php b/auth/tests/behat/behat_auth.php | |
index 959c2fb..41ff726 100644 | |
--- a/auth/tests/behat/behat_auth.php | |
+++ b/auth/tests/behat/behat_auth.php | |
@@ -96,7 +96,7 @@ class behat_auth extends behat_base { | |
// hamburger. | |
// However, the user menu *always* needs to be expanded. | |
- $xpath = "//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]"; | |
+ $xpath = "//ul[contains(concat(' ', @class, ' '), ' usermenu ')]//a[contains(concat(' ', @class, ' '), ' dropdown-toggle ')]"; | |
array_unshift($steps, new When('I click on "'.$xpath.'" "xpath_element"')); | |
return $steps; | |
diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php | |
index 4d96310..733d337 100644 | |
--- a/lib/tests/behat/behat_navigation.php | |
+++ b/lib/tests/behat/behat_navigation.php | |
@@ -149,13 +149,13 @@ class behat_navigation extends behat_base { | |
if ($this->running_javascript()) { | |
// The user menu must be expanded when JS is enabled. | |
- $xpath = "//div[@class='usermenu']//a[contains(concat(' ', @class, ' '), ' toggle-display ')]"; | |
+ $xpath = "//ul[contains(concat(' ', @class, ' '), ' usermenu ')]//a[contains(concat(' ', @class, ' '), ' dropdown-toggle ')]"; | |
$steps[] = new When('I click on "'.$xpath.'" "xpath_element"'); | |
} | |
// Now select the link. | |
// The CSS path is always present, with or without JS. | |
- $csspath = ".usermenu [data-rel='menu-content']"; | |
+ $csspath = ".usermenu"; | |
$steps[] = new When('I click on "'.$nodetext.'" "link" in the "'.$csspath.'" "css_element"'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment