Skip to content

Commit

Permalink
Fix flakey test
Browse files Browse the repository at this point in the history
Sometimes "FE" ends up in the claim reference and so is visible in the
tabble more than twice. To fix this we need to specifically look in the
policy short names column.
  • Loading branch information
rjlynch committed Sep 25, 2024
1 parent 5451ece commit 8f932b3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/features/admin/admin_claims_filtering_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@

click_on "View claims"

expect(page.find("table")).to have_content("ECP").exactly(10).times
expect(page.find("table")).to have_content("TSLR").exactly(7).times
expect(page.find("table")).to have_content("STRI").exactly(2).times
expect(page.find("table")).to have_content("FE").exactly(2).times
policy_names = page.all("table tr td:nth-of-type(3)").map(&:text)

expect(policy_names).to include("ECP").exactly(10).times
expect(policy_names).to include("TSLR").exactly(7).times
expect(policy_names).to include("STRI").exactly(2).times
expect(policy_names).to include("FE").exactly(2).times

click_on "View claims"
select "Student Loans", from: "policy"
Expand Down

0 comments on commit 8f932b3

Please sign in to comment.