use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testUndefinedXFInPageWithoutLocalization.
/**
* No localization structure
* XF component is defined in the page
* fragmentVariationPath is undefined
*/
@Test
void testUndefinedXFInPageWithoutLocalization() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(NO_LOC_PAGE + "/jcr:content/root/xf-component-2");
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf2"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testValidXFInTemplateWithLocalizationWithDifferentCountry_Language.
/**
* Site with country_language localization
* XF component is defined in the template
* XF component points to a different country_language branch as the page
*/
@Test
void testValidXFInTemplateWithLocalizationWithDifferentCountry_Language() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-41a", CH_FR_PAGE);
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf41a"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testUndefinedXFInTemplateWithLocalizationWithDifferentCountry_Language.
/**
* Site with country_language localization
* XF component is defined in the template
* fragmentVariationPath is undefined
*/
@Test
void testUndefinedXFInTemplateWithLocalizationWithDifferentCountry_Language() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-42a", CH_FR_PAGE);
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf42a"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testNestedXFs.
/**
* Nested XFs
*/
@Test
void testNestedXFs() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-72", LIVECOPY_PAGE);
assertEquals("parent", experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf72"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testValidXFInTemplateWithLocalizationWithDifferentCountrySiteLanguage.
/**
* Site with country-language localization (optional): eu/mysite/en
* XF component is defined in the template
* XF component points to a different country-language branch as the page
*/
@Test
void testValidXFInTemplateWithLocalizationWithDifferentCountrySiteLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-31a", CH_MYSITE_FR_PAGE);
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf31a"));
}
Aggregations