aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/stop_areas_spec.rb48
1 files changed, 30 insertions, 18 deletions
diff --git a/spec/features/stop_areas_spec.rb b/spec/features/stop_areas_spec.rb
index 0e1f6f3a9..02e853999 100644
--- a/spec/features/stop_areas_spec.rb
+++ b/spec/features/stop_areas_spec.rb
@@ -36,26 +36,38 @@ describe "StopAreas", :type => :feature do
stop_areas.first.activate!
stop_areas.last.deactivate!
end
-
- xit 'should filter stop areas in creation' do
- find("#q_status_in_creation").set(true)
- click_button 'search-btn'
- expect(page).not_to have_content(stop_areas.first.name)
- expect(page).not_to have_content(stop_areas.last.name)
- end
- xit 'should filter confirmed stop areas' do
- find("#q_status_confirmed").set(true)
- click_button 'search-btn'
- expect(page).to have_content(stop_areas.first.name)
- expect(page).not_to have_content(stop_areas.last.name)
- end
+ describe 'updated stop areas in before block' do
+
+ it 'supports displaying only stop areas in creation' do
+ find("#q_status_in_creation").set(true)
+ click_button 'search-btn'
+ expect(page).not_to have_content(stop_areas.first.name)
+ expect(page).not_to have_content(stop_areas.last.name)
+ end
+
+ it 'supports displaying only confirmed stop areas' do
+ find("#q_status_confirmed").set(true)
+ click_button 'search-btn'
+ expect(page).to have_content(stop_areas.first.name)
+ expect(page).not_to have_content(stop_areas.last.name)
+ end
+
+ it 'supports displaying only deactivated stop areas' do
+ find("#q_status_deactivated").set(true)
+ click_button 'search-btn'
+ expect(page).not_to have_content(stop_areas.first.name)
+ expect(page).to have_content(stop_areas.last.name)
+ end
- xit 'should filter deactivated stop areas' do
- find("#q_status_deactivated").set(true)
- click_button 'search-btn'
- expect(page).not_to have_content(stop_areas.first.name)
- expect(page).to have_content(stop_areas.last.name)
+ it 'should display all stop areas if all filters are checked' do
+ find("#q_status_in_creation").set(true)
+ find("#q_status_confirmed").set(true)
+ find("#q_status_deactivated").set(true)
+ click_button 'search-btn'
+ expect(page).to have_content(stop_areas.first.name)
+ expect(page).to have_content(stop_areas.last.name)
+ end
end
end
end