create_and_delete_groups.feature 3 KB
Newer Older
1
@javascript @core @core_group
2 3 4 5 6 7 8
Feature: Delete groups
    In order to delete a group
    As an admin I need to create groups
    So I can verify they can be deleted successfully

Scenario: Creating groups and deleting them (Selenium)
    # Log in as "Admin" user
Gregor Anzelj's avatar
Gregor Anzelj committed
9
    Given I log in as "admin" with password "Kupuh1pa!"
10
    # Create a Friend invitation only group
11
    And I choose "Groups" in "Engage" from main menu
12 13
    And I follow "Create group"
    And I fill in "Group name" with "Admin Test Group"
Son Nguyen's avatar
Son Nguyen committed
14 15
    And I disable the switch "Open"
    And I enable the switch "Friend invitations"
16
    And I press "Save group"
17
    # Create Request only group
18
    And I choose "Groups" in "Engage" from main menu
19 20
    And I follow "Create group"
    And I fill in "Group name" with "Admin VIP Group"
Son Nguyen's avatar
Son Nguyen committed
21 22
    And I disable the switch "Open"
    And I enable the switch "Request"
23 24
    And I fill in "Start date" with "2015/06/15 03:00"
    And I fill in "End date" with "2015/06/15 03:30"
25
    And I press "Save group"
26 27 28 29 30 31 32
    # Verify "Group info" block exists
    And ".bt-groupinfo" "css_element" should be visible
    And I should see "Created" in the ".bt-groupinfo" "css_element"
    And I should see "Request membership" in the ".bt-groupinfo" "css_element"
    And I should see "Members" in the ".bt-groupinfo" "css_element"
    And I should see "Group administrators:" in the ".bt-groupinfo" "css_element"
    And I should see "Editable" in the ".bt-groupinfo" "css_element"
33
    And I should see "Between 15 June 2015, 3:00 and 15 June 2015, 3:30"
34
    # Create Open group
35
    And I choose "Groups" in "Engage" from main menu
36 37
    And I follow "Create group"
    And I fill in "Group name" with "Public discussion"
38
    And I enable the switch "Participation report"
39
    And I press "Save group"
40
    # Create Controlled group
41
    And I choose "Groups" in "Engage" from main menu
42 43
    And I follow "Create group"
    And I fill in "Group name" with "Controlled groups"
Son Nguyen's avatar
Son Nguyen committed
44 45
    And I disable the switch "Open"
    And I enable the switch "Controlled"
46
    And I press "Save group"
47
    # Check if the group report page is there
48
    And I choose "Groups" in "Engage" from main menu
49 50 51 52
    And I follow "Public discussion"
    And I follow "Report" in the ".arrow-bar" "css_element"
    Then I should see "There are no pages shared with this group yet"
    # Checking groups exist and can be deleted
53
    And I choose "Groups" in "Engage" from main menu
54
    And I follow "Admin Test Group"
55
    And I follow "Delete \"Admin Test Group\""
56 57
    And I press "Yes"
    And I follow "Controlled groups"
58
    And I follow "Delete \"Controlled groups\""
59 60
    And I press "Yes"
    And I follow "Admin VIP Group"
61
    And I follow "Delete \"Admin VIP Group\""
62 63
    And I press "Yes"
    And I follow "Public discussion"
64
    And I follow "Delete \"Public discussion\""
65 66 67 68 69 70
    And I press "Yes"
    # Verifying none of the deleted groups can be seen
    And I should not see "Admin Test Group"
    And I should not see "Controlled groups"
    And I should not see "Admin VIP Group"
    And I should not see "Public discussion"