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.
This commit is contained in:
@@ -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 fill the moodle form with:
|
||||
| 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 fill the moodle form with:
|
||||
| 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"
|
||||
And I click on "//a[@title=\"Show\"]" "xpath_element" in the "Assignment (2.2)" "table_row"
|
||||
|
||||
|
||||
@@ -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 fill the moodle form with:
|
||||
| Name | Test cohort name |
|
||||
|
||||
@@ -64,8 +64,8 @@ class behat_cohort extends behat_base {
|
||||
if (!$this->getSession()->getPage()->find('css', 'input#cohort_search_q')) {
|
||||
|
||||
$parentnodes = get_string('administrationsite') .
|
||||
',' . get_string('users', 'admin') .
|
||||
',' . get_string('accounts', 'admin');
|
||||
' > ' . 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,7 +50,9 @@ 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') . ',' . get_string('permissions', 'role');
|
||||
$parentnodes = get_string('administrationsite') . ' > ' .
|
||||
get_string('users', 'admin') . ' > ' .
|
||||
get_string('permissions', 'role');
|
||||
return array(
|
||||
new Given('I am on homepage'),
|
||||
new Given('I navigate to "' . get_string('defineroles', 'role') . '" node in "' . $parentnodes . '"'),
|
||||
|
||||
Reference in New Issue
Block a user