MDL-42731 behat: load 'Site administration' when expanding node in non-javascript mode

This commit is contained in:
Marina Glancy
2013-12-02 17:44:32 +11:00
parent e7c71c448b
commit 6dfd8325f0
6 changed files with 37 additions and 29 deletions
+4
View File
@@ -53,6 +53,10 @@ class behat_navigation extends behat_base {
// all of tree's nodes; adding this because of scenarios that shares the
// same steps with and without Javascript enabled.
if (!$this->running_javascript()) {
if ($nodetext === get_string('administrationsite')) {
// Administration menu is not loaded by default any more. Click the link to expand.
return new Given('I click on "'.$nodetext.'" "link" in the "'.get_string('administration').'" "block"');
}
return false;
}