diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-14 18:04:29 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-14 18:04:29 +0200 |
commit | c1531fe1d801b175d8ecf7646592b1f5e9a8e508 (patch) | |
tree | 22960273b6f56a59fff3a976f7d55190b4ad75f8 /features/invites.feature | |
parent | cb5362e7ce0496e4fa7bec4ae629fd24e93d721e (diff) | |
download | gitlab-ce-c1531fe1d801b175d8ecf7646592b1f5e9a8e508.tar.gz |
Add spinach tests around accepting and declining invitations.
Diffstat (limited to 'features/invites.feature')
-rw-r--r-- | features/invites.feature | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/features/invites.feature b/features/invites.feature new file mode 100644 index 00000000000..dc8eefaeaed --- /dev/null +++ b/features/invites.feature @@ -0,0 +1,45 @@ +Feature: Invites + Background: + Given "John Doe" is owner of group "Owned" + And "John Doe" has invited "user@example.com" to group "Owned" + + Scenario: Viewing invitation when signed out + When I visit the invitation page + Then I should be redirected to the sign in page + And I should see a notice telling me to sign in + + Scenario: Signing in to view invitation + When I visit the invitation page + And I sign in as "Mary Jane" + Then I should be redirected to the invitation page + + Scenario: Viewing invitation when signed in + Given I sign in as "Mary Jane" + And I visit the invitation page + Then I should see the invitation details + And I should see an "Accept invitation" button + And I should see a "Decline" button + + Scenario: Viewing invitation as an existing member + Given I sign in as "John Doe" + And I visit the invitation page + Then I should see a message telling me I'm already a member + + Scenario: Accepting the invitation + Given I sign in as "Mary Jane" + And I visit the invitation page + And I click the "Accept invitation" button + Then I should be redirected to the group page + And I should see a notice telling me I have access + + Scenario: Declining the application when signed in + Given I sign in as "Mary Jane" + And I visit the invitation page + And I click the "Decline" button + Then I should be redirected to the dashboard + And I should see a notice telling me I have declined + + Scenario: Declining the application when signed out + When I visit the invitation's decline page + Then I should be redirected to the sign in page + And I should see a notice telling me I have declined |