use of com.adobe.cq.wcm.core.components.models.contentfragment.ContentFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ContentFragmentImplTest method structuredVariation.
@Test
void structuredVariation() {
ContentFragment fragment = getModelInstanceUnderTest(CF_STRUCTURED_VARIATION);
assertContentFragment(fragment, VARIATION_NAME, TITLE, DESCRIPTION, STRUCTURED_TYPE, STRUCTURED_NAME, ASSOCIATED_CONTENT, MAIN, SECOND_STRUCTURED);
Utils.testJSONExport(fragment, Utils.getTestExporterJSONPath(TEST_BASE, CF_STRUCTURED_VARIATION));
}
use of com.adobe.cq.wcm.core.components.models.contentfragment.ContentFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ContentFragmentImplTest method textOnlyVariation.
@Test
void textOnlyVariation() {
ContentFragment fragment = getModelInstanceUnderTest(CF_TEXT_ONLY_VARIATION);
assertContentFragment(fragment, VARIATION_NAME, TITLE, DESCRIPTION, TEXT_ONLY_TYPE, TEXT_ONLY_NAME, ASSOCIATED_CONTENT, MAIN, SECOND_TEXT_ONLY);
Utils.testJSONExport(fragment, Utils.getTestExporterJSONPath(TEST_BASE, CF_TEXT_ONLY_VARIATION));
}
use of com.adobe.cq.wcm.core.components.models.contentfragment.ContentFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ContentFragmentImplTest method getParagraphsOfMultiDisplayModeIsNull.
@Test
void getParagraphsOfMultiDisplayModeIsNull() {
// Structure CF has displayMode=multi which should not return paragraphs
ContentFragment fragment = getModelInstanceUnderTest(CF_STRUCTURED);
assertNull(fragment.getParagraphs());
}
use of com.adobe.cq.wcm.core.components.models.contentfragment.ContentFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ContentFragmentImplTest method structuredSingleElement.
@Test
void structuredSingleElement() {
ContentFragment fragment = getModelInstanceUnderTest(CF_STRUCTURED_SINGLE_ELEMENT);
assertContentFragment(fragment, TITLE, DESCRIPTION, STRUCTURED_TYPE, STRUCTURED_NAME, ASSOCIATED_CONTENT, SECOND_STRUCTURED);
Utils.testJSONExport(fragment, Utils.getTestExporterJSONPath(TEST_BASE, CF_STRUCTURED_SINGLE_ELEMENT));
}
use of com.adobe.cq.wcm.core.components.models.contentfragment.ContentFragment in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ContentFragmentImplTest method textOnlyWithVariationGetEditorJSON.
@Test
void textOnlyWithVariationGetEditorJSON() {
ContentFragment fragment = getModelInstanceUnderTest(CF_TEXT_ONLY_VARIATION);
String expectedJSON = "{\"title\":\"Test Content Fragment\",\"path\":\"/content/dam/contentfragments/text-only\"," + "\"variation\":\"teaser\",\"associatedContent\":[{\"title\":\"Test Collection\"" + ",\"path\":\"/content/dam/collections/X/X7v6pJAcy5qtkUdXdIxR/test\"}]}";
assertEquals(fragment.getEditorJSON(), expectedJSON);
}
Aggregations