Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_group
2
Feature: Automatic deletion of groups and groupings
3
  In order to check the expected results occur when deleting groups and groupings in different scenarios
4
  As a teacher
5
  I need to create groups and groupings under different scenarios and check that the expected result occurs when attempting to delete them.
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | format |
10
      | Course 1 | C1 | topics |
11
    And the following "users" exist:
12
      | username | firstname | lastname | email |
13
      | teacher1 | Teacher | 1 | teacher1@example.com |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And the following "groups" exist:
18
      | course | name               | idnumber |
19
      | C1     | Group (without ID) |          |
20
      | C1     | Group (with ID)    | An ID    |
21
    And the following "groupings" exist:
22
      | course | name                  | idnumber |
23
      | C1     | Grouping (without ID) |          |
24
      | C1     | Grouping (with ID)    | An ID    |
25
    And I log in as "teacher1"
26
    And I am on the "Course 1" "groups" page logged in as "teacher1"
27
 
28
  @javascript
29
  Scenario: Delete groups and groupings with and without ID numbers
30
    Given I set the field "groups" to "Group (without ID) (0)"
31
    And I press "Delete"
32
    And I press "Yes"
33
    Then the "groups" select box should not contain "Group (without ID) (0)"
34
    And I set the field "groups" to "Group (with ID) (0)"
35
    And I press "Delete"
36
    And I press "Yes"
37
    And the "groups" select box should not contain "Group (with ID) (0)"
38
    And I set the field "Participants tertiary navigation" to "Groupings"
39
    And I click on "Delete" "link" in the "Grouping (without ID)" "table_row"
40
    And I press "Yes"
41
    And I should not see "Grouping (without ID)"
42
    And I click on "Delete" "link" in the "Grouping (with ID)" "table_row"
43
    And I press "Yes"
44
    And I should not see "Grouping (with ID)"
45
 
46
  @javascript @skip_chrome_zerosize
47
  Scenario: Delete groups and groupings with and without ID numbers without the 'moodle/course:changeidnumber' capability
48
    Given the following "role capability" exists:
49
      | role                         | editingteacher |
50
      | moodle/course:changeidnumber | prevent        |
51
    And I am on the "Course 1" "groups" page
52
    When I set the field "groups" to "Group (with ID) (0)"
53
    Then the "Delete" "button" should be disabled
54
    And I set the field "groups" to "Group (without ID) (0)"
55
    And I press "Delete"
56
    And I press "Yes"
57
    And I should not see "Group (without ID)"
58
    And I set the field "Participants tertiary navigation" to "Groupings"
59
    And "Delete" "link" should not exist in the "Grouping (with ID)" "table_row"
60
    And I click on "Delete" "link" in the "Grouping (without ID)" "table_row"
61
    And I press "Yes"
62
    And I should not see "Grouping (without ID)"