Browse Source

Rebase changes

pull/1777/head
Kat 3 years ago
parent
commit
a5465b452c
  1. 10
      spec/requests/sales_logs_controller_spec.rb

10
spec/requests/sales_logs_controller_spec.rb

@ -355,6 +355,10 @@ RSpec.describe SalesLogsController, type: :request do
let!(:included_log) { create(:sales_log, :in_progress, bulk_upload:, owning_organisation: organisation) }
let!(:excluded_log) { create(:sales_log, :in_progress, owning_organisation: organisation) }
before do
create(:bulk_upload_error, bulk_upload:, col: "A", row: 1)
end
it "returns logs only associated with the bulk upload" do
get "/sales-logs?bulk_upload_id[]=#{bulk_upload.id}"
@ -362,9 +366,9 @@ RSpec.describe SalesLogsController, type: :request do
expect(page).not_to have_content(excluded_log.id)
end
it "displays how many logs remaining to fix" do
it "dislays bulk upload banner" do
get "/sales-logs?bulk_upload_id[]=#{bulk_upload.id}"
expect(page).to have_content("You need to fix 1 log")
expect(page).to have_content("Fix the errors from this bulk upload")
end
it "displays filter" do
@ -395,7 +399,7 @@ RSpec.describe SalesLogsController, type: :request do
it "displays card with help info" do
get "/sales-logs?bulk_upload_id[]=#{bulk_upload.id}"
expect(page).to have_content("The following logs are from your recent bulk upload")
expect(page).to have_content("You have uploaded 1 log. There are errors in 1 log and 1 error in total. Select the log to fix the errors.")
end
it "displays meta info about the bulk upload" do

Loading…
Cancel
Save