Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course @theme_boost
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
  @javascript
20
  Scenario: A user with a category role can assign roles
21
    Given I define the allowed role assignments for the "Manager" role as:
22
      | Teacher | Assignable |
23
    And I log out
24
    And I log in as "manager"
25
    And I am on course index
26
    When I follow "Cat 1"
27
    And I navigate to "Permissions" in current page administration
28
    Then "Assign roles" "text" should exist in the ".tertiary-navigation" "css_element"
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 change window size to "large"
39
    And I log out
40
    And I log in as "manager"
41
    And I am on course index
42
    When I follow "Cat 1"
43
    And I navigate to "Permissions" in current page administration
44
    Then "Assign roles" "text" should not exist in the ".tertiary-navigation" "css_element"