[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @tool @javascript @tool_lp @tool_lp_plan_workflow 2 Feature: Manage plan workflow 3 As a user 4 In order to change the status of plan 5 I need to be able to change the status of a plan 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | user1 | User | 1 | user1@example.com | 11 | user2 | User | 2 | user2@example.com | 12 | manager1 | Manager | 1 | manager@example.com | 13 And the following "roles" exist: 14 | shortname | name | archetype | 15 | usermanageowndraftplan | User manage own draft plan role | user | 16 | usermanageownplan | User manage own plan role | user | 17 | manageplan | Manager all plans role | manager | 18 And the following "role assigns" exist: 19 | user | role | contextlevel | reference | 20 | user1 | usermanageowndraftplan | System | | 21 | user2 | usermanageownplan | System | | 22 | manager1 | manageplan | System | | 23 And the following lp "frameworks" exist: 24 | shortname | idnumber | 25 | Test-Framework | ID-FW1 | 26 And the following lp "competencies" exist: 27 | shortname | framework | 28 | Test-Comp1 | ID-FW1 | 29 | Test-Comp2 | ID-FW1 | 30 And the following lp "plans" exist: 31 | name | user | description | 32 | Test-Plan1 | user1 | Description of plan for user 1 | 33 | Test-Plan2 | user2 | Description of plan for user 2 | 34 And the following lp "plancompetencies" exist: 35 | plan | competency | 36 | Test-Plan1 | Test-Comp1 | 37 | Test-Plan1 | Test-Comp2 | 38 | Test-Plan2 | Test-Comp1 | 39 | Test-Plan2 | Test-Comp2 | 40 And I log in as "admin" 41 And I set the following system permissions of "User manage own draft plan role" role: 42 | capability | permission | 43 | moodle/competency:planmanageowndraft | Allow | 44 And I set the following system permissions of "User manage own plan role" role: 45 | capability | permission | 46 | moodle/competency:planmanageowndraft | Allow | 47 | moodle/competency:planmanageown | Allow | 48 And I set the following system permissions of "Manager all plans role" role: 49 | capability | permission | 50 | moodle/competency:planmanage | Allow | 51 | moodle/competency:planmanagedraft | Allow | 52 | moodle/competency:planmanageowndraft | Allow | 53 | moodle/competency:planview | Allow | 54 | moodle/competency:planreview | Allow | 55 | moodle/competency:planrequestreview | Allow | 56 And I log out 57 58 Scenario: User can manages his own plan draft 59 Given I log in as "user1" 60 And I follow "Profile" in the user menu 61 When I follow "Learning plans" 62 Then I should see "List of learning plans" 63 And I should see "Test-Plan1" 64 And I should not see "Test-Plan2" 65 And I click on "Request review" of edit menu in the "Test-Plan1" row 66 And I should see "Waiting for review" 67 And I click on "Cancel review" of edit menu in the "Test-Plan1" row 68 And I should see "Draft" 69 And I log out 70 71 Scenario: User can manages his own plan 72 Given I log in as "user2" 73 And I follow "Profile" in the user menu 74 When I follow "Learning plans" 75 Then I should see "List of learning plans" 76 And I should see "Test-Plan2" 77 And I should not see "Test-Plan1" 78 And I click on "Request review" of edit menu in the "Test-Plan2" row 79 And I should see "Waiting for review" 80 And I click on "Start review" of edit menu in the "Test-Plan2" row 81 And I should see "In review" 82 And I click on "Finish review" of edit menu in the "Test-Plan2" row 83 And I should see "Draft" 84 And I click on "Make active" of edit menu in the "Test-Plan2" row 85 And I should see "Active" 86 And I click on "Complete this learning plan" of edit menu in the "Test-Plan2" row 87 And I click on "Complete this learning plan" "button" in the "Confirm" "dialogue" 88 And I should see "Complete" 89 And I click on "Reopen this learning plan" of edit menu in the "Test-Plan2" row 90 And I click on "Reopen this learning plan" "button" in the "Confirm" "dialogue" 91 And I should see "Active" 92 And I log out 93 94 Scenario: Manager can see learning plan with status waiting for review 95 Given the following lp "plans" exist: 96 | name | user | description | status | 97 | Test-Plan3 | user2 | Description of plan 3 for user 1 | waiting for review | 98 | Test-Plan4 | user1 | Description of plan 3 for user 1 | draft | 99 When I log in as "manager1" 100 Then I should see "Test-Plan3" 101 And I should not see "Test-Plan4" 102 And I log out 103 104 Scenario: Manager can start review of learning plan with status waiting for review 105 Given the following lp "plans" exist: 106 | name | user | description | status | 107 | Test-Plan3 | user1 | Description of plan 3 for user 1 | waiting for review | 108 And I log in as "manager1" 109 And I follow "Test-Plan3" 110 And I should see "User 1" 111 And I should see "Test-Plan3" 112 When I follow "Start review" 113 Then I should see "In review" 114 And I log out 115 116 Scenario: Manager can reject a learning plan with status in review 117 Given the following lp "plans" exist: 118 | name | user | description | status | reviewer | 119 | Test-Plan3 | user1 | Description of plan 3 for user 1 | in review | manager1 | 120 And I log in as "manager1" 121 And I follow "Test-Plan3" 122 And I should see "User 1" 123 And I should see "Test-Plan3" 124 And I should see "In review" 125 When I follow "Finish review" 126 Then I should see "Draft" 127 And I log out 128 129 Scenario: Manager can accept a learning plan with status in review 130 Given the following lp "plans" exist: 131 | name | user | description | status | reviewer | 132 | Test-Plan3 | user1 | Description of plan 3 for user 1 | in review | manager1 | 133 And I log in as "manager1" 134 And I follow "Test-Plan3" 135 And I should see "User 1" 136 And I should see "Test-Plan3" 137 And I should see "In review" 138 When I follow "Make active" 139 Then I should see "Active" 140 And I log out 141 142 Scenario: Manager send back to draft an active learning plan 143 Given the following lp "plans" exist: 144 | name | user | description | status | reviewer | 145 | Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 | 146 | Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 | 147 And I log in as "manager1" 148 And I expand "Site administration" node 149 And I expand "Users" node 150 And I expand "Accounts" node 151 And I follow "Browse list of users" 152 And I follow "User 1" 153 And I follow "Learning plans" 154 And I should see "List of learning plans" 155 And I follow "Learning plans" 156 When I click on "Send back to draft" of edit menu in the "Test-Plan3" row 157 And I follow "Test-Plan4" 158 And I follow "Send back to draft" 159 And I follow "Learning plans" 160 Then I should see "Draft" 161 And I should not see "Active" 162 And I log out 163 164 Scenario: Manager change an active learning plan to completed 165 Given the following lp "plans" exist: 166 | name | user | description | status | reviewer | 167 | Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 | 168 | Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 | 169 And I log in as "manager1" 170 And I expand "Site administration" node 171 And I expand "Users" node 172 And I expand "Accounts" node 173 And I follow "Browse list of users" 174 And I follow "User 1" 175 And I follow "Learning plans" 176 And I should see "List of learning plans" 177 And I follow "Learning plans" 178 When I click on "Complete this learning plan" of edit menu in the "Test-Plan3" row 179 And I click on "Complete this learning plan" "button" in the "Confirm" "dialogue" 180 And I follow "Test-Plan4" 181 And I follow "Complete this learning plan" 182 And I click on "Complete this learning plan" "button" in the "Confirm" "dialogue" 183 And I follow "Learning plans" 184 Then I should see "Complete" 185 And I should not see "Active" 186 And I log out 187 188 Scenario: Manager reopen a complete learning plan 189 Given the following lp "plans" exist: 190 | name | user | description | status | reviewer | 191 | Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 | 192 | Test-Plan4 | user1 | Description of plan 4 for user 1 | complete | manager1 | 193 And I log in as "manager1" 194 And I expand "Site administration" node 195 And I expand "Users" node 196 And I expand "Accounts" node 197 And I follow "Browse list of users" 198 And I follow "User 1" 199 And I follow "Learning plans" 200 And I should see "List of learning plans" 201 And I follow "Learning plans" 202 When I click on "Reopen this learning plan" of edit menu in the "Test-Plan3" row 203 And I click on "Reopen this learning plan" "button" in the "Confirm" "dialogue" 204 And I follow "Test-Plan4" 205 And I follow "Reopen this learning plan" 206 And I click on "Reopen this learning plan" "button" in the "Confirm" "dialogue" 207 And I follow "Learning plans" 208 Then I should see "Active" 209 And I should not see "Complete" 210 And I log out
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |