Commit 1f631c7c authored by David Monllaó's avatar David Monllaó
Browse files

MDL-44440 behat: Changing , for > as a navigation tree nodes separator

Using greater than as seems a more natural separator
than the comma when separating nodes which have a
hierarchy relation.
parent a542553d
......@@ -14,7 +14,7 @@ Feature: Upload users
| Section 1 | math102 | S1 |
| Section 3 | math102 | S3 |
And I log in as "admin"
And I navigate to "Upload users" node in "Site administration,Users,Accounts"
And I navigate to "Upload users" node in "Site administration > Users > Accounts"
When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager
And I press "Upload users"
Then I should see "Upload users preview"
......
......@@ -7,7 +7,7 @@ Feature: List the system steps definitions
Background:
Given I am on homepage
And I log in as "admin"
And I navigate to "Acceptance testing" node in "Site administration,Development"
And I navigate to "Acceptance testing" node in "Site administration > Development"
@javascript
Scenario: Accessing the list
......
......@@ -9,7 +9,7 @@ Feature: An admin can create courses using a CSV file
| fullname | shortname | category |
| First course | C1 | 0 |
And I log in as "admin"
And I navigate to "Upload courses" node in "Site administration,Courses"
And I navigate to "Upload courses" node in "Site administration > Courses"
@javascript
Scenario: Creation of unexisting courses
......
......@@ -9,7 +9,7 @@ Feature: An admin can update courses using a CSV file
| fullname | shortname | category |
| Some random name | C1 | 0 |
And I log in as "admin"
And I navigate to "Upload courses" node in "Site administration,Courses"
And I navigate to "Upload courses" node in "Site administration > Courses"
@javascript
Scenario: Updating a course fullname
......
......@@ -7,7 +7,7 @@ Feature: Award badges
@javascript
Scenario: Award profile badge
Given I log in as "admin"
And I navigate to "Add a new badge" node in "Site administration,Badges"
And I navigate to "Add a new badge" node in "Site administration > Badges"
And I set the following fields to these values:
| Name | Profile Badge |
| Description | Test badge description |
......@@ -42,7 +42,7 @@ Feature: Award badges
| teacher | teacher | 1 | teacher1@asd.com |
| student | student | 1 | student1@asd.com |
And I log in as "admin"
And I navigate to "Add a new badge" node in "Site administration,Badges"
And I navigate to "Add a new badge" node in "Site administration > Badges"
And I set the following fields to these values:
| Name | Site Badge |
| Description | Site badge description |
......
......@@ -6,7 +6,7 @@ Feature: Block activity modules
Background:
Given I log in as "admin"
And I navigate to "Manage activities" node in "Site administration,Plugins,Activity modules"
And I navigate to "Manage activities" node in "Site administration > Plugins > Activity modules"
And I click on "//a[@title=\"Show\"]" "xpath_element" in the "Feedback" "table_row"
Scenario: Add activities block on the frontpage
......
......@@ -15,7 +15,7 @@ Feature: Block appearances
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I navigate to "Theme selector" node in "Site administration,Appearance,Themes"
And I navigate to "Theme selector" node in "Site administration > Appearance > Themes"
And I click on "Change theme" "button" in the "Default" "table_row"
And I click on "Use theme" "button" in the "Afterburner" "table_row"
And I press "Continue"
......
......@@ -12,7 +12,7 @@ Feature: Add cohorts of users
| user3 | Third | User | third@user.com |
| user4 | Forth | User | forth@user.com |
And I log in as "admin"
And I navigate to "Cohorts" node in "Site administration,Users,Accounts"
And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
And I press "Add"
And I set the following fields to these values:
| Name | Test cohort name |
......
......@@ -60,8 +60,8 @@ class behat_cohort extends behat_base {
// With JS enabled we should expand a few tree nodes.
if ($this->running_javascript()) {
$parentnodes = get_string('administrationsite') . ',' .
get_string('users', 'admin') . ',' .
$parentnodes = get_string('administrationsite') . ' > ' .
get_string('users', 'admin') . ' > ' .
get_string('accounts', 'admin');
$steps = array_merge(
array(
......
......@@ -22,7 +22,7 @@ Feature: Upload users to a cohort
And I follow "Course 2"
And I add "Cohort sync" enrolment method with:
| Cohort | Cohort 2 |
When I navigate to "Upload users" node in "Site administration,Users,Accounts"
When I navigate to "Upload users" node in "Site administration > Users > Accounts"
And I upload "lib/tests/fixtures/upload_users_cohorts.csv" file to "File" filemanager
And I press "Upload users"
And I press "Upload users"
......
......@@ -113,7 +113,7 @@ class behat_navigation extends behat_base {
}
/**
* Click link in navigation tree that matches the text in parentnode/s (comma seperated if more then one)
* Click link in navigation tree that matches the text in parentnode/s (seperated using greater-than character if more than one)
*
* @Given /^I navigate to "(?P<nodetext_string>(?:[^"]|\\")*)" node in "(?P<parentnodes_string>(?:[^"]|\\")*)"$/
*
......@@ -128,7 +128,7 @@ class behat_navigation extends behat_base {
$siteadminstr = get_string('administrationsite');
// Create array of all parentnodes.
$parentnodes = explode(',', $parentnodes);
$parentnodes = array_map('trim', explode('>', $parentnodes));
$countparentnode = count($parentnodes);
// If JS is disabled and Site administration is not expanded we
......
......@@ -50,8 +50,8 @@ class behat_permissions extends behat_base {
*/
public function i_set_the_following_system_permissions_of_role($rolename, $table) {
$parentnodes = get_string('administrationsite') . ',' .
get_string('users', 'admin') . ',' .
$parentnodes = get_string('administrationsite') . ' > ' .
get_string('users', 'admin') . ' > ' .
get_string('permissions', 'role');
return array(
new Given('I am on homepage'),
......
......@@ -8,7 +8,7 @@ Feature: Enable/disable password field based on authentication selected.
Scenario: Verify the password field is enabled/disabled based on authentication selected, in user edit advanced page.
Given I log in as "admin"
And I follow "My home"
When I navigate to "Add a new user" node in "Site administration,Users,Accounts"
When I navigate to "Add a new user" node in "Site administration > Users > Accounts"
Then the "newpassword" "field" should be enabled
And I set the field "auth" to "Web services authentication"
And the "newpassword" "field" should be disabled
......
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