Skip to content

Commit

Permalink
Remove emails from accessible format request pilot
Browse files Browse the repository at this point in the history
The pilot scheme is being paused so we are temporarily removing
the participating emails from the attachment component.
  • Loading branch information
edwardkerry committed Mar 16, 2022
1 parent 24ed555 commit 22921e0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

* Migrate cross domain tracking script from static ([PR #2607](https://github.com/alphagov/govuk_publishing_components/pull/2607))
* Update card tracking ([PR #2679](https://github.com/alphagov/govuk_publishing_components/pull/2679))
* Remove accessible format request pilot emails from attachment ([PR](https://github.com/alphagov/govuk_publishing_components/pull/2687))

## 28.9.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ examples:
file_size: 20000
owning_document_content_id: 456_abc
attachment_id: 123
alternative_format_contact_email: [email protected]
alternative_format_contact_email: [email protected]
with_data_attributes:
data:
attachment:
Expand Down
10 changes: 3 additions & 7 deletions lib/govuk_publishing_components/presenters/attachment.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
module GovukPublishingComponents
module Presenters
class Attachment
# DfE, DWP, DHSC, HMRC, DVSA and PHE are taking part in a pilot to use a form
# Various departments are taking part in a pilot to use a form
# rather than direct email for users to request accessible formats. When the pilot
# scheme is rolled out further this can be removed.
EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]].freeze
# Currently the pilot is paused so there are no participants.
EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[[email protected]].freeze

delegate :opendocument?, :document?, :spreadsheet?, to: :content_type

Expand Down
2 changes: 1 addition & 1 deletion spec/components/attachment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def component_name
attachment_id: "123",
owning_document_content_id: "abc_456",
content_type: "application/vnd.oasis.opendocument.spreadsheet",
alternative_format_contact_email: "[email protected]",
alternative_format_contact_email: "[email protected]",
},
)
assert_select "a[href='/contact/govuk/request-accessible-format?content_id=abc_456&attachment_id=123']", text: "Request an accessible format of this document"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,23 +229,23 @@
attachment = described_class.new(
attachment_id: "123",
owning_document_content_id: "456",
alternative_format_contact_email: "[email protected]",
alternative_format_contact_email: "[email protected]",
)
expect(attachment.display_accessible_format_request_form_link?).to be true
end

it "returns false if the attachment id is not provided" do
attachment = described_class.new(
owning_document_content_id: "456",
alternative_format_contact_email: "[email protected]",
alternative_format_contact_email: "[email protected]",
)
expect(attachment.display_accessible_format_request_form_link?).to be false
end

it "returns false if the owning document content id is not provided" do
attachment = described_class.new(
attachment_id: "123",
alternative_format_contact_email: "[email protected]",
alternative_format_contact_email: "[email protected]",
)
expect(attachment.display_accessible_format_request_form_link?).to be false
end
Expand All @@ -254,7 +254,7 @@
attachment = described_class.new(
attachment_id: "123",
owning_document_content_id: "456",
alternative_format_contact_email: "alternative.formats@organisation_not_in_pilot.gov.uk",
alternative_format_contact_email: "[email protected]",
)
expect(attachment.display_accessible_format_request_form_link?).to be false
end
Expand Down

0 comments on commit 22921e0

Please sign in to comment.