diff --git a/Gemfile.lock b/Gemfile.lock index b0c35ac95..15788014c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -179,7 +179,8 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - ffi (1.15.5) + ffi (1.17.0) + ffi (1.17.0-x86_64-linux-gnu) font-awesome-rails (4.7.0.8) railties (>= 3.2, < 8.0) foreman (0.87.2) diff --git a/app/graphql/types/partner_type.rb b/app/graphql/types/partner_type.rb index 77201a698..2f5371533 100644 --- a/app/graphql/types/partner_type.rb +++ b/app/graphql/types/partner_type.rb @@ -32,11 +32,14 @@ class PartnerType < Types::BaseObject description: 'The URL provided by the partner for users to find out more info' field :twitter_url, String, - description: 'The URL to the partner\'s Twitter profile' + description: "Full URL for partner's Twitter / X profile" field :facebook_url, String, method: :facebook_link, - description: 'The URL of the partner\'s Facebook page' + description: "Full URL of partner's Facebook page" + + field :instagram_url, String, + description: "Full URL of partner's instagram page" field :areas_served, [NeighbourhoodType], method: :service_area_neighbourhoods, diff --git a/app/models/partner.rb b/app/models/partner.rb index 361231195..a77d6ac9a 100644 --- a/app/models/partner.rb +++ b/app/models/partner.rb @@ -288,6 +288,10 @@ def twitter_url "https://twitter.com/#{twitter_handle}" if twitter_handle.present? end + def instagram_url + "https://instagram.com/#{instagram_handle}" if instagram_handle.present? + end + def logo_url image&.url end diff --git a/collections/All Partners.bru b/collections/All Partners.bru index bb23aaaf7..b192f3593 100644 --- a/collections/All Partners.bru +++ b/collections/All Partners.bru @@ -23,6 +23,7 @@ body:graphql { url twitterUrl facebookUrl + instagramUrl } } } diff --git a/collections/Partner by ID.bru b/collections/Partner by ID.bru index 65d5c4120..d56b3f591 100644 --- a/collections/Partner by ID.bru +++ b/collections/Partner by ID.bru @@ -22,6 +22,7 @@ body:graphql { url twitterUrl facebookUrl + instagramUrl } } diff --git a/test/integration/graphql/partners_integration_test.rb b/test/integration/graphql/partners_integration_test.rb index 909c1987c..6e7a6238b 100644 --- a/test/integration/graphql/partners_integration_test.rb +++ b/test/integration/graphql/partners_integration_test.rb @@ -127,8 +127,9 @@ def check_basic_fields(data, partner) assert_field_equals data, 'description', value: partner.description assert_field_equals data, 'accessibilitySummary', value: partner.accessibility_info assert_field_equals data, 'url', value: partner.url - assert_field_equals data, 'twitterUrl', value: "https://twitter.com/#{partner.twitter_handle}" + assert_field_equals data, 'twitterUrl', value: partner.twitter_url assert_field_equals data, 'facebookUrl', value: partner.facebook_link + assert_field_equals data, 'instagramUrl', value: partner.instagram_url # see note below # assert_field_equals data, 'logo', value: partner.image.url @@ -155,6 +156,7 @@ def check_basic_fields(data, partner) url twitterUrl facebookUrl + instagramUrl address { streetAddress