|
29 | 29 | within("table tbody tr", text: "Main Items1") do |row| |
30 | 30 | expect(row).to have_css("td", text: "Main Family") |
31 | 31 | 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 |
33 | 33 | end |
34 | 34 |
|
35 | 35 | within("table tbody tr", text: "Main Items2") do |row| |
36 | 36 | expect(row).to have_css("td", text: "Main Family") |
37 | 37 | 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 |
39 | 39 | end |
40 | 40 |
|
41 | 41 | within("table tbody tr", text: "Main No Items") do |row| |
|
47 | 47 | within("table tbody tr", text: "Other Items") do |row| |
48 | 48 | expect(row).to have_css("td", text: "Other Family") |
49 | 49 | 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 |
51 | 51 | end |
52 | 52 |
|
53 | 53 | within("table tbody tr", text: "Other No Items") do |row| |
|
0 commit comments