Skip to content

Commit

Permalink
bug(case_contact): fixed the order of case contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Raushan Kumar Raman committed Dec 26, 2024
1 parent 1ca4ea9 commit 3aa7d4d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions spec/system/case_contacts/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
end
end

describe "filtering case contacts" do
describe "automated filtering case contacts" do
describe "by date of contact" do
it "only shows the contacts with the correct date" do
yesterday = Time.zone.yesterday
Expand All @@ -88,8 +88,6 @@
fill_in "filterrific_occurred_starting_at", with: yesterday
fill_in "filterrific_occurred_ending_at", with: Time.zone.tomorrow

click_on "Filter"

expect(page).to have_no_content day_before_yesterday_display
expect(page).to have_content yesterday_display
expect(page).to have_content today_display
Expand Down Expand Up @@ -125,8 +123,6 @@

check "Hide drafts"

click_on "Filter"

expect(page).to have_no_content "Draft"
end
end
Expand All @@ -143,8 +139,6 @@
it "does not expand menu when filtering only by sticky filter" do
check "Hide drafts"

click_on "Filter"

expect(page).to have_field "Hide drafts", type: :checkbox
expect(page).to have_no_content "Other filters"
end
Expand All @@ -159,7 +153,6 @@
click_on "Expand / Hide"
select "In Person", from: "Contact medium"

click_on "Filter"

expect(page).to have_content "Other filters"
end
Expand Down Expand Up @@ -225,7 +218,7 @@
click_on "Expand / Hide"
fill_in "filterrific_occurred_starting_at", with: yesterday
fill_in "filterrific_occurred_ending_at", with: Time.zone.tomorrow
click_on "Filter"

expect(page).to have_text("Case 2 Notes")
expect(page).to have_no_text("Case 1 Notes")

Expand All @@ -237,7 +230,7 @@
click_on "Expand / Hide"
fill_in "filterrific_occurred_starting_at", with: yesterday
fill_in "filterrific_occurred_ending_at", with: Time.zone.tomorrow
click_on "Filter"

# no contacts because we're only showing case 1 and that occurred before the filter dates
expect(page).to have_no_text("Case 1 Notes")
expect(page).to have_no_text("Case 2 Notes")
Expand Down

0 comments on commit 3aa7d4d

Please sign in to comment.