use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testValidXFInPageWithLocalizationWithSameCountry_Language.
/* ------------------------------- Tests for a site with country_language localization (ch_fr) ----------------- */
/**
* Site with country_language localization
* XF component is defined in the page
* XF component points to the same country_language branch as the page
*/
@Test
void testValidXFInPageWithLocalizationWithSameCountry_Language() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(CH_FR_PAGE + "/jcr:content/root/xf-component-40");
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf40"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testValidXFInPageWithLocalizationWithSameCountryLanguage.
/* ------------------------------- Tests for a site with country/language localization (us/en) ----------------- */
/**
* Site with country-language localization
* XF component is defined in the page
* XF component points to the same country-language branch as the page
*/
@Test
void testValidXFInPageWithLocalizationWithSameCountryLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(US_EN_PAGE + "/jcr:content/root/xf-component-20");
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf20"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testUndefinedXFInTemplateWithLocalizationWithDifferentCountryLanguage.
/**
* Site with country-language localization
* XF component is defined in the template
* fragmentVariationPath is undefined
*/
@Test
void testUndefinedXFInTemplateWithLocalizationWithDifferentCountryLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-22a", US_EN_PAGE);
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf22a"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testValidXFInTemplateWithLocalizationWithDifferentLanguage.
/**
* Site with language localization
* XF component is defined in the template
* XF component points to a different language branch as the page
*/
@Test
void testValidXFInTemplateWithLocalizationWithDifferentLanguage() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(PRODUCT_PAGE_TEMPLATE + "/structure/jcr:content/xf-component-11a", EN_PAGE);
assertEquals(XF_NAME, experienceFragment.getName());
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf11a"));
}
use of com.adobe.cq.wcm.core.components.models.ExperienceFragment in project aem-core-wcm-components by adobe.
the class ExperienceFragmentImplTest method testUndefinedXFInPageWithLocalization.
/**
* Site with language localization
* XF component is defined in the page
* fragmentVariationPath is undefined
*/
@Test
void testUndefinedXFInPageWithLocalization() {
ExperienceFragment experienceFragment = getExperienceFragmentUnderTest(EN_PAGE + "/jcr:content/root/xf-component-12");
Utils.testJSONExport(experienceFragment, Utils.getTestExporterJSONPath(TEST_BASE, "xf12"));
}
Aggregations