Search in sources :

Example 11 with Teaser

use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class TeaserImplTest method testImageFromPage_withCta.

@Test
protected void testImageFromPage_withCta() {
    Teaser teaser = getTeaserUnderTest(TEASER_23);
    Utils.testJSONExport(teaser, Utils.getTestExporterJSONPath(testBase, "teaser23"));
}
Also used : Teaser(com.adobe.cq.wcm.core.components.models.Teaser) Test(org.junit.jupiter.api.Test)

Example 12 with Teaser

use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class TeaserImplTest method testInheritedPageImage_fromTemplate_noLink.

@Test
protected void testInheritedPageImage_fromTemplate_noLink() {
    Teaser teaser = getTeaserUnderTest(TEMPLATE_TEASER_1);
    Utils.testJSONExport(teaser, Utils.getTestExporterJSONPath(testBase, "template_teaser1"));
}
Also used : Teaser(com.adobe.cq.wcm.core.components.models.Teaser) Test(org.junit.jupiter.api.Test)

Example 13 with Teaser

use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class TeaserImplTest method testTeaserWithExternalLinkFromAction.

@Test
@Override
protected void testTeaserWithExternalLinkFromAction() {
    Teaser teaser = getTeaserUnderTest(TEASER_7);
    assertEquals("http://www.adobe.com", teaser.getActions().get(0).getURL());
}
Also used : Teaser(com.adobe.cq.wcm.core.components.models.Teaser) Test(org.junit.jupiter.api.Test)

Example 14 with Teaser

use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class TeaserImplTest method testTeaserWithTitleAndDescriptionFromCurrentPage.

@Test
protected void testTeaserWithTitleAndDescriptionFromCurrentPage() {
    Teaser teaser = getTeaserUnderTest(TEASER_25);
    assertEquals("Teasers Test", teaser.getTitle());
    // < and > are expected escaped, because the page properties provide only a plain text field for the page description
    assertEquals("Teasers description from &lt;page properties&gt;", teaser.getDescription());
    Utils.testJSONExport(teaser, Utils.getTestExporterJSONPath(testBase, "teaser25"));
}
Also used : Teaser(com.adobe.cq.wcm.core.components.models.Teaser) Test(org.junit.jupiter.api.Test)

Example 15 with Teaser

use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class TeaserImplTest method testInheritedPageImage_fromTemplate_withCTAs.

@Test
protected void testInheritedPageImage_fromTemplate_withCTAs() {
    Teaser teaser = getTeaserUnderTest(TEMPLATE_TEASER_3);
    Utils.testJSONExport(teaser, Utils.getTestExporterJSONPath(testBase, "template_teaser3"));
}
Also used : Teaser(com.adobe.cq.wcm.core.components.models.Teaser) Test(org.junit.jupiter.api.Test)

Aggregations

Teaser (com.adobe.cq.wcm.core.components.models.Teaser)37 Test (org.junit.jupiter.api.Test)35 ListItem (com.adobe.cq.wcm.core.components.models.ListItem)4 Link (com.adobe.cq.wcm.core.components.commons.link.Link)3 Resource (org.apache.sling.api.resource.Resource)3 Image (com.adobe.cq.wcm.core.components.models.Image)2 Page (com.day.cq.wcm.api.Page)2 PageManager (com.day.cq.wcm.api.PageManager)2 ValueMap (org.apache.sling.api.resource.ValueMap)2 LinkHandler (com.adobe.cq.wcm.core.components.internal.link.LinkHandler)1 LinkTestUtils.assertValidLink (com.adobe.cq.wcm.core.components.internal.link.LinkTestUtils.assertValidLink)1 CoreResourceWrapper (com.adobe.cq.wcm.core.components.internal.resource.CoreResourceWrapper)1 ExperienceFragment (com.adobe.cq.wcm.core.components.models.ExperienceFragment)1 ComponentUtils (com.adobe.cq.wcm.core.components.util.ComponentUtils)1 DownloadResource (com.day.cq.commons.DownloadResource)1 ImageResource (com.day.cq.commons.ImageResource)1 Template (com.day.cq.wcm.api.Template)1 Designer (com.day.cq.wcm.api.designer.Designer)1 Style (com.day.cq.wcm.api.designer.Style)1 AllowedComponentList (com.day.cq.wcm.foundation.AllowedComponentList)1