|
65 | 65 | end |
66 | 66 | end |
67 | 67 |
|
68 | | - describe "filtering case contacts" do |
| 68 | + describe "automated filtering case contacts" do |
69 | 69 | describe "by date of contact" do |
70 | 70 | it "only shows the contacts with the correct date" do |
71 | 71 | yesterday = Time.zone.yesterday |
|
88 | 88 | fill_in "filterrific_occurred_starting_at", with: yesterday |
89 | 89 | fill_in "filterrific_occurred_ending_at", with: Time.zone.tomorrow |
90 | 90 |
|
91 | | - click_on "Filter" |
92 | | - |
93 | 91 | expect(page).to have_no_content day_before_yesterday_display |
94 | 92 | expect(page).to have_content yesterday_display |
95 | 93 | expect(page).to have_content today_display |
|
125 | 123 |
|
126 | 124 | check "Hide drafts" |
127 | 125 |
|
128 | | - click_on "Filter" |
129 | | - |
130 | 126 | expect(page).to have_no_content "Draft" |
131 | 127 | end |
132 | 128 | end |
|
143 | 139 | it "does not expand menu when filtering only by sticky filter" do |
144 | 140 | check "Hide drafts" |
145 | 141 |
|
146 | | - click_on "Filter" |
147 | | - |
148 | 142 | expect(page).to have_field "Hide drafts", type: :checkbox |
149 | 143 | expect(page).to have_no_content "Other filters" |
150 | 144 | end |
|
159 | 153 | click_on "Expand / Hide" |
160 | 154 | select "In Person", from: "Contact medium" |
161 | 155 |
|
162 | | - click_on "Filter" |
163 | 156 |
|
164 | 157 | expect(page).to have_content "Other filters" |
165 | 158 | end |
|
225 | 218 | click_on "Expand / Hide" |
226 | 219 | fill_in "filterrific_occurred_starting_at", with: yesterday |
227 | 220 | fill_in "filterrific_occurred_ending_at", with: Time.zone.tomorrow |
228 | | - click_on "Filter" |
| 221 | + |
229 | 222 | expect(page).to have_text("Case 2 Notes") |
230 | 223 | expect(page).to have_no_text("Case 1 Notes") |
231 | 224 |
|
|
237 | 230 | click_on "Expand / Hide" |
238 | 231 | fill_in "filterrific_occurred_starting_at", with: yesterday |
239 | 232 | fill_in "filterrific_occurred_ending_at", with: Time.zone.tomorrow |
240 | | - click_on "Filter" |
| 233 | + |
241 | 234 | # no contacts because we're only showing case 1 and that occurred before the filter dates |
242 | 235 | expect(page).to have_no_text("Case 1 Notes") |
243 | 236 | expect(page).to have_no_text("Case 2 Notes") |
|
0 commit comments