use of com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageTests method testAdvancedTemplatesSettingsPageProperties.
public void testAdvancedTemplatesSettingsPageProperties() throws InterruptedException {
// Open properties page
PropertiesPage propertiesPage = new PropertiesPage(testPage);
propertiesPage.open();
// open the Advanced tab
AdvancedTab advancedTab = propertiesPage.clickTab("advanced", AdvancedTab.class);
// add the allowed template
CoralMultiField.MultiFieldItem item = page.addTemplate(advancedTab, allowedTemplate);
// detele the allowed template
page.deleteTemplate(item);
// add again the allowed template
item = page.addTemplate(advancedTab, allowedTemplate);
// save the configuration and open again the page property
propertiesPage.saveAndClose();
Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
propertiesPage.open();
propertiesPage.clickTab("advanced", AdvancedTab.class);
// check the saved template
assertTrue(page.getAllowTemplate(0).equals(allowedTemplate), "Allowed template should be set to " + allowedTemplate);
}
use of com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageTests method testAdvancedExportPageProperties.
public void testAdvancedExportPageProperties() throws InterruptedException {
// Open properties page
PropertiesPage propertiesPage = new PropertiesPage(testPage);
propertiesPage.open();
// open the Advanced tab
propertiesPage.clickTab("advanced", AdvancedTab.class);
// tests for the export options
page.setExportTemplate(exportConfiguration);
// save the configuration and open again the page property
propertiesPage.saveAndClose();
Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
propertiesPage.open();
propertiesPage.clickTab("advanced", AdvancedTab.class);
// check the Export Configuration
assertTrue(page.getExportTemplate().equals(exportConfiguration), "Export Templates should be set to " + exportConfiguration);
}
use of com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ImageTests method setup.
public void setup(CQClient client, String contextPath, String label, String imageRT, String rootPage, String defaultPageTemplate, String clientlibs, BaseImage image) throws ClientException {
// 1.
testPage = client.createPage("testPage", "Test Page Title", rootPage, defaultPageTemplate).getSlingPath();
redirectPage = client.createPage("redirectPage", "Redirect Test Page Title", rootPage, defaultPageTemplate).getSlingPath();
propertiesPage = new PropertiesPage(testPage);
// 2.
String policySuffix = "/structure/page/new_policy";
HashMap<String, String> data = new HashMap<String, String>();
data.put("jcr:title", "New Policy");
data.put("sling:resourceType", "wcm/core/components/policy/policy");
data.put("clientlibs", clientlibs);
String policyPath1 = "/conf/" + label + "/settings/wcm/policies/core-component/components";
policyPath = Commons.createPolicy(client, policySuffix, data, policyPath1);
// 3.
String policyLocation = "core-component/components";
String policyAssignmentPath = defaultPageTemplate + "/policies/jcr:content";
data.clear();
data.put("cq:policy", policyLocation + policySuffix);
data.put("sling:resourceType", "wcm/core/components/policies/mappings");
Commons.assignPolicy(client, "", data, policyAssignmentPath);
// 4.
proxyPath = Commons.createProxyComponent(client, imageRT, Commons.proxyPath, null, null);
// 6.
compPath = Commons.addComponent(client, proxyPath, testPage + Commons.relParentCompPath, "image", null);
// 7.
editorPage = new PageEditorPage(testPage);
editorPage.open();
this.image = image;
this.contextPath = contextPath;
}
Aggregations