Search in sources :

Example 26 with CoralCheckbox

use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class ImageEditDialog method checkAltValueFromPageImage.

public void checkAltValueFromPageImage() {
    if ($(altValueFromPageImage).exists()) {
        CoralCheckbox checkbox = new CoralCheckbox(altValueFromPageImage);
        checkbox.click();
    }
}
Also used : CoralCheckbox(com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox)

Example 27 with CoralCheckbox

use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class BreadcrumbEditDialog method setShowHidden.

/**
 * Set the showHidden selected or unselected
 * @param selected State to be set for show hidden
 */
public void setShowHidden(boolean selected) {
    CoralCheckbox coralCheckbox = new CoralCheckbox("[name='./showHidden']");
    coralCheckbox.setSelected(selected);
}
Also used : CoralCheckbox(com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox)

Example 28 with CoralCheckbox

use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class BreadcrumbEditDialog method setHideCurrent.

/**
 * Set the hideCurrent selected or unselected
 * @param selected State to be set for hide current
 */
public void setHideCurrent(boolean selected) {
    CoralCheckbox coralCheckbox = new CoralCheckbox("[name='./hideCurrent']");
    coralCheckbox.setSelected(selected);
}
Also used : CoralCheckbox(com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox)

Example 29 with CoralCheckbox

use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox 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 30 with CoralCheckbox

use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox 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

CoralCheckbox (com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox)34 PropertiesPage (com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)3 AuthorBaseUITest (com.adobe.cq.wcm.core.components.it.seljup.AuthorBaseUITest)2 DisplayName (org.junit.jupiter.api.DisplayName)2 Test (org.junit.jupiter.api.Test)2 AdvancedTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab)1 AccordionEditDialog (com.adobe.cq.wcm.core.components.it.seljup.util.components.accordion.AccordionEditDialog)1 CarouselEditDialog (com.adobe.cq.wcm.core.components.it.seljup.util.components.carousel.CarouselEditDialog)1 ArrayList (java.util.ArrayList)1