Search in sources :

Example 1 with AdvancedTab

use of com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab 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 2 with AdvancedTab

use of com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab 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)

Example 3 with AdvancedTab

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

the class PageTests method testAdvancedAuthenticationPageProperties.

public void testAdvancedAuthenticationPageProperties() throws InterruptedException {
    // Open properties page
    PropertiesPage propertiesPage = new PropertiesPage(testPage);
    propertiesPage.open();
    // open the Advanced tab
    AdvancedTab advancedTab = propertiesPage.clickTab("advanced", AdvancedTab.class);
    // test the authentication requirement
    advancedTab.authenticationRequired().click();
    page.setLoginPage(loginPage);
    // 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 Enable check
    assertTrue(advancedTab.authenticationRequired().isChecked(), "Authentication required should be checked");
    // check the login page
    assertTrue(page.getLoginPath().equals(loginPage), "Login page should be set");
}
Also used : PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage) AdvancedTab(com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab)

Example 4 with AdvancedTab

use of com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab 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)

Aggregations

PropertiesPage (com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)4 AdvancedTab (com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.AdvancedTab)4 CoralCheckbox (com.adobe.cq.testing.selenium.pagewidgets.coral.CoralCheckbox)1 CoralMultiField (com.adobe.cq.testing.selenium.pagewidgets.coral.CoralMultiField)1