[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/course/tests/behat/ -> category_role_assignment.feature (source)

   1  @core @core_course
   2  Feature: Role assignments can be made at the category level
   3    In order to grant a user different capabilities
   4    As a user
   5    I can assign roles in categories
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username  | firstname | lastname |
  10        | manager   | Manager   | Manager  |
  11      And the following "categories" exist:
  12        | name | category | idnumber |
  13        | Cat 1 | 0 | CAT1 |
  14      And the following "role assigns" exist:
  15        | user    | role          | contextlevel | reference |
  16        | manager | manager       | Category     | CAT1      |
  17      And I log in as "admin"
  18  
  19  
  20    @javascript
  21    Scenario: A user with a category role can assign roles
  22      Given I define the allowed role assignments for the "Manager" role as:
  23        | Teacher | Assignable |
  24      And I log out
  25      And I log in as "manager"
  26      And I follow "Courses"
  27      When I follow "Cat 1"
  28      Then I should see "Assign roles"
  29  
  30    @javascript
  31    Scenario: A user with a category role cannot assign roles if there are no roles to assign
  32      Given I define the allowed role assignments for the "Manager" role as:
  33        | Manager             | Not assignable |
  34        | Course creator      | Not assignable |
  35        | Teacher             | Not assignable |
  36        | Non-editing teacher | Not assignable |
  37        | Student             | Not assignable |
  38      And I log out
  39      And I log in as "manager"
  40      And I follow "Courses"
  41      When I follow "Cat 1"
  42      Then I should not see "Assign roles"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1