From 2df93592bd9baa04ea1d3413284738fc0326fe9a Mon Sep 17 00:00:00 2001 From: Mikael Solstad Date: Mon, 18 Sep 2023 09:16:54 +0200 Subject: [PATCH] feat(OrganisationLogo): Add a size option for OrganisationLogo in application metadata (#309) --- src/Altinn.App.Core/Models/Logo.cs | 6 ++++++ test/Altinn.App.Core.Tests/Internal/App/AppMedataTest.cs | 3 ++- .../AppMetadata/logo-org-source.applicationmetadata.json | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Altinn.App.Core/Models/Logo.cs b/src/Altinn.App.Core/Models/Logo.cs index f10846d53..66e03cd87 100644 --- a/src/Altinn.App.Core/Models/Logo.cs +++ b/src/Altinn.App.Core/Models/Logo.cs @@ -21,5 +21,11 @@ public class Logo [JsonProperty(PropertyName = "source")] public string? Source { get; set; } + /// + /// Specifies the size of the logo. Can have the values + /// 'small', 'medium', or 'large' + /// + [JsonProperty(PropertyName = "size")] + public string Size { get; set; } = "small"; } } diff --git a/test/Altinn.App.Core.Tests/Internal/App/AppMedataTest.cs b/test/Altinn.App.Core.Tests/Internal/App/AppMedataTest.cs index e9f9b191c..140da41e2 100644 --- a/test/Altinn.App.Core.Tests/Internal/App/AppMedataTest.cs +++ b/test/Altinn.App.Core.Tests/Internal/App/AppMedataTest.cs @@ -451,7 +451,8 @@ public async Task GetApplicationMetadata_logo_can_intstantiate_with_source_and_D Logo = new Logo { Source = "org", - DisplayAppOwnerNameInHeader = true + DisplayAppOwnerNameInHeader = true, + Size = "medium" }, Features = enabledFrontendFeatures }; diff --git a/test/Altinn.App.Core.Tests/Internal/App/TestData/AppMetadata/logo-org-source.applicationmetadata.json b/test/Altinn.App.Core.Tests/Internal/App/TestData/AppMetadata/logo-org-source.applicationmetadata.json index 8a6c34aff..a9782fe64 100644 --- a/test/Altinn.App.Core.Tests/Internal/App/TestData/AppMetadata/logo-org-source.applicationmetadata.json +++ b/test/Altinn.App.Core.Tests/Internal/App/TestData/AppMetadata/logo-org-source.applicationmetadata.json @@ -35,6 +35,7 @@ }, "logo": { "displayAppOwnerNameInHeader": true, - "source": "org" + "source": "org", + "size": "medium" } }