From 7186526dc6681a36364512011bcd439c8e8cd1fe Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Mon, 19 Sep 2022 09:26:34 +0200 Subject: [PATCH] Fix block too long warnings --- .../reports/orders_and_fulfillment_spec.rb | 99 +++---------------- 1 file changed, 13 insertions(+), 86 deletions(-) diff --git a/spec/system/admin/reports/orders_and_fulfillment_spec.rb b/spec/system/admin/reports/orders_and_fulfillment_spec.rb index 58f1b9f17b..e3cac7f345 100644 --- a/spec/system/admin/reports/orders_and_fulfillment_spec.rb +++ b/spec/system/admin/reports/orders_and_fulfillment_spec.rb @@ -311,47 +311,12 @@ 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 Small, S", - "Distributor Name", - "7", - "10.0", - "70.0", - "UPS Ground" - ]) - expect(table[1]).to eq([ - "", - "", - "", - "TOTAL", - "7", - "", - "70.0", - "" - ]) - expect(table[2]).to eq([ - "Supplier Name", - "Baked Beans", - "1g Big, S", - "Distributor Name", - "3", - "10.0", - "30.0", - "UPS Ground" - ]) - - expect(table[3]).to eq([ - "", - "", - "", - "TOTAL", - "3", - "", - "30.0", - "" - ]) + expect(table[0]).to eq(["Supplier Name", "Baked Beans", "1g Small, S", + "Distributor Name", "7", "10.0", "70.0", "UPS Ground"]) + expect(table[1]).to eq(["", "", "", "TOTAL", "7", "", "70.0", ""]) + expect(table[2]).to eq(["Supplier Name", "Baked Beans", "1g Big, S", + "Distributor Name", "3", "10.0", "30.0", "UPS Ground"]) + expect(table[3]).to eq(["", "", "", "TOTAL", "3", "", "30.0", ""]) end end @@ -446,51 +411,13 @@ 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([ - "Distributor Name", - "Another Supplier Name", - "Salted Peanuts", - "1g Bag, S", - "2", - "10.0", - "20.0", - "", - "UPS Ground" - ]) - expect(table[1]).to eq([ - "Distributor Name", - "Supplier Name", - "Baked Beans", - "1g Small, S", - "3", - "10.0", - "30.0", - "", - "UPS Ground" - ]) - expect(table[2]).to eq([ - "Distributor Name", - "Supplier Name", - "Baked Beans", - "1g Big, S", - "3", - "10.0", - "30.0", - "", - "UPS Ground" - ]) - - expect(table[3]).to eq([ - "", - "", - "", - "", - "", - "TOTAL", - "80.0", - "0.0", - "" - ]) + expect(table[0]).to eq(["Distributor Name", "Another Supplier Name", "Salted Peanuts", + "1g Bag, S", "2", "10.0", "20.0", "", "UPS Ground"]) + expect(table[1]).to eq(["Distributor Name", "Supplier Name", "Baked Beans", + "1g Small, S", "3", "10.0", "30.0", "", "UPS Ground"]) + expect(table[2]).to eq(["Distributor Name", "Supplier Name", "Baked Beans", + "1g Big, S", "3", "10.0", "30.0", "", "UPS Ground"]) + expect(table[3]).to eq(["", "", "", "", "", "TOTAL", "80.0", "0.0", ""]) end end