diff options
author | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-07 17:59:55 +0100 |
---|---|---|
committer | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-12 15:52:53 +0100 |
commit | 439a61783d0b61bbcc8f3c9e5b828b2270a679aa (patch) | |
tree | e6a02b733ad2dea5bda94ea5ac25d333e1419589 /features/steps/profile/group.rb | |
parent | c86553cd836b7be3948ace41ef47f85776a48a97 (diff) | |
download | gitlab-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.rb | 44 |
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 |