use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testGetUuidNull.
@Test
protected void testGetUuidNull() {
Image image = getImageUnderTest(IMAGE22_PATH);
assertNull(image.getUuid());
}
use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testDMImageAnimatedGifOnAuthor.
@Test
void testDMImageAnimatedGifOnAuthor() {
context.contentPolicyMapping(ImageImpl.RESOURCE_TYPE, Image.PN_DESIGN_DYNAMIC_MEDIA_ENABLED, true);
context.request().setAttribute(REQUEST_ATTRIBUTE_NAME, WCMMode.EDIT);
Image image = getImageUnderTest(IMAGE40_PATH);
assertTrue(image.isDmImage());
Utils.testJSONExport(image, Utils.getTestExporterJSONPath(TEST_BASE, IMAGE40_PATH + "-on-author"));
}
use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testDMImageWithAutoSmartCropOneSmartSize.
protected void testDMImageWithAutoSmartCropOneSmartSize(String resourceType) {
context.contentPolicyMapping(resourceType, new HashMap<String, Object>() {
{
put(Image.PN_DESIGN_DYNAMIC_MEDIA_ENABLED, true);
put(Image.PN_DESIGN_ALLOWED_RENDITION_WIDTHS, new int[] { 600 });
}
});
Image image = getImageUnderTest(IMAGE38_PATH);
assertTrue(image.isDmImage());
Utils.testJSONExport(image, Utils.getTestExporterJSONPath(testBase, IMAGE38_PATH + "-one-smart-size"));
}
use of com.adobe.cq.wcm.core.components.models.Image in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageImplTest method testGetUuid.
@Test
protected void testGetUuid() {
context.contentPolicyMapping(resourceType, "allowedRenditionWidths", new int[] { 600, 700, 800, 2000, 2500 });
Image image = getImageUnderTest(AbstractImageTest.IMAGE0_PATH);
assertEquals("60a1a56e-f3f4-4021-a7bf-ac7a51f0ffe5", image.getUuid());
Utils.testJSONExport(image, Utils.getTestExporterJSONPath(testBase, AbstractImageTest.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 testDMImageOnAuthor.
protected void testDMImageOnAuthor(String resourceType) {
context.contentPolicyMapping(resourceType, Image.PN_DESIGN_DYNAMIC_MEDIA_ENABLED, true);
context.request().setAttribute(REQUEST_ATTRIBUTE_NAME, WCMMode.EDIT);
Image image = getImageUnderTest(IMAGE32_PATH);
assertTrue(image.isDmImage());
Utils.testJSONExport(image, Utils.getTestExporterJSONPath(testBase, IMAGE32_PATH + "-on-author"));
}
Aggregations