fix test on assigned dashboard
This commit is contained in:
parent
ec4d567ecd
commit
738fbda60b
@ -31,7 +31,7 @@ public class CustomerPageElements extends OtherPageElementsHelper {
|
||||
private static final String CITY = ENTITY + "/../..//mat-cell[contains(@class,'city')]/span";
|
||||
private static final String TITLES = "//mat-cell[contains(@class,'cdk-column-title')]/span";
|
||||
protected static final String EDIT_MENU_DASHBOARD_FIELD = "//input[@formcontrolname='dashboard']";
|
||||
private static final String EDIT_MENU_DASHBOARD = "//div[@class='cdk-overlay-pane']//span/span";
|
||||
private static final String EDIT_MENU_DASHBOARD = "//div[@class='cdk-overlay-pane']//span/span[contains(text(),'%s')]";
|
||||
private static final String MANAGE_CUSTOMERS_USERS_BTN = ENTITY + "/ancestor::mat-row//mat-icon[contains(text(),' account_circle')]";
|
||||
private static final String MANAGE_CUSTOMERS_ASSETS_BTN = ENTITY + "/ancestor::mat-row//mat-icon[contains(text(),' domain')]/parent::button";
|
||||
private static final String MANAGE_CUSTOMERS_DEVICES_BTN = ENTITY + "/ancestor::mat-row//mat-icon[contains(text(),'devices_other')]/parent::button";
|
||||
@ -104,8 +104,8 @@ public class CustomerPageElements extends OtherPageElementsHelper {
|
||||
return waitUntilVisibilityOfElementLocated(EDIT_MENU_DASHBOARD_FIELD);
|
||||
}
|
||||
|
||||
public WebElement editMenuDashboard() {
|
||||
return waitUntilElementToBeClickable(EDIT_MENU_DASHBOARD);
|
||||
public WebElement editMenuDashboard(String dashboardName) {
|
||||
return waitUntilElementToBeClickable(String.format(EDIT_MENU_DASHBOARD, dashboardName));
|
||||
}
|
||||
|
||||
public WebElement phoneNumberEntityView() {
|
||||
|
||||
@ -112,9 +112,9 @@ public class CustomerPageHelper extends CustomerPageElements {
|
||||
titleFieldEntityView().sendKeys(newTitle);
|
||||
}
|
||||
|
||||
public void chooseDashboard() {
|
||||
public void chooseDashboard(String dashboardName) {
|
||||
editMenuDashboardField().click();
|
||||
editMenuDashboard().click();
|
||||
editMenuDashboard(dashboardName).click();
|
||||
}
|
||||
|
||||
public void createCustomersUser() {
|
||||
|
||||
@ -148,7 +148,7 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
|
||||
sideBarMenuView.customerBtn().click();
|
||||
customerPage.entity(customerName).click();
|
||||
jsClick(customerPage.editPencilBtn());
|
||||
customerPage.chooseDashboard();
|
||||
customerPage.chooseDashboard(dashboardPage.getDashboardTitle());
|
||||
customerPage.doneBtnEditView().click();
|
||||
customerPage.setDashboardFromView();
|
||||
customerPage.closeEntityViewBtn().click();
|
||||
@ -174,7 +174,7 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
|
||||
sideBarMenuView.customerBtn().click();
|
||||
customerPage.entity(customerName).click();
|
||||
jsClick(customerPage.editPencilBtn());
|
||||
customerPage.chooseDashboard();
|
||||
customerPage.chooseDashboard(customerPage.getDashboard());
|
||||
customerPage.doneBtnEditView().click();
|
||||
customerPage.setDashboardFromView();
|
||||
customerPage.closeEntityViewBtn().click();
|
||||
@ -200,7 +200,7 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
|
||||
sideBarMenuView.customerBtn().click();
|
||||
customerPage.entity(customerName).click();
|
||||
jsClick(customerPage.editPencilBtn());
|
||||
customerPage.chooseDashboard();
|
||||
customerPage.chooseDashboard(customerPage.getDashboard());
|
||||
customerPage.hideHomeDashboardToolbarCheckbox().click();
|
||||
customerPage.doneBtnEditView().click();
|
||||
customerPage.setDashboardFromView();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user