Search in sources :

Example 11 with NavigationItem

use of com.adobe.cq.wcm.core.components.models.NavigationItem in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class LanguageNavigationImplTest method testLanguageNavigationItemsStructureDepthContentPolicy.

@Test
protected void testLanguageNavigationItemsStructureDepthContentPolicy() {
    context.contentPolicyMapping(resourceType, "siteRoot", "/content/languagenavigation", "structureDepth", 2);
    LanguageNavigation languageNavigation = getLanguageNavigationUnderTest(NAVIGATION_ROOT + "/LOCALE-1/LOCALE-5/about/jcr:content/root/languagenavigation-component-3");
    List<NavigationItem> items = getLanguageNavigationItems(languageNavigation);
    verifyLanguageNavigationItems(EXPECTED_PAGES_DEPTH_2, items);
    Utils.testJSONExport(languageNavigation, Utils.getTestExporterJSONPath(testBase, "languagenavigation3"));
}
Also used : LanguageNavigation(com.adobe.cq.wcm.core.components.models.LanguageNavigation) LanguageNavigationItem(com.adobe.cq.wcm.core.components.models.LanguageNavigationItem) NavigationItem(com.adobe.cq.wcm.core.components.models.NavigationItem) Test(org.junit.jupiter.api.Test)

Example 12 with NavigationItem

use of com.adobe.cq.wcm.core.components.models.NavigationItem in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class LanguageNavigationImplTest method testLanguageNavigationItemsStructureDepth.

@Test
protected void testLanguageNavigationItemsStructureDepth() {
    LanguageNavigation languageNavigation = getLanguageNavigationUnderTest(NAVIGATION_ROOT + "/LOCALE-1/LOCALE-5/about/jcr:content/root/languagenavigation-component-2");
    List<NavigationItem> items = getLanguageNavigationItems(languageNavigation);
    verifyLanguageNavigationItems(EXPECTED_PAGES_DEPTH_2, items);
    Utils.testJSONExport(languageNavigation, Utils.getTestExporterJSONPath(testBase, "languagenavigation2"));
}
Also used : LanguageNavigation(com.adobe.cq.wcm.core.components.models.LanguageNavigation) LanguageNavigationItem(com.adobe.cq.wcm.core.components.models.LanguageNavigationItem) NavigationItem(com.adobe.cq.wcm.core.components.models.NavigationItem) Test(org.junit.jupiter.api.Test)

Aggregations

NavigationItem (com.adobe.cq.wcm.core.components.models.NavigationItem)12 Test (org.junit.jupiter.api.Test)6 LanguageNavigationItem (com.adobe.cq.wcm.core.components.models.LanguageNavigationItem)5 LanguageNavigation (com.adobe.cq.wcm.core.components.models.LanguageNavigation)4 Page (com.day.cq.wcm.api.Page)3 Page (com.adobe.cq.wcm.core.components.models.Page)2 ArrayList (java.util.ArrayList)2 PageFilter (com.day.cq.wcm.api.PageFilter)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1