use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testInheritedPageImage_pageImageAltValueFromDAM.
@Test
protected void testInheritedPageImage_pageImageAltValueFromDAM() {
Image image = getImageUnderTest(PAGE1_IMAGE0_PATH);
assertEquals("/core/content/test_page1/_jcr_content/root/page1_image0.coreimg.png/1490005239000/adobe-systems-logo-and-wordmark.png", image.getSrc(), "getSrc()");
assertEquals("Adobe Systems Logo and Wordmark in PNG format", image.getAlt(), "getAlt()");
assertEquals("/content/dam/core/images/Adobe_Systems_logo_and_wordmark.png", image.getFileReference(), "getFileReference()");
assertEquals("60a1a56e-f3f4-4021-a7bf-ac7a51f0ffe5", image.getUuid(), "getUuid()");
assertEquals("image-6401b77a35", image.getId(), "getId()");
Utils.testJSONExport(image, Utils.getTestExporterJSONPath(testBase, PAGE1_IMAGE0_PATH));
}
use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testImageWithNoSmartSize.
@Override
@Test
protected void testImageWithNoSmartSize() {
context.contentPolicyMapping(resourceType, "uuidDisabled", true);
Image image = getImageUnderTest(AbstractImageTest.IMAGE4_PATH);
assertArrayEquals(new int[] {}, image.getWidths());
assertTrue(image.isLazyEnabled());
Utils.testJSONExport(image, Utils.getTestExporterJSONPath(testBase, AbstractImageTest.IMAGE4_PATH));
}
use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testGetSrcUriTemplate.
@Test
protected void testGetSrcUriTemplate() {
Image image = getImageUnderTest(AbstractImageTest.IMAGE3_PATH);
assertEquals("/core/content/test/_jcr_content/root/image3.coreimg{.width}.png", image.getSrcUriTemplate());
}
use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testInheritedFeaturedImage_altValueFromImage.
@Test
protected void testInheritedFeaturedImage_altValueFromImage() {
Image image = getImageUnderTest(IMAGE52_PATH);
assertEquals("image52 alt", image.getAlt(), "getAlt()");
assertEquals("/content/dam/core/images/Adobe_Systems_logo_and_wordmark.png", image.getFileReference(), "getFileReference()");
assertEquals("60a1a56e-f3f4-4021-a7bf-ac7a51f0ffe5", image.getUuid(), "getUuid()");
Utils.testJSONExport(image, Utils.getTestExporterJSONPath(testBase, IMAGE52_PATH));
}
use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testInheritedPageImage_pageImageAltValueFromResource.
@Test
protected void testInheritedPageImage_pageImageAltValueFromResource() {
Image image = getImageUnderTest(PAGE2_IMAGE0_PATH);
assertEquals("/core/content/test_page2/_jcr_content/root/page2_image0.coreimg.png/1490005239000/adobe-systems-logo-and-wordmark.png", image.getSrc(), "getSrc()");
assertEquals("featured image alt", image.getAlt(), "getAlt()");
assertEquals("/content/dam/core/images/Adobe_Systems_logo_and_wordmark.png", image.getFileReference(), "getFileReference()");
assertEquals("60a1a56e-f3f4-4021-a7bf-ac7a51f0ffe5", image.getUuid(), "getUuid()");
assertEquals("image-310f56f715", image.getId(), "getId()");
Utils.testJSONExport(image, Utils.getTestExporterJSONPath(testBase, PAGE2_IMAGE0_PATH));
}
Aggregations