diff --git a/app/views/bulk_upload_lettings_results/resume.html.erb b/app/views/bulk_upload_lettings_results/resume.html.erb index a5af1bd9d..15a670b0f 100644 --- a/app/views/bulk_upload_lettings_results/resume.html.erb +++ b/app/views/bulk_upload_lettings_results/resume.html.erb @@ -8,4 +8,4 @@ You’ve completed all the logs that had errors from your bulk upload.

-<%= govuk_button_link_to "Back to all logs", lettings_logs_path, button: true %> +<%= govuk_button_link_to "Return to lettings logs", clear_filters_path(filter_type: "lettings_logs"), button: true %> diff --git a/app/views/bulk_upload_sales_results/resume.html.erb b/app/views/bulk_upload_sales_results/resume.html.erb index f0e243f27..cd5b4a755 100644 --- a/app/views/bulk_upload_sales_results/resume.html.erb +++ b/app/views/bulk_upload_sales_results/resume.html.erb @@ -8,4 +8,4 @@ You’ve completed all the logs that had errors from your bulk upload.

-<%= govuk_button_link_to "Back to all logs", sales_logs_path, button: true %> +<%= govuk_button_link_to "Return to sales logs", clear_filters_path(filter_type: "sales_logs"), button: true %> diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb index 4e4cb96c2..6cf53acc9 100644 --- a/spec/requests/lettings_logs_controller_spec.rb +++ b/spec/requests/lettings_logs_controller_spec.rb @@ -562,6 +562,13 @@ RSpec.describe LettingsLogsController, type: :request do expect(response).to redirect_to(resume_bulk_upload_lettings_result_path(bulk_upload)) end + + it "allows returning to all logs" do + get "/lettings-logs?bulk_upload_id[]=#{bulk_upload.id}" + + follow_redirect! + expect(page).to have_link("Return to lettings logs", href: clear_filters_path(filter_type: "lettings_logs")) + end end end diff --git a/spec/requests/sales_logs_controller_spec.rb b/spec/requests/sales_logs_controller_spec.rb index e4e8322e7..41e3bb1d2 100644 --- a/spec/requests/sales_logs_controller_spec.rb +++ b/spec/requests/sales_logs_controller_spec.rb @@ -438,6 +438,13 @@ RSpec.describe SalesLogsController, type: :request do expect(response).to redirect_to(resume_bulk_upload_sales_result_path(bulk_upload)) end + + it "allows returning to all logs" do + get "/sales-logs?bulk_upload_id[]=#{bulk_upload.id}" + + follow_redirect! + expect(page).to have_link("Return to sales logs", href: clear_filters_path(filter_type: "sales_logs")) + end end end