From cb633a53052b98aca43c5998a9992f6562c385d0 Mon Sep 17 00:00:00 2001 From: Steve Laing Date: Mon, 14 Aug 2023 17:41:22 +0100 Subject: [PATCH] Amend success message and styling --- app/controllers/support_interface/uploads_controller.rb | 2 +- .../uploads/{index.html.erb => success.html.erb} | 6 +++++- config/master.key.bak | 1 + config/routes.rb | 3 ++- .../support_user_uploads_a_csv_file_spec.rb | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) rename app/views/support_interface/uploads/{index.html.erb => success.html.erb} (55%) create mode 100644 config/master.key.bak diff --git a/app/controllers/support_interface/uploads_controller.rb b/app/controllers/support_interface/uploads_controller.rb index e7117973..6fb8b361 100644 --- a/app/controllers/support_interface/uploads_controller.rb +++ b/app/controllers/support_interface/uploads_controller.rb @@ -7,7 +7,7 @@ def new def create @upload_form = UploadForm.new(upload_form_params) if @upload_form.save - redirect_to support_interface_uploads_path + redirect_to support_interface_upload_success_path else render :new end diff --git a/app/views/support_interface/uploads/index.html.erb b/app/views/support_interface/uploads/success.html.erb similarity index 55% rename from app/views/support_interface/uploads/index.html.erb rename to app/views/support_interface/uploads/success.html.erb index b64ae81b..8776070a 100644 --- a/app/views/support_interface/uploads/index.html.erb +++ b/app/views/support_interface/uploads/success.html.erb @@ -1,6 +1,10 @@

Check the Children’s Barred List

-

CSV file uploaded successfully.

+
+

+ Records uploaded +

+
diff --git a/config/master.key.bak b/config/master.key.bak new file mode 100644 index 00000000..d501ef2c --- /dev/null +++ b/config/master.key.bak @@ -0,0 +1 @@ +626d146b0e45c9c4d740f5f7963eb5ba \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 2ac34ff6..0eec25e5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,6 +15,7 @@ mount FeatureFlags::Engine => "/features" - resources :uploads, only: %i[new create index] + resources :uploads, only: %i[new create] + get "/uploads/success", to: "uploads#success", as: :upload_success end end diff --git a/spec/system/support_interface/support_user_uploads_a_csv_file_spec.rb b/spec/system/support_interface/support_user_uploads_a_csv_file_spec.rb index ea475666..b4efb8c5 100644 --- a/spec/system/support_interface/support_user_uploads_a_csv_file_spec.rb +++ b/spec/system/support_interface/support_user_uploads_a_csv_file_spec.rb @@ -27,6 +27,6 @@ def when_i_upload_a_valid_csv_file end def then_i_see_a_success_message - expect(page).to have_content("CSV file uploaded successfully") + expect(page).to have_content("Records uploaded") end end