MDL-69231 behat: remaining work for role capability generator
This commit does few things: * Unify data generators usage to role short name. * Replace remaining manual steps to use the new data generator. * Also replaced other manual steps to set config to use data generators. * Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines. * Fixes tests to have one Given/When/Then per scenario.
This commit is contained in:
@@ -21,7 +21,7 @@ Feature: Edit capabilities
|
||||
|
||||
Scenario: Default system capabilities modification
|
||||
Given I log in as "admin"
|
||||
When I navigate to "Users > Permissions > Define roles" in site administration
|
||||
And I navigate to "Users > Permissions > Define roles" in site administration
|
||||
And I click on "Edit Teacher role" "link"
|
||||
And I fill the capabilities form with the following permissions:
|
||||
| capability | permission |
|
||||
|
||||
@@ -16,17 +16,16 @@ Feature: Manage plan workflow
|
||||
| usermanageownplan | User manage own plan role | user |
|
||||
| manageplan | Manager all plans role | manager |
|
||||
And the following "role capabilities" exist:
|
||||
| role | moodle/competency:planmanageowndraft |
|
||||
| usermanageowndraftplan | allow |
|
||||
| usermanageownplan | allow |
|
||||
| manageplan | allow |
|
||||
And the following "role capabilities" exist:
|
||||
| role | moodle/competency:planmanageown |
|
||||
| usermanageownplan | allow |
|
||||
| manageplan | allow |
|
||||
And the following "role capabilities" exist:
|
||||
| role | moodle/competency:planmanage | moodle/competency:planview | moodle/competency:planreview | moodle/competency:planrequestreview |
|
||||
| manageplan | allow | allow | allow | allow |
|
||||
| role | moodle/competency:planmanageowndraft | moodle/competency:planmanageown |
|
||||
| usermanageowndraftplan | allow | |
|
||||
| usermanageownplan | allow | allow |
|
||||
| manageplan | allow | allow |
|
||||
And the following "role capability" exists:
|
||||
| role | manageplan |
|
||||
| moodle/competency:planmanage | allow |
|
||||
| moodle/competency:planview | allow |
|
||||
| moodle/competency:planreview | allow |
|
||||
| moodle/competency:planrequestreview | allow |
|
||||
And the following "role assigns" exist:
|
||||
| user | role | contextlevel | reference |
|
||||
| user1 | usermanageowndraftplan | System | |
|
||||
|
||||
@@ -170,8 +170,8 @@ Feature: tool_monitor_subscriptions
|
||||
|
||||
Scenario: No manage rules link when user does not have permission
|
||||
Given the following "role capability" exists:
|
||||
| role | Non-editing teacher |
|
||||
| tool/monitor:managerules | Prohibit |
|
||||
| role | teacher |
|
||||
| tool/monitor:managerules | prohibit |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I follow "Event monitoring"
|
||||
|
||||
@@ -71,7 +71,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
|
||||
|
||||
@javascript
|
||||
Scenario: Agree on behalf of another user as a manager, single policy, javascript on
|
||||
Given the following "role capabilities" exist:
|
||||
Given the following "role capability" exists:
|
||||
| role | manager |
|
||||
| tool/policy:acceptbehalf | allow |
|
||||
When I log in as "manager"
|
||||
@@ -166,7 +166,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
|
||||
Given the following "role capability" exists:
|
||||
| role | manager |
|
||||
| tool/policy:acceptbehalf | allow |
|
||||
Given I log in as "admin"
|
||||
And I log in as "admin"
|
||||
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
|
||||
And I click on "Actions" "link_or_button" in the "This privacy policy" "table_row"
|
||||
And I click on "Set status to \"Active\"" "link" in the "This privacy policy" "table_row"
|
||||
|
||||
Reference in New Issue
Block a user