summaryrefslogtreecommitdiff
path: root/features/dashboard/group.feature
blob: e3c01db2ebb113dc73e509f501f54896ec99639e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@dashboard
Feature: Dashboard Group
  Background:
    Given I sign in as "John Doe"
    And "John Doe" is owner of group "Owned"
    And "John Doe" is guest of group "Guest"

  # Leave groups

  @javascript
  Scenario: Owner should be able to leave from group if he is not the last owner
    Given "Mary Jane" is owner of group "Owned"
    When I visit dashboard groups page
    Then I should see group "Owned" in group list
    Then I should see group "Guest" in group list
    When I click on the "Leave" button for group "Owned"
    And I visit dashboard groups page
    Then I should not see group "Owned" in group list
    Then I should see group "Guest" in group list

  @javascript
  Scenario: Owner should not be able to leave from group if he is the last owner
    Given "Mary Jane" is guest of group "Owned"
    When I visit dashboard groups page
    Then I should see group "Owned" in group list
    Then I should see group "Guest" in group list
    When I click on the "Leave" button for group "Owned"
    Then I should see the "Can not leave message"

  @javascript
  Scenario: Guest should be able to leave from group
    Given "Mary Jane" is guest of group "Guest"
    When I visit dashboard groups page
    Then I should see group "Owned" in group list
    Then I should see group "Guest" in group list
    When I click on the "Leave" button for group "Guest"
    When I visit dashboard groups page
    Then I should see group "Owned" in group list
    Then I should not see group "Guest" in group list

  @javascript
  Scenario: Guest should be able to leave from group even if he is the only user in the group
    When I visit dashboard groups page
    Then I should see group "Owned" in group list
    Then I should see group "Guest" in group list
    When I click on the "Leave" button for group "Guest"
    When I visit dashboard groups page
    Then I should see group "Owned" in group list
    Then I should not see group "Guest" in group list

  Scenario: Create a group from dasboard
    And I visit dashboard groups page
    And I click new group link
    And submit form with new group "Samurai" info
    Then I should be redirected to group "Samurai" page
    And I should see newly created group "Samurai"