From 7e4258777f8eed31cfe202bb96178823218f3b1c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 8 Mar 2015 20:52:22 -0700 Subject: Move Profile groups tests to Dashboard group tests --- features/steps/dashboard/group.rb | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 features/steps/dashboard/group.rb (limited to 'features/steps/dashboard') diff --git a/features/steps/dashboard/group.rb b/features/steps/dashboard/group.rb new file mode 100644 index 00000000000..09d7717b67b --- /dev/null +++ b/features/steps/dashboard/group.rb @@ -0,0 +1,44 @@ +class Spinach::Features::DashboardGroup < 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.fa.fa-sign-out').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.fa.fa-sign-out').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.fa.fa-sign-out') + # 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.fa.fa-sign-out') + # 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 -- cgit v1.2.1