summaryrefslogtreecommitdiff
path: root/features/steps/profile/group.rb
diff options
context:
space:
mode:
authorCiro Santillli <ciro.santilli@gmail.com>2014-02-07 17:59:55 +0100
committerCiro Santillli <ciro.santilli@gmail.com>2014-02-12 15:52:53 +0100
commit439a61783d0b61bbcc8f3c9e5b828b2270a679aa (patch)
treee6a02b733ad2dea5bda94ea5ac25d333e1419589 /features/steps/profile/group.rb
parentc86553cd836b7be3948ace41ef47f85776a48a97 (diff)
downloadgitlab-ce-439a61783d0b61bbcc8f3c9e5b828b2270a679aa.tar.gz
User can leave group from group page.
Diffstat (limited to 'features/steps/profile/group.rb')
-rw-r--r--features/steps/profile/group.rb44
1 files changed, 44 insertions, 0 deletions
diff --git a/features/steps/profile/group.rb b/features/steps/profile/group.rb
new file mode 100644
index 00000000000..03144104c7e
--- /dev/null
+++ b/features/steps/profile/group.rb
@@ -0,0 +1,44 @@
+class ProfileGroup < Spinach::FeatureSteps
+ include SharedAuthentication
+ include SharedGroup
+ include SharedPaths
+ include SharedUser
+
+ # Leave
+
+ step 'I click on the "Leave" button for group "Owned"' do
+ find(:css, 'li', text: "Owner").find(:css, 'i.icon-signout').click
+ # poltergeist always confirms popups.
+ end
+
+ step 'I click on the "Leave" button for group "Guest"' do
+ find(:css, 'li', text: "Guest").find(:css, 'i.icon-signout').click
+ # poltergeist always confirms popups.
+ end
+
+ step 'I should not see the "Leave" button for group "Owned"' do
+ find(:css, 'li', text: "Owner").should_not have_selector(:css, 'i.icon-signout')
+ # poltergeist always confirms popups.
+ end
+
+ step 'I should not see the "Leave" button for groupr "Guest"' do
+ find(:css, 'li', text: "Guest").should_not have_selector(:css, 'i.icon-signout')
+ # poltergeist always confirms popups.
+ end
+
+ step 'I should see group "Owned" in group list' do
+ page.should have_content("Owned")
+ end
+
+ step 'I should not see group "Owned" in group list' do
+ page.should_not have_content("Owned")
+ end
+
+ step 'I should see group "Guest" in group list' do
+ page.should have_content("Guest")
+ end
+
+ step 'I should not see group "Guest" in group list' do
+ page.should_not have_content("Guest")
+ end
+end