Class DefaultMulticountryCMSItemFacadeIntegrationTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.cmsfacades.util.BaseIntegrationTest
de.hybris.platform.cmsfacades.cmsitems.impl.DefaultMulticountryCMSItemFacadeIntegrationTest
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest
public class DefaultMulticountryCMSItemFacadeIntegrationTest
extends BaseIntegrationTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic StringFields inherited from class de.hybris.platform.cmsfacades.util.BaseIntegrationTest
springCustomContextLoader, userServiceFields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancomponentsBelongToCatalogVersion(List<String> componentUuids, String catalog, String catalogVersion) Verifies whether the each uuid in the list belongs to provided catalog version.protected ItemSynchronizationDatagetItemSyncData(String uid, String catalogId, String catalogVersion, String itemType) protected Optional<PageContentSlotData>getNewCreatedContentDataSlotForPage(String pageName, String slotUid) Retrieves the list of content slots (PageContentSlotData) for provided page and finds there a slot with provided uid.protected StringConverts uid, catalog and catalog version to uuid.preparePayloadForNewSlot(String slotName, Boolean isSlotCustom, String sourceSlotUUID, CloneAction cloneAction) Prepares payload for a new slotprotected voidsetEnv()Sets the environmentvoidsetUp()voidvoidvoidvoidvoidvoidvoidvoidvoidMethods inherited from class de.hybris.platform.cmsfacades.util.BaseIntegrationTest
setCurrentUser, setCurrentUserCmsEditor, setCurrentUserCmsManagerMethods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Field Details
-
NEWLY_CREATED_SLOT_NAME
-
GLOBAL_SEARCH_BOX_SLOT_ID
-
GLOBAL_SEARCH_BOX_SLOT_POSITION
-
GLOBAL_CATALOG_NAME
-
REGION_CATALOG_NAME
-
LOCAL_CATALOG_NAME
-
LOCAL_HOMEPAGE
-
LOCAL_ANOTHER_PAGE
-
ONLINE_CATALOG_VERSION
-
STAGED_CATALOG_VERSION
-
-
Constructor Details
-
DefaultMulticountryCMSItemFacadeIntegrationTest
public DefaultMulticountryCMSItemFacadeIntegrationTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
shouldCreateCustomSlotForHomePageUk
- Throws:
CMSItemNotFoundException
-
shouldChangePageStatusToCheckAfterCreatingCustomSlot
- Throws:
CMSItemNotFoundException
-
shouldChangePageStatusToCheckAfterCustomSlotIsRemoved
- Throws:
CMSItemNotFoundException
-
getItemSyncData
protected ItemSynchronizationData getItemSyncData(String uid, String catalogId, String catalogVersion, String itemType) -
shouldCreateLocalSlotWithingElectronicsUkCatalog
- Throws:
CMSItemNotFoundException
-
shouldCreateCustomSlotOnTopOfAlreadyCreatedLocalSlotInSameCatalogVersion
public void shouldCreateCustomSlotOnTopOfAlreadyCreatedLocalSlotInSameCatalogVersion() throws CMSItemNotFoundException- Throws:
CMSItemNotFoundException
-
shouldCreateEmptyCustomSlot
- Throws:
CMSItemNotFoundException
-
shouldCreateEmptyLocalSlot
- 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 uuidscatalog- the catalogcatalogVersion- the catalog version- Returns:
- true if all uuids belongs to provided catalog version, false otherwise.
-
getUuid
Converts uid, catalog and catalog version to uuid.- Parameters:
uid- the id of the itemcatalogId- the catalogcatalogVersion- 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 nameisSlotCustom- whether the slot is custom or not (local)sourceSlotUUID- the source slot that will be overriddencloneAction- 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
-