Merge branch 'fix-ui-tests' of https://github.com/Seraphym-Tuhai/thingsboard into fix-ui-tests

This commit is contained in:
Seraphym-Tuhai 2023-03-09 13:02:04 +02:00
commit 3f28eca3b8
19 changed files with 75 additions and 107 deletions

View File

@ -32,17 +32,17 @@ public class CustomerPageElements extends OtherPageElementsHelper {
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 MANAGE_CUSTOMERS_USERS_BTN = ENTITY + "/../..//mat-icon[contains(text(),' account_circle')]/../..";
private static final String MANAGE_CUSTOMERS_ASSETS_BTN = ENTITY + "/../..//mat-icon[contains(text(),' domain')]/../..";
private static final String MANAGE_CUSTOMERS_DEVICES_BTN = ENTITY + "/../..//mat-icon[contains(text(),' devices_other')]/../..";
private static final String MANAGE_CUSTOMERS_DASHBOARDS_BTN = ENTITY + "/../..//mat-icon[contains(text(),' dashboard')]/../..";
private static final String MANAGE_CUSTOMERS_EDGE_BTN = ENTITY + "/../..//mat-icon[contains(text(),' router')]/../..";
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";
private static final String MANAGE_CUSTOMERS_DASHBOARDS_BTN = ENTITY + "/ancestor::mat-row//mat-icon[contains(text(),'dashboard')]/parent::button";
private static final String MANAGE_CUSTOMERS_EDGE_BTN = ENTITY + "/ancestor::mat-row//mat-icon[contains(text(),'router')]/parent::button";
private static final String ADD_USER_EMAIL = "//tb-add-user-dialog//input[@formcontrolname='email']";
private static final String ACTIVATE_WINDOW_OK_BTN = "//span[contains(text(),'OK')]";
private static final String USER_LOGIN_BTN = "//mat-icon[@data-mat-icon-name='login']";
private static final String USERS_WIDGET = "//tb-widget";
private static final String SELECT_COUNTRY_MENU = "//mat-form-field//mat-select[@formcontrolname='country']";
private static final String COUNTRIES = "//span[@class='mat-option-text']";
private static final String COUNTRIES = "//span[@class='mdc-list-item__primary-text']";
protected static final String INPUT_FIELD = "//input[@formcontrolname='%s']";
protected static final String INPUT_FIELD_NAME_TITLE = "title";
private static final String INPUT_FIELD_NAME_CITY = "city";
@ -54,7 +54,7 @@ public class CustomerPageElements extends OtherPageElementsHelper {
private static final String INPUT_FIELD_NAME_NUMBER = "phoneNumber";
private static final String INPUT_FIELD_NAME_ASSIGNED_LIST = "entity";
private static final String ASSIGNED_BTN = "//button[@type='submit']";
private static final String HIDE_HOME_DASHBOARD_TOOLBAR = "//mat-checkbox[@formcontrolname='homeDashboardHideToolbar']/label";
private static final String HIDE_HOME_DASHBOARD_TOOLBAR = "//mat-checkbox[@formcontrolname='homeDashboardHideToolbar']//label";
private static final String FILTER_BTN = "//tb-filters-edit";
private static final String TIME_BTN = "//tb-timewindow";
private static final String CUSTOMER_ICON_HEADER = "//tb-breadcrumb//span[contains(text(),'Customer %s')]";

View File

@ -17,6 +17,7 @@ package org.thingsboard.server.msa.ui.pages;
import lombok.extern.slf4j.Slf4j;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
@ -156,4 +157,9 @@ public class CustomerPageHelper extends CustomerPageElements {
public void addCustomerViewEnterName(CharSequence keysToEnter) {
enterText(titleFieldAddEntityView(), keysToEnter);
}
public void enterPhoneNumber(String number) {
phoneNumberEntityView().sendKeys(number);
phoneNumberEntityView().sendKeys(Keys.TAB);
}
}

View File

@ -33,8 +33,8 @@ public class DashboardPageHelper extends DashboardPageElements {
}
public void assignedCustomer(String title) {
manageAssignedEntityListField().click();
manageAssignedEntity(title).click();
manageAssignedUpdateBtn().click();
jsClick(manageAssignedEntityListField());
jsClick(manageAssignedEntity(title));
jsClick(manageAssignedUpdateBtn());
}
}

View File

@ -24,8 +24,7 @@ public class OpenRuleChainPageElements extends AbstractBasePage {
super(driver);
}
private static final String DONE_BTN = "//mat-icon[contains(text(),'done')]/../..";
private static final String DONE_BTN_DISABLE = "//mat-icon[contains(text(),'done')]/../parent::button[@disabled='true']";
private static final String DONE_BTN = "//mat-icon[contains(text(),'done')]/parent::button";
private static final String INPUT_NODE = "//div[@class='tb-rule-node tb-input-type']";
private static final String HEAD_RULE_CHAIN_NAME = "//div[@class='tb-breadcrumb']/span[2]";
@ -37,10 +36,6 @@ public class OpenRuleChainPageElements extends AbstractBasePage {
return waitUntilVisibilityOfElementLocated(HEAD_RULE_CHAIN_NAME);
}
public String getDoneBtnDisable() {
return DONE_BTN_DISABLE;
}
public WebElement doneBtn() {
return waitUntilElementToBeClickable(DONE_BTN);
}

View File

@ -16,6 +16,7 @@
package org.thingsboard.server.msa.ui.pages;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class OpenRuleChainPageHelper extends OpenRuleChainPageElements {
public OpenRuleChainPageHelper(WebDriver driver) {
@ -32,7 +33,7 @@ public class OpenRuleChainPageHelper extends OpenRuleChainPageElements {
return headName;
}
public void waitUntilDoneBtnDisable() {
waitUntilVisibilityOfElementLocated(getDoneBtnDisable());
public void waitUntilBtnDisable(WebElement element) {
waitUntilAttributeContains(element, "disabled", "true");
}
}

View File

@ -28,7 +28,7 @@ public class OtherPageElements extends AbstractBasePage {
}
protected static final String ENTITY = "//mat-row//span[contains(text(),'%s')]";
protected static final String DELETE_BTN = ENTITY + "/../..//mat-icon[contains(text(),' delete')]/../..";
protected static final String DELETE_BTN = ENTITY + "/ancestor::mat-row//mat-icon[contains(text(),'delete')]/ancestor::button";
protected static final String DETAILS_BTN = ENTITY + "/../..//mat-icon[contains(text(),'edit')]/../..";
private static final String ENTITY_COUNT = "//div[@class='mat-paginator-range-label']";
private static final String WARNING_DELETE_POPUP_YES = "//tb-confirm-dialog//button[2]";
@ -37,11 +37,11 @@ public class OtherPageElements extends AbstractBasePage {
private static final String HELP_BTN = "//mat-icon[contains(text(),'help')]/ancestor::button";
private static final String CHECKBOX = "//mat-row//span[contains(text(),'%s')]/../..//mat-checkbox";
private static final String CHECKBOXES = "//tbody//mat-checkbox";
private static final String DELETE_SELECTED_BTN = "//span[contains(text(),'selected')]//..//mat-icon/../..";
private static final String DELETE_SELECTED_BTN = "//div[@class='mat-toolbar-tools']//mat-icon[contains(text(),'delete')]/parent::button";
private static final String DELETE_BTNS = "//mat-icon[contains(text(),' delete')]/../..";
private static final String MARKS_CHECKBOX = "//mat-row[contains (@class,'mat-selected')]//mat-checkbox[contains(@class, 'checked')]";
private static final String SELECT_ALL_CHECKBOX = "//thead//mat-checkbox";
private static final String ALL_ENTITY = "//mat-row[@class='mat-row cdk-row mat-row-select ng-star-inserted']";
private static final String ALL_ENTITY = "//mat-row[@class='mat-mdc-row mdc-data-table__row cdk-row mat-row-select ng-star-inserted']";
private static final String EDIT_PENCIL_BTN = "//tb-details-panel//mat-icon[contains(text(),'edit')]/ancestor::button";
private static final String NAME_FIELD_EDIT_VIEW = "//input[@formcontrolname='name']";
private static final String HEADER_NAME_VIEW = "//header//div[@class='tb-details-title']/span";
@ -50,14 +50,13 @@ public class OtherPageElements extends AbstractBasePage {
private static final String DESCRIPTION_ADD_ENTITY_VIEW = "//tb-add-entity-dialog//textarea";
private static final String DEBUG_CHECKBOX_EDIT = "//mat-checkbox[@formcontrolname='debugMode']";
private static final String DEBUG_CHECKBOX_VIEW = "//mat-checkbox[@formcontrolname='debugMode']//input";
private static final String CLOSE_ENTITY_VIEW_BTN = "//header//mat-icon[contains(text(),'close')]/../..";
private static final String SEARCH_BTN = "//mat-toolbar//mat-icon[contains(text(),'search')]/.." +
"/parent::button[@class='mat-focus-indicator mat-tooltip-trigger mat-icon-button mat-button-base ng-star-inserted']";
private static final String CLOSE_ENTITY_VIEW_BTN = "//header//mat-icon[contains(text(),'close')]/parent::button";
private static final String SEARCH_BTN = "//mat-toolbar//mat-icon[contains(text(),'search')]/ancestor::button[contains(@class,'ng-star')]";
private static final String SORT_BY_NAME_BTN = "//div[contains(text(),'Name')]";
private static final String SORT_BY_TITLE_BTN = "//div[contains(text(),'Title')]";
private static final String SORT_BY_TIME_BTN = "//div[contains(text(),'Created time')]/..";
private static final String CREATED_TIME = "//tbody[@role='rowgroup']//mat-cell[2]/span";
private static final String PLUS_BTN = "//mat-icon[contains(text(),'add')]/../parent::button";
private static final String PLUS_BTN = "//mat-icon[contains(text(),'add')]/ancestor::button";
private static final String CREATE_VIEW_ADD_BTN = "//span[contains(text(),'Add')]/..";
private static final String WARNING_MESSAGE = "//tb-snack-bar-component/div/div";
private static final String ERROR_MESSAGE = "//mat-error";
@ -66,7 +65,7 @@ public class OtherPageElements extends AbstractBasePage {
private static final String ENTITY_FROM_LIST = "//div[@role='listbox']/mat-option//span[contains(text(),'%s')]";
protected static final String ADD_ENTITY_VIEW = "//tb-add-entity-dialog";
protected static final String STATE_CONTROLLER = "//tb-entity-state-controller";
private static final String SEARCH_FIELD = "//input[contains (@data-placeholder,'Search')]";
private static final String SEARCH_FIELD = "//input[contains (@placeholder,'Search')]";
private static final String BROWSE_FILE = "//input[@class='file-input']";
private static final String IMPORT_BROWSE_FILE = "//mat-dialog-container//span[contains(text(),'Import')]/..";
private static final String IMPORTING_FILE = "//div[contains(text(),'%s')]";
@ -158,7 +157,7 @@ public class OtherPageElements extends AbstractBasePage {
}
public WebElement debugCheckboxView() {
return waitUntilVisibilityOfElementLocated(DEBUG_CHECKBOX_VIEW);
return waitUntilPresenceOfElementLocated(DEBUG_CHECKBOX_VIEW);
}
public WebElement closeEntityViewBtn() {

View File

@ -62,48 +62,22 @@ public class OtherPageElementsHelper extends OtherPageElements {
}
public String deleteRuleChainTrash(String entityName) {
String s = "";
if (deleteBtn(entityName) != null) {
deleteBtn(entityName).click();
warningPopUpYesBtn().click();
return entityName;
} else {
for (int i = 0; i < deleteBtns().size(); i++) {
if (deleteBtns().get(i).isEnabled()) {
deleteBtns().get(i).click();
warningPopUpYesBtn().click();
if (elementIsNotPresent(getWarningMessage())) {
s = driver.findElements(By.xpath(getDeleteBtns()
+ "/../../../mat-cell/following-sibling::mat-cell/following-sibling::mat-cell[contains(@class,'cdk-column-name')]/span")).get(i).getText();
break;
}
}
}
return s;
}
deleteBtn(entityName).click();
warningPopUpYesBtn().click();
return entityName;
}
public String deleteSelected(String entityName) {
String s = "";
if (deleteBtn(entityName) != null) {
checkBox(entityName).click();
deleteSelectedBtn().click();
warningPopUpYesBtn().click();
return entityName;
} else {
for (int i = 0; i < checkBoxes().size(); i++) {
if (checkBoxes().get(i).isDisplayed()) {
s = driver.findElements(By.xpath(getCheckboxes() + "/../../mat-cell/following-sibling::mat-cell/following-sibling::mat-cell[contains(@class,'cdk-column-name')]/span")).get(i).getText();
checkBox(s).click();
deleteSelectedBtn().click();
warningPopUpYesBtn().click();
if (elementIsNotPresent(getWarningMessage())) {
break;
}
}
}
return s;
}
checkBox(entityName).click();
jsClick(deleteSelectedBtn());
warningPopUpYesBtn().click();
return entityName;
}
public void deleteSelected(int countOfCheckBoxes) {
clickOnCheckBoxes(countOfCheckBoxes);
jsClick(deleteSelectedBtn());
warningPopUpYesBtn().click();
}
public void searchEntity(String namePath) {

View File

@ -25,7 +25,7 @@ public class RuleChainsPageElements extends OtherPageElementsHelper {
super(driver);
}
private static final String MAKE_ROOT_BTN = ENTITY + "/../..//mat-icon[contains(text(),' flag')]/../..";
private static final String MAKE_ROOT_BTN = ENTITY + "/ancestor::mat-row//mat-icon[contains(text(),'flag')]/ancestor::button";
private static final String ROOT = ENTITY + "/../..//mat-icon[text() = 'check_box']";
private static final String ROOT_DISABLE = ENTITY + "/../..//mat-icon[text() = 'check_box_outline_blank']";
private static final String CREATED_TIME = ENTITY + "/../..//mat-cell/span[contains(text(),'%s')]";

View File

@ -167,7 +167,7 @@ public class CreateAssetProfileTest extends AbstractDriverBaseTest {
String urlPath = "docs/user-guide/asset-profiles/";
sideBarMenuView.openAssetProfiles();
profilesPage.allEntity().get(0).click();
profilesPage.profileNames().get(0).click();
profilesPage.goToProfileHelpPage();
Assert.assertTrue(urlContains(urlPath));

View File

@ -147,14 +147,14 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
dashboardPage.assignedCustomer(customerName);
sideBarMenuView.customerBtn().click();
customerPage.entity(customerName).click();
customerPage.editPencilBtn().click();
jsClick(customerPage.editPencilBtn());
customerPage.chooseDashboard();
customerPage.doneBtnEditView().click();
customerPage.setDashboardFromView();
customerPage.closeEntityViewBtn().click();
customerPage.manageCustomersUserBtn(customerName).click();
jsClick(customerPage.manageCustomersUserBtn(customerName));
customerPage.createCustomersUser();
customerPage.userLoginBtn().click();
jsClick(customerPage.userLoginBtn());
Assert.assertNotNull(customerPage.usersWidget());
Assert.assertTrue(customerPage.usersWidget().isDisplayed());
@ -173,14 +173,14 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
customerPage.assignedDashboard();
sideBarMenuView.customerBtn().click();
customerPage.entity(customerName).click();
customerPage.editPencilBtn().click();
jsClick(customerPage.editPencilBtn());
customerPage.chooseDashboard();
customerPage.doneBtnEditView().click();
customerPage.setDashboardFromView();
customerPage.closeEntityViewBtn().click();
customerPage.manageCustomersUserBtn(customerName).click();
jsClick(customerPage.manageCustomersUserBtn(customerName));
customerPage.createCustomersUser();
customerPage.userLoginBtn().click();
jsClick(customerPage.userLoginBtn());
Assert.assertNotNull(customerPage.usersWidget());
Assert.assertTrue(customerPage.usersWidget().isDisplayed());
@ -199,15 +199,15 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
customerPage.assignedDashboard();
sideBarMenuView.customerBtn().click();
customerPage.entity(customerName).click();
customerPage.editPencilBtn().click();
jsClick(customerPage.editPencilBtn());
customerPage.chooseDashboard();
customerPage.hideHomeDashboardToolbarCheckbox().click();
customerPage.doneBtnEditView().click();
customerPage.setDashboardFromView();
customerPage.closeEntityViewBtn().click();
customerPage.manageCustomersUserBtn(customerName).click();
jsClick(customerPage.manageCustomersUserBtn(customerName));
customerPage.createCustomersUser();
customerPage.userLoginBtn().click();
jsClick(customerPage.userLoginBtn());
Assert.assertNotNull(customerPage.usersWidget());
Assert.assertTrue(customerPage.usersWidget().isDisplayed());
@ -243,11 +243,9 @@ public class CustomerEditMenuTest extends AbstractDriverBaseTest {
sideBarMenuView.customerBtn().click();
customerPage.entityTitles().get(0).click();
customerPage.editPencilBtn().click();
customerPage.phoneNumberEntityView().sendKeys(number);
boolean doneBtnIsEnable = customerPage.doneBtnEditViewVisible().isEnabled();
customerPage.doneBtnEditViewVisible().click();
customerPage.enterPhoneNumber(number);
Assert.assertFalse(doneBtnIsEnable);
Assert.assertFalse(customerPage.doneBtnEditViewVisible().isEnabled());
Assert.assertNotNull(customerPage.errorMessage());
Assert.assertTrue(customerPage.errorMessage().isDisplayed());
Assert.assertEquals(customerPage.errorMessage().getText(), PHONE_NUMBER_ERROR_MESSAGE);

View File

@ -77,9 +77,9 @@ public class DeleteCustomerTest extends AbstractDriverBaseTest {
sideBarMenuView.customerBtn().click();
customerPage.entity(customerName).click();
customerPage.customerViewDeleteBtn().click();
jsClick(customerPage.customerViewDeleteBtn());
customerPage.warningPopUpYesBtn().click();
customerPage.refreshBtn().click();
jsClick(customerPage.refreshBtn());
Assert.assertTrue(customerPage.entityIsNotPresent(customerName));
}

View File

@ -49,9 +49,7 @@ public class DeleteSeveralCustomerTest extends AbstractDriverBaseTest {
testRestClient.postCustomer(defaultCustomerPrototype(title2));
sideBarMenuView.customerBtn().click();
customerPage.clickOnCheckBoxes(2);
customerPage.deleteSelectedBtn().click();
customerPage.warningPopUpYesBtn().click();
customerPage.deleteSelected(2);
customerPage.refreshBtn().click();
Assert.assertTrue(customerPage.customerIsNotPresent(title1));
@ -63,7 +61,7 @@ public class DeleteSeveralCustomerTest extends AbstractDriverBaseTest {
public void selectAllCustomers() {
sideBarMenuView.customerBtn().click();
customerPage.selectAllCheckBox().click();
customerPage.deleteSelectedBtn().click();
jsClick(customerPage.deleteSelectedBtn());
Assert.assertNotNull(customerPage.warningPopUpTitle());
Assert.assertTrue(customerPage.warningPopUpTitle().isDisplayed());
@ -79,9 +77,7 @@ public class DeleteSeveralCustomerTest extends AbstractDriverBaseTest {
testRestClient.postCustomer(defaultCustomerPrototype(title2));
sideBarMenuView.customerBtn().click();
customerPage.clickOnCheckBoxes(2);
customerPage.deleteSelectedBtn().click();
customerPage.warningPopUpYesBtn().click();
customerPage.deleteSelected(2);
Assert.assertTrue(customerPage.customerIsNotPresent(title1));
Assert.assertTrue(customerPage.customerIsNotPresent(title2));

View File

@ -56,7 +56,7 @@ public class ManageCustomersAssetsTest extends AbstractDriverBaseTest {
sideBarMenuView.customerBtn().click();
customerPage.setCustomerName();
customerPage.entity(customerPage.getCustomerName()).click();
customerPage.manageCustomersAssetsBtnView().click();
jsClick(customerPage.manageCustomersAssetsBtnView());
Assert.assertTrue(urlContains(manage.toLowerCase()));
Assert.assertNotNull(customerPage.customerAssetsIconHeader());

View File

@ -55,7 +55,7 @@ public class ManageCustomersDashboardsTest extends AbstractDriverBaseTest {
sideBarMenuView.customerBtn().click();
customerPage.setCustomerName();
customerPage.entity(customerPage.getCustomerName()).click();
customerPage.manageCustomersDashboardsBtnView().click();
jsClick(customerPage.manageCustomersDashboardsBtnView());
Assert.assertTrue(urlContains(manage.toLowerCase()));
Assert.assertNotNull(customerPage.customerDashboardIconHeader());

View File

@ -42,7 +42,7 @@ public class ManageCustomersUsersTest extends AbstractDriverBaseTest {
public void openWindowByRightCornerBtn() {
sideBarMenuView.customerBtn().click();
customerPage.setCustomerName();
customerPage.manageCustomersUserBtn(customerPage.getCustomerName()).click();
jsClick(customerPage.manageCustomersUserBtn(customerPage.getCustomerName()));
Assert.assertTrue(urlContains("user"));
Assert.assertNotNull(customerPage.customerUserIconHeader());

View File

@ -173,7 +173,7 @@ public class CreateDeviceProfileTest extends AbstractDriverBaseTest {
String urlPath = "docs/user-guide/device-profiles/";
sideBarMenuView.openDeviceProfiles();
profilesPage.allEntity().get(0).click();
profilesPage.profileNames().get(0).click();
profilesPage.goToProfileHelpPage();
Assert.assertTrue(urlContains(urlPath));

View File

@ -16,6 +16,7 @@
package org.thingsboard.server.msa.ui.tests.ruleChainsSmoke;
import io.qameta.allure.Description;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
@ -100,8 +101,9 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
ruleChainsPage.openImportRuleChainView();
ruleChainsPage.browseFile().sendKeys(absolutePathToFileImportRuleChain);
ruleChainsPage.importBrowseFileBtn().click();
openRuleChainPage.doneBtn().click();
openRuleChainPage.waitUntilDoneBtnDisable();
WebElement doneBtn = openRuleChainPage.doneBtn();
doneBtn.click();
//openRuleChainPage.waitUntilBtnDisable(doneBtn);
ruleChainName = IMPORT_RULE_CHAIN_NAME;
sideBarMenuView.ruleChainsBtn().click();
@ -120,8 +122,9 @@ public class CreateRuleChainImportTest extends AbstractDriverBaseTest {
ruleChainsPage.openImportRuleChainView();
ruleChainsPage.browseFile().sendKeys(absolutePathToFileImportRuleChain);
ruleChainsPage.importBrowseFileBtn().click();
openRuleChainPage.doneBtn().click();
openRuleChainPage.waitUntilDoneBtnDisable();
WebElement doneBtn = openRuleChainPage.doneBtn();
doneBtn.click();
//openRuleChainPage.waitUntilBtnDisable(doneBtn);
sideBarMenuView.ruleChainsBtn().click();
boolean entityNotNull = ruleChainsPage.entity(ruleChainName) != null;

View File

@ -76,7 +76,7 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.detailsBtn(ENTITY_NAME).click();
String deletedRuleChain = ruleChainsPage.deleteRuleChainFromView(ruleChainName);
ruleChainsPage.refreshBtn().click();
jsClick(ruleChainsPage.refreshBtn());
Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedRuleChain));
}
@ -145,7 +145,7 @@ public class DeleteRuleChainTest extends AbstractDriverBaseTest {
sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.detailsBtn(deletedRuleChain).click();
ruleChainsPage.deleteBtnFromView().click();
jsClick(ruleChainsPage.deleteBtnFromView());
ruleChainsPage.warningPopUpYesBtn().click();
Assert.assertNotNull(ruleChainsPage.entity(deletedRuleChain));

View File

@ -49,9 +49,7 @@ public class DeleteSeveralRuleChainsTest extends AbstractDriverBaseTest {
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.clickOnCheckBoxes(2);
ruleChainsPage.deleteSelectedBtn().click();
ruleChainsPage.warningPopUpYesBtn().click();
ruleChainsPage.deleteSelected(2);
ruleChainsPage.refreshBtn().click();
Assert.assertTrue(ruleChainsPage.ruleChainsIsNotPresent(ruleChainName));
@ -66,7 +64,7 @@ public class DeleteSeveralRuleChainsTest extends AbstractDriverBaseTest {
sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.selectAllCheckBox().click();
ruleChainsPage.deleteSelectedBtn().click();
jsClick(ruleChainsPage.deleteSelectedBtn());
ruleChainsPage.warningPopUpYesBtn().click();
ruleChainsPage.refreshBtn().click();
@ -99,9 +97,7 @@ public class DeleteSeveralRuleChainsTest extends AbstractDriverBaseTest {
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
sideBarMenuView.ruleChainsBtn().click();
ruleChainsPage.clickOnCheckBoxes(2);
ruleChainsPage.deleteSelectedBtn().click();
ruleChainsPage.warningPopUpYesBtn().click();
ruleChainsPage.deleteSelected(2);
Assert.assertTrue(ruleChainsPage.ruleChainsIsNotPresent(ruleChainName));
}