use of com.adobe.cq.testing.selenium.pagewidgets.cq.AutoCompleteField in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageTests method testAddPermissionsPageProperties.
public void testAddPermissionsPageProperties() throws InterruptedException {
// Open properties page
PropertiesPage propertiesPage = new PropertiesPage(testPage);
propertiesPage.open();
// Open Permission tab
PermissionsTab permissions = propertiesPage.clickTab("permissions", PermissionsTab.class);
final ElementsCollection currentPermissionsList = permissions.permissionsList();
// Check no permission set
currentPermissionsList.shouldHaveSize(0);
// Add permission
final PermissionsTab.AddPermissionsDialog addPermissionsDialog = permissions.addPermission();
addPermissionsDialog.waitVisible();
final AutoCompleteField authList = addPermissionsDialog.authorizableList();
authList.sendKeys(userPrincipalName);
authList.buttonlist().selectByValue(userPrincipalName);
addPermissionsDialog.read().click();
addPermissionsDialog.modify().click();
addPermissionsDialog.delete().click();
addPermissionsDialog.clickPrimary();
// Check the permission set
currentPermissionsList.shouldHaveSize(1);
currentPermissionsList.shouldHave(CollectionCondition.texts(userName));
assertTrue(permissions.isReadPermissionGranted(userName), "Read permission has been given, should be checked");
assertTrue(permissions.isDeletePermissionGranted(userName), "Delete permission has been given, should be checked");
assertTrue(permissions.isModifyPermissionGranted(userName), "Modify permission has been given, should be checked");
assertTrue(!permissions.isReplicatePermissionGranted(userName), "Replicate permission has not been given, should not be checked");
assertTrue(!permissions.isCreatePermissionGranted(userName), "Create permission has not been given, should not be checked");
// Edit the permission
final PermissionsTab.EditPermissionDialog editPermissionDialog = permissions.editPermission(userName);
editPermissionDialog.replicate().click();
editPermissionDialog.clickPrimary();
Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
assertTrue(permissions.isReplicatePermissionGranted(userName), "Replicate permission has been given, should be checked");
// Delete the permission
permissions.deleteUserPermission(userName);
currentPermissionsList.shouldHaveSize(0);
}
use of com.adobe.cq.testing.selenium.pagewidgets.cq.AutoCompleteField in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class Commons method selectInAutocomplete.
/**
* Selects a value in a Granite UI autocomplete field
*
* @param selector {String} Specific selector for the autocomplete (ex. "[name='./myField']")
* @param value {String} The value to be selected
*/
public static void selectInAutocomplete(String selector, String value) {
AutoCompleteField autoCompleteField = new AutoCompleteField("css:" + selector);
autoCompleteField.sendKeys(value);
autoCompleteField.suggestions().selectByValue(value);
}
use of com.adobe.cq.testing.selenium.pagewidgets.cq.AutoCompleteField in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class NavigationEditDialog method setNavigationRoot.
public void setNavigationRoot(String path) {
AutoCompleteField autoCompleteField = new AutoCompleteField("css:" + navigationRoot);
autoCompleteField.sendKeys(path);
autoCompleteField.suggestions().selectByValue(path);
}
use of com.adobe.cq.testing.selenium.pagewidgets.cq.AutoCompleteField in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class Page method setVariantPath.
public void setVariantPath(String path) throws InterruptedException {
AutoCompleteField autoCompleteField = new AutoCompleteField("css:" + variantPath);
autoCompleteField.sendKeys(path);
Commons.webDriverWait(RequestConstants.WEBDRIVER_WAIT_TIME_MS);
}
use of com.adobe.cq.testing.selenium.pagewidgets.cq.AutoCompleteField in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class Page method setContextHubPath.
public void setContextHubPath(String path) {
AutoCompleteField autoCompleteField = new AutoCompleteField("css:" + contextHubPath);
autoCompleteField.sendKeys(path);
}
Aggregations