From d707e52fc59c722348f6b58fbd9747b323c2f296 Mon Sep 17 00:00:00 2001 From: Georges Lebreton <102960844+Georges-GNM@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:23:20 +0000 Subject: [PATCH] Add aspect ratio test --- .../scala/com/gu/facia/api/models/CollectionTest.scala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fapi-client/src/test/scala/com/gu/facia/api/models/CollectionTest.scala b/fapi-client/src/test/scala/com/gu/facia/api/models/CollectionTest.scala index 4b821607..6037c33c 100644 --- a/fapi-client/src/test/scala/com/gu/facia/api/models/CollectionTest.scala +++ b/fapi-client/src/test/scala/com/gu/facia/api/models/CollectionTest.scala @@ -473,5 +473,13 @@ class CollectionTest extends AnyFreeSpec with Matchers with MockitoSugar with On ) FaciaContentUtils.headline(FaciaContentUtils.supporting(result.head).head) should be ("straight banana") } + "AspectRatio.getAspectRatio" in { + val defaultCollectionType = collectionConfig.collectionType + + CollectionConfig.AspectRatio.getAspectRatio("scrollable/feature") should be (CollectionConfig.AspectRatio.Portrait45) + CollectionConfig.AspectRatio.getAspectRatio("scrollable/small") should be (CollectionConfig.AspectRatio.Landscape54) + CollectionConfig.AspectRatio.getAspectRatio("scrollable/highlights") should be (CollectionConfig.AspectRatio.Square) + CollectionConfig.AspectRatio.getAspectRatio(defaultCollectionType) should be (CollectionConfig.AspectRatio.Landscape53) + } } }