From 0a81b6a94eeabe481e0ef7473a13b1847539adb5 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Thu, 8 Mar 2018 20:43:07 -0800 Subject: Refs #6033 add specs --- spec/features/stop_areas_spec.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'spec') diff --git a/spec/features/stop_areas_spec.rb b/spec/features/stop_areas_spec.rb index 668eb2fa3..0e1f6f3a9 100644 --- a/spec/features/stop_areas_spec.rb +++ b/spec/features/stop_areas_spec.rb @@ -30,6 +30,34 @@ describe "StopAreas", :type => :feature do expect(page).to have_content(stop_areas.first.name) expect(page).not_to have_content(stop_areas.last.name) end + + context 'filtering by status' do + before 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 + + 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) + end + end end end -- cgit v1.2.3