Class DefaultMulticountryCMSItemFacadeIntegrationTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class DefaultMulticountryCMSItemFacadeIntegrationTest extends BaseIntegrationTest
  • Field Details

    • NEWLY_CREATED_SLOT_NAME

      public static String NEWLY_CREATED_SLOT_NAME
    • GLOBAL_SEARCH_BOX_SLOT_ID

      public static String GLOBAL_SEARCH_BOX_SLOT_ID
    • GLOBAL_SEARCH_BOX_SLOT_POSITION

      public static String GLOBAL_SEARCH_BOX_SLOT_POSITION
    • GLOBAL_CATALOG_NAME

      public static String GLOBAL_CATALOG_NAME
    • REGION_CATALOG_NAME

      public static String REGION_CATALOG_NAME
    • LOCAL_CATALOG_NAME

      public static String LOCAL_CATALOG_NAME
    • LOCAL_HOMEPAGE

      public static String LOCAL_HOMEPAGE
    • LOCAL_ANOTHER_PAGE

      public static String LOCAL_ANOTHER_PAGE
    • ONLINE_CATALOG_VERSION

      public static String ONLINE_CATALOG_VERSION
    • STAGED_CATALOG_VERSION

      public static String STAGED_CATALOG_VERSION
  • Constructor Details

    • DefaultMulticountryCMSItemFacadeIntegrationTest

      public DefaultMulticountryCMSItemFacadeIntegrationTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • shouldCreateCustomSlotForHomePageUk

      public void shouldCreateCustomSlotForHomePageUk() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldChangePageStatusToCheckAfterCreatingCustomSlot

      public void shouldChangePageStatusToCheckAfterCreatingCustomSlot() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldChangePageStatusToCheckAfterCustomSlotIsRemoved

      public void shouldChangePageStatusToCheckAfterCustomSlotIsRemoved() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • getItemSyncData

      protected ItemSynchronizationData getItemSyncData(String uid, String catalogId, String catalogVersion, String itemType)
    • shouldCreateLocalSlotWithingElectronicsUkCatalog

      public void shouldCreateLocalSlotWithingElectronicsUkCatalog() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldCreateCustomSlotOnTopOfAlreadyCreatedLocalSlotInSameCatalogVersion

      public void shouldCreateCustomSlotOnTopOfAlreadyCreatedLocalSlotInSameCatalogVersion() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldCreateEmptyCustomSlot

      public void shouldCreateEmptyCustomSlot() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldCreateEmptyLocalSlot

      public void shouldCreateEmptyLocalSlot() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldCreateCustomSlotWithOriginalReferencedComponents

      public void shouldCreateCustomSlotWithOriginalReferencedComponents() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldThrowExceptionWhenTryingToOverrideCustomSlotWithAnotherCustomSlot

      public void shouldThrowExceptionWhenTryingToOverrideCustomSlotWithAnotherCustomSlot() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • componentsBelongToCatalogVersion

      protected boolean componentsBelongToCatalogVersion(List<String> componentUuids, String catalog, String catalogVersion)
      Verifies whether the each uuid in the list belongs to provided catalog version. This method used to verify that compoents were cloned (or referenced) and a new slot.
      Parameters:
      componentUuids - the list of component uuids
      catalog - the catalog
      catalogVersion - the catalog version
      Returns:
      true if all uuids belongs to provided catalog version, false otherwise.
    • getUuid

      protected String getUuid(String uid, String catalogId, String catalogVersion)
      Converts uid, catalog and catalog version to uuid.
      Parameters:
      uid - the id of the item
      catalogId - the catalog
      catalogVersion - the catalog version
      Returns:
      the uuid
    • preparePayloadForNewSlot

      protected Map<String,Object> preparePayloadForNewSlot(String slotName, Boolean isSlotCustom, String sourceSlotUUID, CloneAction cloneAction)
      Prepares payload for a new slot
      Parameters:
      slotName - the slot name
      isSlotCustom - whether the slot is custom or not (local)
      sourceSlotUUID - the source slot that will be overridden
      cloneAction - action that says what to do with components inside (clone, reference, remove)
      Returns:
      the payload for a new slot
    • setEnv

      protected void setEnv()
      Sets the environment
    • getNewCreatedContentDataSlotForPage

      protected Optional<PageContentSlotData> getNewCreatedContentDataSlotForPage(String pageName, String slotUid) throws CMSItemNotFoundException
      Retrieves the list of content slots (PageContentSlotData) for provided page and finds there a slot with provided uid.
      Parameters:
      pageName - the page name for which the list of slots will be retrieved.
      slotUid - the slot id that needs to be in the list of page slots
      Returns:
      the slot that matches the provided uid or nothing. The result is wrapped in Optional.
      Throws:
      CMSItemNotFoundException