Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 3d2c83fc authored by Sonali MOHANTY's avatar Sonali MOHANTY
Browse files

1)some locators got changed and new locators have added.

parent 29297a14
No related branches found
No related tags found
No related merge requests found
......@@ -30,17 +30,12 @@ public class PropertiesGrid extends BasicGrid {
return rowInfos;
}
public Boolean isRowContainSearchProperty(String property){
public Boolean rowContainPropertyName(String property){
List<PropertyRowInfo> rows = getRows();
int i = rows.size();
Boolean bool;
if (rows.size() == 1 && rows.get(i-1).getPropertyname().equalsIgnoreCase(property)) {
bool = true;
}
else{
bool = false;
}
return bool;
Boolean bool=rows.size() == 1 && rows.get(i-1).getPropertyname().equalsIgnoreCase(property);
return bool;
}
}
......@@ -47,19 +47,19 @@ public class PropertiesPage extends SMPPage {
public boolean isLoaded(){
log.info("checking if Domain page is loaded");
log.info("checking if Property page is loaded");
return isVisible(cancelBtn)
&& isVisible(saveBtn)
&& isVisible(editBtn);
}
public boolean isCancelButtonEnabled() {
log.info("cancel button");
log.info("checking cancel button is enabled");
return isEnabled(cancelBtn);
}
public boolean isSaveButtonEnabled() {
log.info("save button");
log.info("checking save button is enabled");
return isEnabled(saveBtn);
}
public ConfirmationDialog clickCancel() {
......@@ -68,7 +68,7 @@ public class PropertiesPage extends SMPPage {
return new ConfirmationDialog(driver);
}
public boolean isEditButtonEnabled() {
log.info("edit button");
log.info("checking edit button is enabled");
return isEnabled(editBtn);
}
......
......@@ -280,12 +280,4 @@ public class LoginPgTest extends BaseTest {
soft.assertAll();
}
}
/*SMPPage page = new SMPPage(driver);
logger.info("Going to login page");
page.pageHeader.goToLogin();
LoginPage loginPage = new LoginPage(driver);
HashMap<String, String> user = testDataProvider.getUserWithRole("SYS_ADMIN");
SearchPage searchPage = loginPage.login(user.get("username"), user.get("password"));
soft.assertTrue(searchPage.pageHeader.sandwichMenu.isLoggedIn(), "User is logged in");*/
\ No newline at end of file
}
\ No newline at end of file
......@@ -45,29 +45,18 @@ public class PropertiesPgTest extends BaseTest{
PropertiesPage propertiesPage = new PropertiesPage(driver);
propertiesPage.propertySearch(property);
soft.assertTrue(propertiesPage.grid().isRowContainSearchProperty(property),"The row does not contain the searching property");
soft.assertTrue(propertiesPage.grid().rowContainPropertyName(property),"The row does not contain the searching property");
PropertyRowInfo newRow0 = propertiesPage.grid().getRows().get(0);
System.out.println("newRow0.getPropertyvalue() "+newRow0.getPropertyvalue());
if(newRow0.getPropertyvalue().equals("true"))
{
propertiesPage.grid().selectRow(0);
PropertyPopup popup = propertiesPage.clickEdit();
try {
Thread.sleep(5000);
} catch (Exception e) {
e.printStackTrace();
}
propertiesPage = popup.disableCheckboxOfProperty();
soft.assertTrue(propertiesPage.isSaveButtonEnabled(),"Save button is disbled");
try {
Thread.sleep(5000);
} catch (Exception e) {
e.printStackTrace();
}
propertiesPage.clickSave().confirm();
soft.assertTrue(propertiesPage.alertArea.getAlertMessage().isError(), "Message listed is success");
soft.assertTrue(propertiesPage.alertArea.getAlertMessage().getMessage().equalsIgnoreCase(SMPMessages.MSG_18), "Message is not listed is as expected");
propertiesPage.clickSave().confirm();
soft.assertTrue(propertiesPage.alertArea.getAlertMessage().isError(), "Message listed is success");
soft.assertTrue(propertiesPage.alertArea.getAlertMessage().getMessage().equalsIgnoreCase(SMPMessages.MSG_18), "Message is not listed is as expected");
}
propertiesPage.pageHeader.sandwichMenu.logout();
......@@ -109,7 +98,7 @@ public class PropertiesPgTest extends BaseTest{
PropertiesPage propertiesPage = new PropertiesPage(driver);
propertiesPage.propertySearch(property);
soft.assertTrue(propertiesPage.grid().isRowContainSearchProperty(property),"The row does not contain the searching property");
soft.assertTrue(propertiesPage.grid().rowContainPropertyName(property),"The row does not contain the searching property");
int index = 0;
propertiesPage.grid().selectRow(index);
PropertyPopup popup = propertiesPage.clickEdit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment