From e00a59212cd8b1fe7978ea9a43fe3dba34ed229f Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Wed, 28 Sep 2022 11:49:20 +0100 Subject: [PATCH] Fixes invert columns logic on reports spec --- spec/system/admin/reports_spec.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/reports_spec.rb b/spec/system/admin/reports_spec.rb index 0313861310..a779e1ef44 100644 --- a/spec/system/admin/reports_spec.rb +++ b/spec/system/admin/reports_spec.rb @@ -288,8 +288,14 @@ describe ' expect(page).to have_css(".report__table thead th", text: "20.0% ($)") expect(page).to have_css(".report__table thead th", text: "0.0% ($)") - expect(page).to have_table_row [order1.number, "1446.7", "16.76", "0", "270.08", "286.84", - "1733.54"] + if inverse_columns_logic.eql?("false") + expect(page).to have_table_row [order1.number.to_s, "1446.7", "16.76", "0", "270.08", + "286.84", "1733.54"] + end + if inverse_columns_logic.eql?("true") + expect(page).to have_table_row [order1.number.to_s, "1446.7", "0", "16.76", "270.08", + "286.84", "1733.54"] + end end end