use of com.adobe.cq.wcm.core.components.models.Title in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleImplTest method testTitleWithLinksDisabled.
@Test
protected void testTitleWithLinksDisabled() {
Utils.enableDataLayer(context, true);
Title title = getTitleUnderTest(TITLE_RESOURCE_JCR_TITLE_LINK_V2, Title.PN_TITLE_LINK_DISABLED, true);
Utils.testJSONExport(title, Utils.getTestExporterJSONPath(testBase, "title-linkdisabled"));
}
use of com.adobe.cq.wcm.core.components.models.Title in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleImplTest method testGetLink.
@Test
protected void testGetLink() {
Title title = getTitleUnderTest(TITLE_RESOURCE_JCR_TITLE_LINK_V2);
assertValidLink(title.getLink(), "https://www.adobe.com", "World", "World title");
Utils.testJSONExport(title, Utils.getTestExporterJSONPath(testBase, TITLE_RESOURCE_JCR_TITLE_LINK_V2));
}
use of com.adobe.cq.wcm.core.components.models.Title in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleImplTest method testGetLinkUrl.
@Test
@SuppressWarnings("deprecation")
protected void testGetLinkUrl() {
Title title = getTitleUnderTest(TITLE_RESOURCE_JCR_TITLE_LINK_V2);
assertEquals("https://www.adobe.com", title.getLinkURL());
Utils.testJSONExport(title, Utils.getTestExporterJSONPath(testBase, TITLE_RESOURCE_JCR_TITLE_LINK_V2));
}
use of com.adobe.cq.wcm.core.components.models.Title in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleImplTest method testGetLinkFromRedirectChain.
@Test
protected void testGetLinkFromRedirectChain() {
Title title = getTitleUnderTest(TITLE_RESOURCE_TITLE_REDIRECT_CHAIN);
assertValidLink(title.getLink(), "/content/title/redirect/redirect-page-3.html", "Should Redirect to Page 3 (accessibility label)", "Should Redirect to Page 3 (title)");
Utils.testJSONExport(title, Utils.getTestExporterJSONPath(testBase, TITLE_RESOURCE_TITLE_REDIRECT_CHAIN));
}
use of com.adobe.cq.wcm.core.components.models.Title in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleImplTest method testGetLinkFromRedirectToExternalURL.
@Test
protected void testGetLinkFromRedirectToExternalURL() {
Title title = getTitleUnderTest(TITLE_RESOURCE_TITLE_REDIRECT_EXTERNAL_URL);
assertValidLink(title.getLink(), "https://www.adobe.com", "Adobe", "Adobe title");
Utils.testJSONExport(title, Utils.getTestExporterJSONPath(testBase, TITLE_RESOURCE_TITLE_REDIRECT_EXTERNAL_URL));
}
Aggregations