From 0f393db7fdaf4bdf06d4390b346c7da983800e75 Mon Sep 17 00:00:00 2001 From: Mohamed ABDELLANI Date: Mon, 23 Oct 2023 16:34:50 +0100 Subject: [PATCH] fix existing tests --- spec/system/admin/order_spec.rb | 3 ++- spec/system/admin/orders/invoices_spec.rb | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/spec/system/admin/order_spec.rb b/spec/system/admin/order_spec.rb index bc398e76734e..2af72ae807a7 100644 --- a/spec/system/admin/order_spec.rb +++ b/spec/system/admin/order_spec.rb @@ -1062,10 +1062,11 @@ def serching_for_customers ].join(" ").upcase } + let(:invoice_number){ "#{order.distributor_id}-1" } let(:table_contents) { [ Invoice.first.created_at.strftime('%B %d, %Y').to_s, - "1", + invoice_number, "0.0", "Active", "Download" diff --git a/spec/system/admin/orders/invoices_spec.rb b/spec/system/admin/orders/invoices_spec.rb index 8440ad83f41f..ae7909f33c83 100644 --- a/spec/system/admin/orders/invoices_spec.rb +++ b/spec/system/admin/orders/invoices_spec.rb @@ -171,10 +171,13 @@ describe 'listing invoices' do let(:date){ Time.current.to_date } + let(:first_invoice){ "#{distributor.id}-1" } + let(:second_invoice){ "#{distributor.id}-2" } + let(:row1){ [ I18n.l(date, format: :long), - "2", + second_invoice, order.total, "Active", "Download" @@ -184,7 +187,7 @@ let(:row2){ [ I18n.l(date, format: :long), - "1", + first_invoice, order.total, "Cancelled", "Download"