use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ExperienceFragmentImplTest method testValidXFInTemplateLocalizationWithSameLivecopy.
/**
* Site with region localization (current page is a livecopy)
* XF component is defined in the template
* XF component points to the same region branch as the page
*/
@Test
void testValidXFInTemplateLocalizationWithSameLivecopy() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-60a", LIVECOPY_PAGE);
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf60a"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ExperienceFragmentImplTest method testValidXFInPageWithoutLocalization.
/* ------------------------------- Tests for a site with no localization structure ----------------------------- */
/**
* No localization structure
* XF component is defined in the page
* fragmentVariationPath is valid
*/
@Test
void testValidXFInPageWithoutLocalization() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(NO_LOC_PAGE + "/jcr:content/root/xf-component-1");
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf1"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ExperienceFragmentImplTest method testValidXFInPageWithLocalizationWithDifferentLanguage.
/**
* Site with language localization
* XF component is defined in the page
* XF component points to a different language branch as the page
*/
@Test
void testValidXFInPageWithLocalizationWithDifferentLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(EN_PAGE + "/jcr:content/root/xf-component-11");
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf11"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ExperienceFragmentImplTest method testValidXFInTemplateWithLocalizationWithSameLanguage.
/**
* Site with language localization
* XF component is defined in the template
* XF component points to the same language branch as the page
*/
@Test
void testValidXFInTemplateWithLocalizationWithSameLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-10a", EN_PAGE);
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf10a"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ExperienceFragmentImplTest method testValidXFInTemplateWithLocalizationWithSameCountrySiteLanguage.
/**
* Site with country-language localization (optional): eu/mysite/en
* XF component is defined in the template
* XF component points to the same country-language branch as the page
*/
@Test
void testValidXFInTemplateWithLocalizationWithSameCountrySiteLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-30a", CH_MYSITE_FR_PAGE);
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf30a"));
}
Aggregations