Skip to content

Commit

Permalink
Fix flaky distributions by county spec (#4816)
Browse files Browse the repository at this point in the history
  • Loading branch information
coalest authored Dec 2, 2024
1 parent 8a4dd78 commit a93fd40
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions spec/system/distributions_by_county_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
partner_1.profile.served_areas.each do |served_area|
expect(page).to have_text(served_area.county.name)
end
expect(page).to have_text("50", count: 4)
expect(page).to have_text("$525.00", count: 4)

expect(page).to have_css("table tbody tr td", text: "50", exact_text: true, count: 4)
expect(page).to have_css("table tbody tr td", text: "$525.00", exact_text: true, count: 4)
end

it("works for this year") do
Expand All @@ -31,8 +32,9 @@
partner_1.profile.served_areas.each do |served_area|
expect(page).to have_text(served_area.county.name)
end
expect(page).to have_text("25", count: 4)
expect(page).to have_text("$262.50", count: 4)

expect(page).to have_css("table tbody tr td", text: "25", exact_text: true, count: 4)
expect(page).to have_css("table tbody tr td", text: "$262.50", exact_text: true, count: 4)
end

it("works for prior year") do
Expand All @@ -53,8 +55,8 @@
partner_1.profile.served_areas.each do |served_area|
expect(page).to have_text(served_area.county.name)
end
expect(page).to have_text("25", count: 4)
expect(page).to have_text("$262.50", count: 4)
expect(page).to have_css("table tbody tr td", text: "25", exact_text: true, count: 4)
expect(page).to have_css("table tbody tr td", text: "$262.50", exact_text: true, count: 4)
end

it("works for last 12 months") do
Expand All @@ -75,8 +77,8 @@
partner_1.profile.served_areas.each do |served_area|
expect(page).to have_text(served_area.county.name)
end
expect(page).to have_text("25", count: 4)
expect(page).to have_text("$262.50", count: 4)
expect(page).to have_css("table tbody tr td", text: "25", exact_text: true, count: 4)
expect(page).to have_css("table tbody tr td", text: "$262.50", exact_text: true, count: 4)
end
end

Expand Down

0 comments on commit a93fd40

Please sign in to comment.