Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@tool @tool_capability
2
Feature: show only differences between roles for selected capabilities
3
  In order to check roles capabilities
4
  As an admin
5
  I need to be able to filter capabilities report viewing only role differences
6
 
7
  Background:
8
    Given the following "roles" exist:
9
      | shortname     | name      | archetype |
10
      | studenteq     | Studenteq | student   |
11
      | studentdf     | Studentdf | student   |
12
    And the following "permission overrides" exist:
13
      | capability                    | permission | role        | contextlevel | reference |
14
      | moodle/course:changefullname  | Allow      | studentdf   | System       |           |
15
      | moodle/course:changeshortname | Prohibit   | studentdf   | System       |           |
16
    And I log in as "admin"
17
    And I navigate to "Users > Permissions > Capability overview" in site administration
18
 
19
  Scenario: Compare identical roles
20
    When I set the following fields to these values:
21
      | Capability: | moodle/course:changefullname, moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary |
22
      | Roles:      | Student, Studenteq                                                                                                     |
23
    And I set the field "Show differences only" to "1"
24
    And I click on "Get the overview" "button"
25
    Then I should see "There are no differences to show between selected roles in this context"
26
 
27
  Scenario: Compare different roles
28
    When I set the following fields to these values:
29
      | Capability: | moodle/course:changefullname, moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary |
30
      | Roles:      | Student, Studentdf                                                                                                     |
31
    And I set the field "Show differences only" to "1"
32
    And I click on "Get the overview" "button"
33
    Then I should not see "There are no differences to show between selected roles in this context"
34
    And I should see "moodle/course:changefullname" in the "comparisontable" "table"
35
    And I should see "moodle/course:changeshortname" in the "comparisontable" "table"
36
    And I should not see "moodle/course:changesummary" in the "comparisontable" "table"
37
 
38
  Scenario: Compare different roles but comparing capabilities that are equals on both
39
    When I set the following fields to these values:
40
      | Capability: | moodle/course:changeidnumber, moodle/course:changesummary |
41
      | Roles:      | Student, Studentdf                                        |
42
    And I set the field "Show differences only" to "1"
43
    And I click on "Get the overview" "button"
44
    Then I should see "There are no differences to show between selected roles in this context"
45
 
46
  Scenario: Compare all roles without selecting specific role
47
    When I set the following fields to these values:
48
      | Capability: | moodle/course:changefullname, moodle/site:config |
49
    And I set the field "Show differences only" to "1"
50
    And I click on "Get the overview" "button"
51
    Then I should not see "moodle/site:config" in the "comparisontable" "table"
52
    And I should see "moodle/course:changefullname" in the "comparisontable" "table"
53
 
54
  Scenario: Compare all roles without selecting specific role on not defined capability
55
    When I set the following fields to these values:
56
      | Capability: | moodle/site:config |
57
    And I set the field "Show differences only" to "1"
58
    And I click on "Get the overview" "button"
59
    Then I should see "There are no differences to show between selected roles in this context"
60
 
61
  Scenario: Comparing only one role
62
    When I set the following fields to these values:
63
      | Capability: | moodle/course:changefullname, moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary |
64
      | Roles:      | Student                                                                                                                |
65
    And I set the field "Show differences only" to "1"
66
    And I click on "Get the overview" "button"
67
    Then I should see "There are no differences to show between selected roles in this context"