From 8b48eeba81b9c793c23a62e6c42c4be6235f8202 Mon Sep 17 00:00:00 2001 From: Jamie B <53781962+JamieB-gu@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:54:41 +0100 Subject: [PATCH] Remove `PrintShopDesign` (#431) We no longer intend to handle this as a separate `Design`. Anything that was previously `PrintShop` will now be one of the other `Design`s. This change will require updates in DCAR and frontend. --- .../utils/CapiModelEnrichment.scala | 3 --- .../com.gu.contentapi.client/utils/format/Design.scala | 1 - .../model/utils/CapiModelEnrichmentTest.scala | 7 ------- 3 files changed, 11 deletions(-) diff --git a/client/src/main/scala/com.gu.contentapi.client/utils/CapiModelEnrichment.scala b/client/src/main/scala/com.gu.contentapi.client/utils/CapiModelEnrichment.scala index dc8000ad..5ba6f0cd 100644 --- a/client/src/main/scala/com.gu.contentapi.client/utils/CapiModelEnrichment.scala +++ b/client/src/main/scala/com.gu.contentapi.client/utils/CapiModelEnrichment.scala @@ -41,8 +41,6 @@ object CapiModelEnrichment { val isGallery: ContentFilter = tagExistsWithId("type/gallery") - val isPrintShop: ContentFilter = content => !isPictureContent(content) && tagExistsWithId("artanddesign/series/guardian-print-shop")(content) - // The date used here is arbitrary and will be moved nearer to the present when the new template feature is ready to be used in production val immersiveInteractiveSwitchoverDate = ZonedDateTime.of(2025, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC) @@ -103,7 +101,6 @@ object CapiModelEnrichment { isFullPageInteractive -> FullPageInteractiveDesign, isInteractive -> InteractiveDesign, tagExistsWithId("info/newsletter-sign-up") -> NewsletterSignupDesign, - isPrintShop -> PrintShopDesign, isGallery -> GalleryDesign, isPictureContent -> PictureDesign, tagExistsWithId("type/audio") -> AudioDesign, diff --git a/client/src/main/scala/com.gu.contentapi.client/utils/format/Design.scala b/client/src/main/scala/com.gu.contentapi.client/utils/format/Design.scala index 6f4cda7e..08006200 100644 --- a/client/src/main/scala/com.gu.contentapi.client/utils/format/Design.scala +++ b/client/src/main/scala/com.gu.contentapi.client/utils/format/Design.scala @@ -23,7 +23,6 @@ case object EditorialDesign extends Design case object QuizDesign extends Design case object InteractiveDesign extends Design case object PhotoEssayDesign extends Design -case object PrintShopDesign extends Design case object ObituaryDesign extends Design case object NewsletterSignupDesign extends Design case object TimelineDesign extends Design diff --git a/client/src/test/scala/com.gu.contentapi.client/model/utils/CapiModelEnrichmentTest.scala b/client/src/test/scala/com.gu.contentapi.client/model/utils/CapiModelEnrichmentTest.scala index c4eed9e4..2f401c1c 100644 --- a/client/src/test/scala/com.gu.contentapi.client/model/utils/CapiModelEnrichmentTest.scala +++ b/client/src/test/scala/com.gu.contentapi.client/model/utils/CapiModelEnrichmentTest.scala @@ -212,13 +212,6 @@ class CapiModelEnrichmentFormatTest extends AnyFlatSpec with MockitoSugar with M behavior of "Format.design" - it should "have a design of 'PrintShopDesign' when tag artanddesign/series/guardian-print-shop is present" in { - val f = fixture - when(f.tag.id) thenReturn "artanddesign/series/guardian-print-shop" - - f.content.design shouldEqual PrintShopDesign - } - it should "have a design of PictureDesign when tag artanddesign/series/guardian-print-shop is present on Picture content" in { val f = fixture when(f.tag.id) thenReturn "artanddesign/series/guardian-print-shop"