use of org.activityinfo.test.pageobject.web.design.LocksPage in project activityinfo by bedatadriven.
the class LockUiTest method lockIsNotRemovedOnNoButtonClick.
// AI-1091
@Test
public void lockIsNotRemovedOnNoButtonClick() throws Exception {
background();
String lockName = "lockName";
driver.addLockOnDb(lockName, DATABASE, "2015-01-01", "2015-01-01", true);
LocksPage locksPage = locksPage();
locksPage.grid().clickCell(lockName);
GxtModal confirmDialog = locksPage.clickDelete();
confirmDialog.clickButton(I18N.CONSTANTS.no());
// assert lock is still in table
locksPage.grid().findCell(lockName);
}
use of org.activityinfo.test.pageobject.web.design.LocksPage in project activityinfo by bedatadriven.
the class LockUiTest method deleteLock.
// AI-1225
@Test
public void deleteLock() throws Exception {
background();
String lockName = "lockName";
driver.addLockOnDb(lockName, DATABASE, "2015-01-01", "2015-01-01", true);
LocksPage locksPage = locksPage();
locksPage.grid().clickCell(lockName);
GxtModal confirmDialog = locksPage.clickDelete();
confirmDialog.clickButton(I18N.CONSTANTS.yes());
Sleep.sleepSeconds(1);
// assert lock is removed
assertFalse(locksPage.grid().findCellOptional(lockName).isPresent());
// assert delete button is disabled
assertFalse(locksPage.getToolbarMenu().button(I18N.CONSTANTS.delete()).isEnabled());
}