Search in sources :

Example 21 with PropertiesPage

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);
}
Also used : CoralMultiField(com.adobe.cq.testing.selenium.pagewidgets.coral.CoralMultiField) PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage) AdvancedTab(com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab)

Example 22 with PropertiesPage

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);
}
Also used : PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)

Example 23 with PropertiesPage

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;
}
Also used : HashMap(java.util.HashMap) PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage) PageEditorPage(com.adobe.cq.testing.selenium.pageobject.PageEditorPage)

Aggregations

PropertiesPage (com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)23 AdvancedTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab)4 CoralCheckbox (com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox)3 PermissionsTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.PermissionsTab)3 CoralMultiField (com.adobe.cq.testing.selenium.pagewidgets.coral.CoralMultiField)2 AutoCompleteField (com.adobe.cq.testing.selenium.pagewidgets.cq.AutoCompleteField)2 RolloutDialog (com.adobe.cq.testing.selenium.pagewidgets.cq.RolloutDialog)2 ElementsCollection (com.codeborne.selenide.ElementsCollection)2 PageEditorPage (com.adobe.cq.testing.selenium.pageobject.PageEditorPage)1 Dialog (com.adobe.cq.testing.selenium.pagewidgets.coral.Dialog)1 BlueprintTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.BlueprintTab)1 CloudServicesTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.CloudServicesTab)1 ImageTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.ImageTab)1 LiveCopyTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.LiveCopyTab)1 SocialMediaTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.SocialMediaTab)1 ThumbnailTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.ThumbnailTab)1 HashMap (java.util.HashMap)1 JsonNode (org.codehaus.jackson.JsonNode)1