@@ -22,6 +22,8 @@ def date_range_picker_select_range(range_name)
2222 let! ( :very_old ) { create ( described_class . to_s . underscore . to_sym , date_field . to_sym => Time . zone . local ( 2000 , 7 , 31 ) , :organization => organization ) }
2323 let! ( :recent ) { create ( described_class . to_s . underscore . to_sym , date_field . to_sym => Time . zone . local ( 2019 , 7 , 24 ) , :organization => organization ) }
2424 let! ( :today ) { create ( described_class . to_s . underscore . to_sym , date_field . to_sym => Time . zone . local ( 2019 , 7 , 31 ) , :organization => organization ) }
25+ let! ( :one_year_ahead ) { create ( described_class . to_s . underscore . to_sym , date_field . to_sym => Time . zone . local ( 2020 , 7 , 31 ) , :organization => organization ) }
26+ let! ( :two_years_ahead ) { create ( described_class . to_s . underscore . to_sym , date_field . to_sym => Time . zone . local ( 2021 , 7 , 31 ) , :organization => organization ) }
2527
2628 context "when choosing 'All Time'" do
2729 before do
@@ -36,10 +38,10 @@ def date_range_picker_select_range(range_name)
3638
3739 it "shows all the records" do
3840 visit subject
39- date_range = "#{ Time . zone . local ( 1919 , 7 , 1 ) . to_formatted_s ( :date_picker ) } - #{ Time . zone . local ( 2019 , 7 , 31 ) . to_formatted_s ( :date_picker ) } "
41+ date_range = "#{ Time . zone . local ( 1919 , 7 , 1 ) . to_formatted_s ( :date_picker ) } - #{ Time . zone . local ( 2020 , 7 , 31 ) . to_formatted_s ( :date_picker ) } "
4042 fill_in "filters_date_range" , with : date_range
4143 find ( :id , 'filters_date_range' ) . native . send_keys ( :enter )
42- expect ( page ) . to have_css ( "table tbody tr" , count : 3 )
44+ expect ( page ) . to have_css ( "table tbody tr" , count : 4 )
4345 end
4446 end
4547
0 commit comments