use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TeaserImplTest method testTeaserWithHiddenLinks.
@Test
protected void testTeaserWithHiddenLinks() {
Teaser teaser = getTeaserUnderTest(TEASER_5, Teaser.PN_TITLE_LINK_HIDDEN, true, Teaser.PN_IMAGE_LINK_HIDDEN, true);
Utils.testJSONExport(teaser, Utils.getTestExporterJSONPath(testBase, "teaser7"));
}
use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TeaserImplTest method testTeaserWithActionsDisabled.
@Test
protected void testTeaserWithActionsDisabled() {
Teaser teaser = getTeaserUnderTest(TEASER_7, Teaser.PN_ACTIONS_DISABLED, true);
Utils.testJSONExport(teaser, Utils.getTestExporterJSONPath(testBase, "teaser10"));
}
use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TeaserImplTest method testTeaserWithTitleNotFromLinkedPageAndNoActions.
@Test
void testTeaserWithTitleNotFromLinkedPageAndNoActions() {
Teaser teaser = getTeaserUnderTest(TEASER_10);
assertEquals("Teaser", teaser.getTitle());
assertTrue(teaser.getActions().isEmpty());
}
use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TeaserImplTest method testTeaserWithActions.
@Test
protected void testTeaserWithActions() {
Teaser teaser = getTeaserUnderTest(TEASER_7);
assertTrue(teaser.isActionsEnabled(), "Expected teaser with actions");
assertEquals(2, teaser.getActions().size(), "Expected to find two actions");
ListItem action = teaser.getActions().get(0);
assertEquals("http://www.adobe.com", action.getPath(), "Action link does not match");
assertEquals("Adobe", action.getTitle(), "Action text does not match");
Utils.testJSONExport(teaser, Utils.getTestExporterJSONPath(testBase, "teaser9"));
}
use of com.adobe.cq.wcm.core.components.models.Teaser in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TeaserImplTest method testPageInheritedProperties.
@Test
protected void testPageInheritedProperties() {
Teaser teaser = getTeaserUnderTest(TEASER_6);
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 <page properties>", teaser.getDescription());
}
Aggregations