Skip to content

Commit

Permalink
Include logo in worldwide organisation links
Browse files Browse the repository at this point in the history
When a worldwide organisation is included as a link, we don't currently
include the logo. This will be needed so we can include the correctly
formatted name in the worldwide office header.
  • Loading branch information
brucebolt committed Jan 2, 2024
1 parent 2660bae commit cd600c0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
]
},
"details": {
"logo": {
"crest": "single-identity",
"formatted_title": "British Embassy<br/>Manila"
},
"world_location_names": [
{
"content_id": "5e9f1506-7706-11e4-a3cb-005056011aef",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
]
},
"details": {
"logo": {
"crest": "single-identity",
"formatted_title": "British Embassy<br/>Manila"
},
"world_location_names": [
{
"content_id": "5e9f1506-7706-11e4-a3cb-005056011aef",
Expand Down
2 changes: 1 addition & 1 deletion lib/expansion_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def details_fields(*fields)
TRAVEL_ADVICE_FIELDS = (DEFAULT_FIELDS + details_fields(:country, :change_description)).freeze
WORLD_LOCATION_FIELDS = %i[content_id title schema_name locale analytics_identifier].freeze
WORLDWIDE_OFFICE_FIELDS = (DEFAULT_FIELDS + details_fields(:access_and_opening_times)).freeze
WORLDWIDE_ORGANISATION_FIELDS = (DEFAULT_FIELDS_AND_DESCRIPTION + details_fields(:world_location_names)).freeze
WORLDWIDE_ORGANISATION_FIELDS = (DEFAULT_FIELDS_AND_DESCRIPTION + details_fields(:logo, :world_location_names)).freeze

CUSTOM_EXPANSION_FIELDS_FOR_PEOPLE = (
%i[
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/expansion_rules_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
let(:travel_advice_fields) { default_fields + [%i[details country], %i[details change_description]] }
let(:world_location_fields) { %i[content_id title schema_name locale analytics_identifier] }
let(:worldwide_office_fields) { default_fields + [%i[details access_and_opening_times]] }
let(:worldwide_organisation_fields) { default_fields_and_description + [%i[details world_location_names]] }
let(:worldwide_organisation_fields) { default_fields_and_description + [%i[details logo]] + [%i[details world_location_names]] }

specify { expect(rules.expansion_fields(:redirect)).to eq([]) }
specify { expect(rules.expansion_fields(:gone)).to eq([]) }
Expand Down

0 comments on commit cd600c0

Please sign in to comment.