Search in sources :

Example 6 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 testAdvancedSettingsPageProperties.

public void testAdvancedSettingsPageProperties() throws InterruptedException {
    // Open properties page
    PropertiesPage propertiesPage = new PropertiesPage(testPage);
    propertiesPage.open();
    // open the Advanced tab
    AdvancedTab advancedTab = propertiesPage.clickTab("advanced", AdvancedTab.class);
    // set the language
    advancedTab.selectLanguage(language);
    // set the desigh path
    page.setDesignPath(design);
    // set the alias
    advancedTab.slingAlias().sendKeys(alias);
    // save the configuration and open again the page property
    propertiesPage.saveAndClose();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.open();
    advancedTab = propertiesPage.clickTab("advanced", AdvancedTab.class);
    // check the language
    assertTrue(advancedTab.getLanguageSelected().equals(languageName), "Language " + languageName + " should be selected");
    // check the design
    assertTrue(page.getDesignPath().equals(design), "Design path should be set to " + design);
    // check the alias
    assertTrue(advancedTab.slingAlias().getValue().equals(alias), "Sling Alias should be set to " + alias);
}
Also used : PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage) AdvancedTab(com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab)

Example 7 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 testCloudServicesPageProperties.

public void testCloudServicesPageProperties() throws InterruptedException {
    // Open properties page
    PropertiesPage propertiesPage = new PropertiesPage(testPage);
    propertiesPage.open();
    // Open Cloud Service tab
    CloudServicesTab cloudServicesTab = propertiesPage.clickTab("cloud services", CloudServicesTab.class);
    // Add cloud configuration
    cloudServicesTab.addCloudConfiguration(cloudServiceConfig);
    // Delete the added cloud configuration
    cloudServicesTab.deleteCloudConfiguration();
    // Add cloud configuration again
    cloudServicesTab.addCloudConfiguration(cloudServiceConfig);
    // save the configuration and open again the page property
    propertiesPage.saveAndClose();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.open();
    propertiesPage.clickTab("cloud services", CloudServicesTab.class);
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    // Check is cloud configuration is set
    assertTrue(page.isCloudServiceConfigAdded(), "Cloud Service Config should be set");
}
Also used : CloudServicesTab(com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.CloudServicesTab) PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)

Example 8 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 testImagePageProperties.

public void testImagePageProperties() {
    // Open properties page
    PropertiesPage propertiesPage = new PropertiesPage(testPage);
    propertiesPage.open();
    // open the Thumbnail tab
    ImageTab imageTab = propertiesPage.clickTab("images", ImageTab.class);
    // Generate thumbnail preview
    imageTab.generateThumbnailPreview();
    // Revert button should be visible
    assertTrue(imageTab.getRevert().isDisplayed(), "Revert button should be visible");
    // Revert the thumbnail preview
    imageTab.revertThumbnailPreview();
    // Revert button should disappear
    assertTrue(!imageTab.getRevert().isDisplayed(), "Revert button should not be visible");
}
Also used : ImageTab(com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.ImageTab) PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)

Example 9 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 TeaserIT method setPageImage.

// ----------------------------------------------------------
// private stuff
// ----------------------------------------------------------
/**
 * Sets the featured image for a page.
 */
private void setPageImage(String page, String asset) throws ClientException, InterruptedException {
    // set page resource type to page v3
    adminClient.setPageProperty(page, "sling:resourceType", "core/wcm/components/page/v3/page", 200);
    PropertiesPage pageProperties = new PropertiesPage(page);
    pageProperties.open();
    $("coral-tab[data-foundation-tracking-event*='images']").click();
    $(".cq-FileUpload-picker").click();
    $("*[data-foundation-collection-item-id='/content/dam/core-components']").click();
    try {
        $("*[data-foundation-collection-item-id='/content/dam/core-components/" + asset + "'] coral-checkbox").click();
    } catch (Throwable t) {
        // Fallback for AEM 6.5
        $("*[data-foundation-collection-item-id='/content/dam/core-components/" + asset + "'] coral-columnview-item-thumbnail").click();
    }
    clickableClick($(".granite-pickerdialog-submit"));
    // inherit alt text from DAM
    String altValueFromDAMSelector = ".cq-siteadmin-admin-properties coral-checkbox[name='./cq:featuredimage/altValueFromDAM']";
    CoralCheckbox altValueFromDAMCheckbox = new CoralCheckbox(altValueFromDAMSelector);
    altValueFromDAMCheckbox.click();
    pageProperties.saveAndClose();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    editorPage.open();
}
Also used : CoralCheckbox(com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox) PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)

Example 10 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 testdvancedConfigurationPageProperties.

public void testdvancedConfigurationPageProperties() throws InterruptedException {
    // Open properties page
    PropertiesPage propertiesPage = new PropertiesPage(testPage);
    propertiesPage.open();
    // open the Advanced tab
    AdvancedTab advancedTab = propertiesPage.clickTab("advanced", AdvancedTab.class);
    // Uncheck the config inheritance
    CoralCheckbox advanceConfigInheritance = advancedTab.advanceConfigInheritance();
    if (advanceConfigInheritance.isChecked()) {
        advanceConfigInheritance.click();
    }
    // set the configuration
    page.setAdvanceConfig(configuration);
    // save the configuration and open again the page property
    propertiesPage.saveAndClose();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.open();
    advancedTab = propertiesPage.clickTab("advanced", AdvancedTab.class);
    // check the configuration
    assertTrue(page.getAdvanceConfig().equals(configuration), "Advance configuration should be set");
}
Also used : CoralCheckbox(com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox) PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage) AdvancedTab(com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab)

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