gitlab-org--gitlab-foss/features/steps/profile/group.rb

45 lines
1.3 KiB
Ruby
Raw Normal View History

class Spinach::Features::ProfileGroup < Spinach::FeatureSteps
2014-02-07 11:59:55 -05:00
include SharedAuthentication
include SharedGroup
include SharedPaths
include SharedUser
# Leave
step 'I click on the "Leave" button for group "Owned"' do
2014-10-01 18:21:29 -04:00
find(:css, 'li', text: "Owner").find(:css, 'i.fa.fa-sign-out').click
2014-02-07 11:59:55 -05:00
# poltergeist always confirms popups.
end
step 'I click on the "Leave" button for group "Guest"' do
2014-10-01 18:21:29 -04:00
find(:css, 'li', text: "Guest").find(:css, 'i.fa.fa-sign-out').click
2014-02-07 11:59:55 -05:00
# poltergeist always confirms popups.
end
step 'I should not see the "Leave" button for group "Owned"' do
2014-10-01 18:21:29 -04:00
find(:css, 'li', text: "Owner").should_not have_selector(:css, 'i.fa.fa-sign-out')
2014-02-07 11:59:55 -05:00
# poltergeist always confirms popups.
end
step 'I should not see the "Leave" button for groupr "Guest"' do
2014-10-01 18:21:29 -04:00
find(:css, 'li', text: "Guest").should_not have_selector(:css, 'i.fa.fa-sign-out')
2014-02-07 11:59:55 -05:00
# 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