use of com.adobe.cq.testing.selenium.pagewidgets.cq.tabs.LiveCopyTab 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);
}
Aggregations