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);
}
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);
}
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");
}
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");
}
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");
}
Aggregations