MDL-45769 Behat: Fixed behat, was failing because of xpath chaining

This commit is contained in:
Rajesh Taneja
2014-06-09 09:59:13 +08:00
parent a6b91c8407
commit f12f99241c
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -138,8 +138,8 @@ class behat_grading extends behat_base {
// Should work with both templates and own forms.
$literaltemplate = $this->getSession()->getSelectorsHandler()->xpathLiteral(get_string('templatepick', 'grading'));
$literalownform = $this->getSession()->getSelectorsHandler()->xpathLiteral(get_string('templatepickownform', 'grading'));
$usetemplatexpath = "//a[./descendant::div[text()=$literaltemplate]]|" .
"//a[./descendant::div[text()=$literalownform]]";
$usetemplatexpath = "/a[./descendant::div[text()=$literaltemplate]]|" .
"/a[./descendant::div[text()=$literalownform]]";
return array(
new Given('I go to "' . $this->escape($activityname) . '" advanced grading page'),
@@ -9,8 +9,7 @@ Feature: Add or remove items from the TinyMCE editor toolbar
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Admin User"
And I follow "Edit profile"
And I navigate to "Edit profile" node in "My profile settings"
And I set the field "Text editor" to "TinyMCE HTML editor"
And I press "Update profile"
And I follow "Home"