use of org.activityinfo.test.pageobject.gxt.GxtModal in project activityinfo by bedatadriven.
the class DatabasesPage method rename.
public DatabasesPage rename(String oldName, String newName, String newDescription) {
grid().clickCell(oldName);
buttonClick(I18N.CONSTANTS.renameDatabase());
GxtModal modal = new GxtModal(container);
Form form = modal.form();
form.findFieldByLabel(I18N.CONSTANTS.name()).fill(newName);
form.findFieldByLabel(I18N.CONSTANTS.description()).fill(newDescription);
modal.accept();
return this;
}
use of org.activityinfo.test.pageobject.gxt.GxtModal in project activityinfo by bedatadriven.
the class DesignUiTest method navigateAwayWithoutSavingChanges.
// AI-877
@Test
public void navigateAwayWithoutSavingChanges() throws Exception {
driver.login();
driver.setup().createDatabase(property("name", DATABASE));
driver.setup().createForm(name(FORM), property("database", DATABASE), property("classicView", false));
driver.ensureLoggedIn();
String db = driver.getAliasTable().getAlias(DATABASE);
String form = driver.getAliasTable().getAlias(FORM);
DesignTab tab = driver.getApplicationPage().navigateToDesignTab().selectDatabase(db);
DesignPage designPage = tab.design();
GxtTree.GxtNode node = designPage.getDesignTree().select(form);
FluentElement nodeElement = node.getElement();
nodeElement.doubleClick();
FluentElement editor = findInputEditor(tab.getContainer());
editor.sendKeys("123");
try {
driver.getApplicationPage().navigateToDashboard();
} catch (Exception e) {
// ignore : our goal is to navigate away and make sure confirmation dialog appears
}
GxtModal confirmationModal = GxtModal.waitForModal(designPage.getContainer().root());
assertNotNull(confirmationModal);
}
use of org.activityinfo.test.pageobject.gxt.GxtModal 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.gxt.GxtModal 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());
}
use of org.activityinfo.test.pageobject.gxt.GxtModal in project activityinfo by bedatadriven.
the class ReportEditorBar method share.
public ShareReportsDialog share() {
container.find().button(containingText(I18N.CONSTANTS.share())).first().click();
GxtModal modal = GxtModal.waitForModal(container);
return new ShareReportsDialog(modal);
}
Aggregations