Commit c617cbfc authored by Phil Hughes's avatar Phil Hughes Committed by Alfredo Sumaran

Fixed filtering tests

parent a0cd87d1
...@@ -5,38 +5,26 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps ...@@ -5,38 +5,26 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps
include SharedProject include SharedProject
step 'I should see push event' do step 'I should see push event' do
wait_for_ajax
sleep 1
expect(page).to have_selector('span.pushed') expect(page).to have_selector('span.pushed')
end end
step 'I should not see push event' do step 'I should not see push event' do
wait_for_ajax
sleep 1
expect(page).not_to have_selector('span.pushed') expect(page).not_to have_selector('span.pushed')
end end
step 'I should see new member event' do step 'I should see new member event' do
wait_for_ajax
sleep 1
expect(page).to have_selector('span.joined') expect(page).to have_selector('span.joined')
end end
step 'I should not see new member event' do step 'I should not see new member event' do
wait_for_ajax
sleep 1
expect(page).not_to have_selector('span.joined') expect(page).not_to have_selector('span.joined')
end end
step 'I should see merge request event' do step 'I should see merge request event' do
wait_for_ajax
sleep 1
expect(page).to have_selector('span.accepted') expect(page).to have_selector('span.accepted')
end end
step 'I should not see merge request event' do step 'I should not see merge request event' do
wait_for_ajax
sleep 1
expect(page).not_to have_selector('span.accepted') expect(page).not_to have_selector('span.accepted')
end end
...@@ -86,13 +74,16 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps ...@@ -86,13 +74,16 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps
When 'I click "push" event filter' do When 'I click "push" event filter' do
click_link("push_event_filter") click_link("push_event_filter")
sleep 1
end end
When 'I click "team" event filter' do When 'I click "team" event filter' do
click_link("team_event_filter") click_link("team_event_filter")
sleep 1
end end
When 'I click "merge" event filter' do When 'I click "merge" event filter' do
click_link("merged_event_filter") click_link("merged_event_filter")
sleep 1
end end
end end
...@@ -354,7 +354,8 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps ...@@ -354,7 +354,8 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end end
def filter_issue(text) def filter_issue(text)
sleep 1
fill_in 'issue_search', with: text fill_in 'issue_search', with: text
find('#issue_search').native.send_keys(:return) sleep 1
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment