BigW Consortium Gitlab

group.feature 2.18 KB
Newer Older
1
@dashboard
2
Feature: Dashboard Group
3 4 5 6 7 8 9 10 11 12
  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"
13
    When I visit dashboard groups page
14 15 16
    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"
17
    And I visit dashboard groups page
18 19 20 21 22 23
    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"
24
    When I visit dashboard groups page
25 26
    Then I should see group "Owned" in group list
    Then I should see group "Guest" in group list
27 28
    When I click on the "Leave" button for group "Owned"
    Then I should see the "Can not leave message"
29 30 31 32

  @javascript
  Scenario: Guest should be able to leave from group
    Given "Mary Jane" is guest of group "Guest"
33
    When I visit dashboard groups page
34 35 36
    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"
37
    When I visit dashboard groups page
38 39 40 41 42
    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
43
    When I visit dashboard groups page
44 45 46
    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"
47
    When I visit dashboard groups page
48 49
    Then I should see group "Owned" in group list
    Then I should not see group "Guest" in group list
50 51 52 53 54 55 56 57

  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"