use of com.adobe.cq.wcm.core.components.models.LanguageNavigation in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class LanguageNavigationImplTest method testLanguageNavigationItemsOnTemplate.
@Test
protected void testLanguageNavigationItemsOnTemplate() {
LanguageNavigation languageNavigation = getLanguageNavigationUnderTest("/conf/coretest/settings/wcm/templates/template-1/structure/jcr:content/root/languagenavigation");
List<NavigationItem> items = getLanguageNavigationItems(languageNavigation);
Object[][] expectedPages = { { "/content/languagenavigation/LOCALE-1", "LOCALE 1", false, 0, "US", "en-US", "/content/languagenavigation/LOCALE-1.html" }, { "/content/languagenavigation/LOCALE-1/LOCALE-5", "LOCALE 5", false, 1, "US", "en-US", "/content/languagenavigation/LOCALE-1/LOCALE-5.html" }, { "/content/languagenavigation/LOCALE-1/LOCALE-6", "LOCALE 6", false, 1, "US", "es-US", "/content/languagenavigation/LOCALE-1/LOCALE-6.html" }, { "/content/languagenavigation/LOCALE-2", "LOCALE 2", false, 0, "CA", "en-CA", "/content/languagenavigation/LOCALE-2.html" }, { "/content/languagenavigation/LOCALE-2/LOCALE-5", "LOCALE 5", false, 1, "CA", "en-CA", "/content/languagenavigation/LOCALE-2/LOCALE-5.html" }, { "/content/languagenavigation/LOCALE-2/LOCALE-7", "LOCALE 7", false, 1, "CA", "fr-CA", "/content/languagenavigation/LOCALE-2/LOCALE-7.html" }, { "/content/languagenavigation/LOCALE-3", "LOCALE 3", false, 0, "CH", "de-CH", "/LOCALE-3-vanity" }, { "/content/languagenavigation/LOCALE-3/LOCALE-8", "LOCALE 8", false, 1, "CH", "de-CH", "/content/languagenavigation/LOCALE-3/LOCALE-8.html" }, { "/content/languagenavigation/LOCALE-4", "LOCALE 4", false, 0, "DE", "de-DE", "/content/languagenavigation/LOCALE-4.html" }, { "/content/languagenavigation/LOCALE-4/LOCALE-9", "LOCALE 9", false, 1, "DE", "de-DE", "/content/languagenavigation/LOCALE-4/LOCALE-9.html" } };
verifyLanguageNavigationItems(expectedPages, items);
}
use of com.adobe.cq.wcm.core.components.models.LanguageNavigation in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class LanguageNavigationImplTest method testLanguageNavigationItems.
@Test
protected void testLanguageNavigationItems() {
LanguageNavigation languageNavigation = getLanguageNavigationUnderTest(NAVIGATION_ROOT + "/LOCALE-1/LOCALE-5/about/jcr:content/root/languagenavigation-component-1");
List<NavigationItem> items = getLanguageNavigationItems(languageNavigation);
verifyLanguageNavigationItems(EXPECTED_PAGES_DEPTH_1, items);
Utils.testJSONExport(languageNavigation, Utils.getTestExporterJSONPath(testBase, "languagenavigation1"));
}
use of com.adobe.cq.wcm.core.components.models.LanguageNavigation in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class LanguageNavigationImplTest method testLanguageNavigationItemsNoRoot.
@Test
protected void testLanguageNavigationItemsNoRoot() {
LanguageNavigation languageNavigation = getLanguageNavigationUnderTest(NAVIGATION_ROOT + "/LOCALE-1/LOCALE-5/about/jcr:content/root/languagenavigation-component-4");
assertEquals(0, languageNavigation.getItems().size(), "Didn't expect any language navigation items.");
Utils.testJSONExport(languageNavigation, Utils.getTestExporterJSONPath(testBase, "languagenavigation4"));
}
use of com.adobe.cq.wcm.core.components.models.LanguageNavigation 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"));
}
use of com.adobe.cq.wcm.core.components.models.LanguageNavigation 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"));
}
Aggregations