[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_cohort 2 Feature: View cohort list 3 In order to operate with cohorts 4 As an admin or manager 5 I need to be able to view the list of cohorts in the system 6 7 Background: 8 Given the following "categories" exist: 9 | name | category | idnumber | 10 | Cat 1 | 0 | CAT1 | 11 | Cat 2 | 0 | CAT2 | 12 | Cat 3 | CAT1 | CAT3 | 13 And the following "cohorts" exist: 14 | name | idnumber | 15 | System cohort | CH0 | 16 And the following "cohorts" exist: 17 | name | idnumber | contextlevel | reference | 18 | Cohort in category 1 | CH1 | Category | CAT1 | 19 | Cohort in category 2 | CH2 | Category | CAT2 | 20 | Cohort in category 3 | CH3 | Category | CAT3 | 21 Given the following "users" exist: 22 | username | firstname | lastname | email | 23 | user1 | First | User | first@example.com | 24 | user2 | Second | User | second@example.com | 25 And the following "role assigns" exist: 26 | user | role | contextlevel | reference | 27 | user1 | manager | System | | 28 | user2 | manager | Category | CAT1 | 29 30 Scenario: Admin can see system cohorts and all cohorts 31 When I log in as "admin" 32 And I navigate to "Cohorts" node in "Site administration > Users > Accounts" 33 Then I should see "System cohort" 34 And I should not see "Cohort in category" 35 And I follow "All cohorts" 36 And I should see "System cohort" 37 And I should see "Cohort in category 1" 38 And I should see "Cohort in category 2" 39 And I should see "Cohort in category 3" 40 And I log out 41 42 Scenario: Manager can see system cohorts and all cohorts 43 When I log in as "user1" 44 And I navigate to "Cohorts" node in "Site administration > Users > Accounts" 45 Then I should see "System cohort" 46 And I should not see "Cohort in category" 47 And I follow "All cohorts" 48 And I should see "System cohort" 49 And I should see "Cohort in category 1" 50 And I should see "Cohort in category 2" 51 And I should see "Cohort in category 3" 52 And I log out 53 54 Scenario: Manager in category can see cohorts in the category 55 When I log in as "user2" 56 And I follow "Courses" 57 And I follow "Cat 1" 58 And I follow "Cohorts" 59 And I should not see "All cohorts" 60 And I should not see "System cohort" 61 And I should see "Cohort in category 1" 62 And I should not see "Cohort in category 2" 63 And I should not see "Cohort in category 3" 64 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 |