Merge pull request #9847 from mkllnk/stable-orders_and_fulfillment_spec

Expect report rows for same product in random order
This commit is contained in:
jibees
2022-10-24 09:57:06 +02:00
committed by GitHub

View File

@@ -205,34 +205,19 @@ describe "Orders And Fulfillment" do
rows = find("table.report__table").all("tbody tr")
table = rows.map { |r| r.all("td").map { |c| c.text.strip } }
expect(table[0]).to eq([
"Supplier Name",
"Baked Beans",
"1g Big, S",
"3",
"0.003",
"10.0",
"30.0"
])
expect(table).to include [
"Supplier Name", "Baked Beans", "1g Big, S",
"3", "0.003", "10.0", "30.0"
]
expect(table[1]).to eq([
"Supplier Name",
"Baked Beans",
"1g Small, S",
"7",
"0.007",
"10.0",
"70.0"
])
expect(table[2]).to eq([
"",
"",
"TOTAL",
"10",
"0.01",
"",
"100.0"
])
expect(table).to include [
"Supplier Name", "Baked Beans", "1g Small, S",
"7", "0.007", "10.0", "70.0"
]
expect(table[2]).to eq [
"", "", "TOTAL",
"10", "0.01", "", "100.0"
]
end
end