Search in sources :

Example 1 with LocksPage

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);
}
Also used : GxtModal(org.activityinfo.test.pageobject.gxt.GxtModal) LocksPage(org.activityinfo.test.pageobject.web.design.LocksPage) Test(org.junit.Test)

Example 2 with LocksPage

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());
}
Also used : GxtModal(org.activityinfo.test.pageobject.gxt.GxtModal) LocksPage(org.activityinfo.test.pageobject.web.design.LocksPage) Test(org.junit.Test)

Aggregations

GxtModal (org.activityinfo.test.pageobject.gxt.GxtModal)2 LocksPage (org.activityinfo.test.pageobject.web.design.LocksPage)2 Test (org.junit.Test)2