Skip to content

Commit 0a2dafc

Browse files
authored
Fix flaky family requests system spec (#4867)
* Fix flaky family requests system spec * Fix flaky system partners children spec
1 parent cc3d1fd commit 0a2dafc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/system/partners/children_system_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
expect(page).to have_text("Child Last Name")
3131
expect(page).to have_text("01234")
3232
expect(page).to have_text("Some Comment")
33-
expect(page).to have_text("Item 1, Item 2")
33+
expect(page).to have_text(/Item 1, Item 2|Item 2, Item 1/) # order of items requested not guaranteed
3434
end
3535
end
3636
end

spec/system/partners/family_requests_system_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
within("table tbody tr", text: "Main Items1") do |row|
3030
expect(row).to have_css("td", text: "Main Family")
3131
expect(row).to have_css("td", text: "Main Items1")
32-
expect(row).to have_css("td", text: "Item 1, Item 2")
32+
expect(row).to have_css("td", text: /Item 1, Item 2|Item 2, Item 1/) # order of items requested not guaranteed
3333
end
3434

3535
within("table tbody tr", text: "Main Items2") do |row|
3636
expect(row).to have_css("td", text: "Main Family")
3737
expect(row).to have_css("td", text: "Main Items2")
38-
expect(row).to have_css("td", text: "Item 2, Item 3")
38+
expect(row).to have_css("td", text: /Item 2, Item 3|Item 3, Item 2/) # order of items requested not guaranteed
3939
end
4040

4141
within("table tbody tr", text: "Main No Items") do |row|
@@ -47,7 +47,7 @@
4747
within("table tbody tr", text: "Other Items") do |row|
4848
expect(row).to have_css("td", text: "Other Family")
4949
expect(row).to have_css("td", text: "Other Items")
50-
expect(row).to have_css("td", text: "Item 1, Item 2")
50+
expect(row).to have_css("td", text: /Item 1, Item 2|Item 2, Item 1/) # order of items requested not guaranteed
5151
end
5252

5353
within("table tbody tr", text: "Other No Items") do |row|

0 commit comments

Comments
 (0)