Skip to content

Commit

Permalink
Amend success message and styling
Browse files Browse the repository at this point in the history
  • Loading branch information
steventux committed Aug 14, 2023
1 parent 29eba1e commit afb5982
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/controllers/support_interface/uploads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions app/views/support_interface/uploads/index.html.erb

This file was deleted.

9 changes: 9 additions & 0 deletions app/views/support_interface/uploads/success.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">
<div class="govuk-panel govuk-panel--confirmation">
<h1 class="govuk-panel__title">
Records uploaded
</h1>
</div>
</div>
</div>
3 changes: 2 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit afb5982

Please sign in to comment.