Skip to content

Commit

Permalink
Rename Uploading label to Processing for file attachments
Browse files Browse the repository at this point in the history
This is to match the behaviour implemented for images.

It can be confusing when the label reads uploading, but the user
may already be able to see and use the original asset. This helps
clarify that some background processing is still ongoing.
  • Loading branch information
lauraghiorghisor-tw committed Oct 4, 2023
1 parent c1421f8 commit 5d8ddf6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/attachments/_attachments.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<li class="govuk-grid-row">
<div class="govuk-grid-column-full">
<p class="govuk-body">
<strong>Title:</strong> <%= attachment.title %> <% unless attachment.attachment_data.blank? || attachment.attachment_data.all_asset_variants_uploaded? %><span class="govuk-tag govuk-tag--green">Uploading</span><% end %>
<strong>Title:</strong> <%= attachment.title %> <% unless attachment.attachment_data.blank? || attachment.attachment_data.all_asset_variants_uploaded? %><span class="govuk-tag govuk-tag--green">Processing</span><% end %>
</p>
<p class="govuk-body">
<strong>Type: </strong><%= attachment.is_a?(HtmlAttachment) ? attachment.readable_type : attachment.readable_type.capitalize %>
Expand Down
2 changes: 1 addition & 1 deletion features/step_definitions/attachment_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
end

Then(/^the attachments should be in the following order:$/) do |attachment_list|
attachment_names = all("li p:first").map(&:text).map { |t| t.delete_prefix("Title:").chomp("Uploading").strip }
attachment_names = all("li p:first").map(&:text).map { |t| t.delete_prefix("Title:").chomp("Processing").strip }

attachment_list.hashes.each_with_index do |attachment_info, index|
attachment = Attachment.find_by(title: attachment_info[:title])
Expand Down
2 changes: 1 addition & 1 deletion features/step_definitions/consultation_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
end

Then(/^the responses attachments should be in the following order:$/) do |attachment_list|
attachment_names = all("li p:first").map(&:text).map { |t| t.delete_prefix("Title:").chomp("Uploading").strip }
attachment_names = all("li p:first").map(&:text).map { |t| t.delete_prefix("Title:").chomp("Processing").strip }

attachment_list.hashes.each_with_index do |attachment_info, index|
attachment = Attachment.find_by(title: attachment_info[:title])
Expand Down
2 changes: 1 addition & 1 deletion test/functional/admin/attachments_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def self.supported_attachable_types
assert_response :success
assert_select "p.govuk-body", text: "Title: An HTML attachment"
assert_select "p.govuk-body", text: "Title: An uploaded file attachment"
assert_select "p.govuk-body", text: "Title: An uploading file attachment Uploading"
assert_select "p.govuk-body", text: "Title: An uploading file attachment Processing"
assert_select "p.govuk-body", text: "Title: An external attachment"
end

Expand Down

0 comments on commit 5d8ddf6

Please sign in to comment.