use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testValidXFInPageWithLocalizationWithSameLanguage.
/* ------------------------------- Tests for a site with language localization (/en) -------------------------- */
/**
* Site with language localization
* XF component is defined in the page
* XF component points to the same language branch as the page
*/
@Test
void testValidXFInPageWithLocalizationWithSameLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(EN_PAGE + "/jcr:content/root/xf-component-10");
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf10"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testValidXFInTemplateWithLocalizationWithDifferentCountryLanguage.
/**
* 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 testValidXFInTemplateWithLocalizationWithDifferentCountryLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-21a", US_EN_PAGE);
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf21a"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testUndefinedXFInPageWithLocalizationWithDifferentCountryLanguage.
/**
* Site with country-language localization
* XF component is defined in the page
* fragmentVariationPath is undefined
*/
@Test
void testUndefinedXFInPageWithLocalizationWithDifferentCountryLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(US_EN_PAGE + "/jcr:content/root/xf-component-22");
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf22"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
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"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testValidXFInTemplateWithLocalizationWithSameCountry_Language.
/**
* Site with country_language localization
* XF component is defined in the template
* XF component points to the same country_language branch as the page
*/
@Test
void testValidXFInTemplateWithLocalizationWithSameCountry_Language() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-40a", CH_FR_PAGE);
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf40a"));
}
Aggregations