Search in sources :

Example 11 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 testBasicTitlesAndDescriptionsPageProperties.

public void testBasicTitlesAndDescriptionsPageProperties() throws InterruptedException {
    // open the properties page
    PropertiesPage propertiesPage = new PropertiesPage(testPage);
    propertiesPage.open();
    // open the Basic tab
    PropertiesPage.Tabs.Basic basicTab = propertiesPage.tabs().basic();
    // Edit basic page properties
    basicTab.pageTitle().setValue(pageTitle);
    basicTab.subtitle().setValue(subtitle);
    basicTab.navTitle().setValue(navTitle);
    basicTab.description().setValue(description);
    // save the configuration and open again the page property
    propertiesPage.saveAndClose();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.open();
    // Check if edited properties are saved
    assertTrue(basicTab.pageTitle().getValue().equals(pageTitle), "Page Title should be set to " + pageTitle);
    assertTrue(basicTab.subtitle().getValue().equals(subtitle), "Subtitle should be set to " + subtitle);
    assertTrue(basicTab.navTitle().getValue().equals(navTitle), "NavTitle should be set to " + navTitle);
    assertTrue(basicTab.description().getValue().equals(description), "Description should be set to " + description);
}
Also used : PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)

Example 12 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 testLiveCopyPageProperties.

public void testLiveCopyPageProperties() throws ClientException, InterruptedException {
    // create the live copy page, store page path in 'testLiveCopyPagePath'
    String testLiveCopyPagePath = Commons.createLiveCopy(adminClient, testPage, rootPage, "testLiveCopy", "testLiveCopy", 200);
    // Open properties page
    PropertiesPage propertiesPage = new PropertiesPage(testLiveCopyPagePath);
    propertiesPage.open();
    // Open Live Copy tab
    LiveCopyTab liveCopyTab = propertiesPage.clickTab("live copy", LiveCopyTab.class);
    // check the Synchronize button
    Dialog liveCopySync = liveCopyTab.synchronize();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    assertTrue(liveCopySync.isVisible(), "livecopy sync dialog should be visible");
    liveCopySync.clickPrimary();
    // Open Live Copy tab
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.clickTab("live copy", LiveCopyTab.class);
    // check the Reset button
    Dialog revert = liveCopyTab.reset();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    assertTrue(revert.isVisible(), "revert dialog should be visible");
    revert.clickWarning();
    // Open Live Copy tab
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.clickTab("live copy", LiveCopyTab.class);
    // check the Suspend without children button
    Dialog suspendWithoutChildrenDialog = liveCopyTab.suspendWithoutChild();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    assertTrue(suspendWithoutChildrenDialog.isVisible(), "Suspend livecopy without children dialog should be visible");
    suspendWithoutChildrenDialog.clickWarning();
    // Open Live Copy tab
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.clickTab("live copy", LiveCopyTab.class);
    // check the Resume button
    Dialog resumeDialog = liveCopyTab.resume();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    assertTrue(resumeDialog.isVisible(), "resume livecopy dialog should be visible");
    resumeDialog.clickWarning();
    // Open Live Copy tab
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.clickTab("live copy", LiveCopyTab.class);
    // check the Suspend without children button
    Dialog suspendWithChildrenDialog = liveCopyTab.suspendWithoutChild();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    assertTrue(suspendWithChildrenDialog.isVisible(), "Suspend livecopy with children dialog should be visible");
    suspendWithChildrenDialog.clickWarning();
    // Open Live Copy tab
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.clickTab("live copy", LiveCopyTab.class);
    // check the Detach button
    Dialog detachDialog = liveCopyTab.detach();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    assertTrue(detachDialog.isVisible(), "detach livecopy dialog should be visible");
    detachDialog.clickWarning();
    // Delete the created livecopy page
    adminClient.deletePageWithRetry(testLiveCopyPagePath, true, false, RequestConstants.TIMEOUT_TIME_MS, RequestConstants.RETRY_TIME_INTERVAL, HttpStatus.SC_OK);
}
Also used : LiveCopyTab(com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.LiveCopyTab) Dialog(com.adobe.cq.testing.selenium.pagewidgets.coral.Dialog) RolloutDialog(com.adobe.cq.testing.selenium.pagewidgets.cq.RolloutDialog) PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)

Example 13 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 testBasicVanityUrlPageProperties.

public void testBasicVanityUrlPageProperties() throws InterruptedException {
    // Open properties page
    PropertiesPage propertiesPage = new PropertiesPage(testPage);
    propertiesPage.open();
    PropertiesPage.Tabs.Basic basicTab = propertiesPage.tabs().basic();
    // add a vanity url
    CoralMultiField.MultiFieldItem item = page.addVanityUrl(basicTab, vanityURL);
    // delete the vanity url
    page.deleteVanityUrl(item);
    // add a vanity url
    item = page.addVanityUrl(basicTab, vanityURL);
    // set the Redirect Vanity URL
    basicTab.slingRedirect().click();
    // save the configuration and open again the page property
    propertiesPage.saveAndClose();
    Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
    propertiesPage.open();
    // check if the vanity url was saved
    assertTrue(page.getVanityUrlValue(0).equals(vanityURL), "Vanity URL should be set to " + vanityURL);
    // check if 'Redirect Vanity URL' is checked
    assertTrue(basicTab.slingRedirect().isChecked(), "Sling Redirect should be checked");
}
Also used : CoralMultiField(com.adobe.cq.testing.selenium.pagewidgets.coral.CoralMultiField) PropertiesPage(com.adobe.cq.testing.selenium.pageobject.cq.sites.PropertiesPage)

Example 14 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 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 15 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 testThumbnailPageProperties.

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

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