use of org.activityinfo.test.pageobject.web.design.DesignTab in project activityinfo by bedatadriven.
the class DesignUiTest method saveButtonState.
// AI-878
@Test
public void saveButtonState() 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", Keys.ENTER);
designPage.getToolbarMenu().clickButton("Save");
assertFalse(designPage.getToolbarMenu().button("Saved").isEnabled());
}
use of org.activityinfo.test.pageobject.web.design.DesignTab in project activityinfo by bedatadriven.
the class ApplicationPage method navigateToFormDesigner.
public FormDesignerPage navigateToFormDesigner(String database, String formName) {
DesignTab designTab = navigateToDesignTab();
designTab.selectDatabase(database);
DesignPage designPage = designTab.design();
designPage.getDesignTree().select(formName);
designPage.getToolbarMenu().clickButton(I18N.CONSTANTS.openFormDesigner());
page.waitUntil(new Predicate<WebDriver>() {
@Override
public boolean apply(WebDriver input) {
return page.find().div(withClass(FormDesignerPage.DROP_TARGET_CLASS)).exists();
}
});
return new FormDesignerPage(page);
}
use of org.activityinfo.test.pageobject.web.design.DesignTab in project activityinfo by bedatadriven.
the class ApplicationPage method navigateToTable.
public TablePage navigateToTable(String database, String formName) {
DesignTab designTab = navigateToDesignTab();
designTab.selectDatabase(database);
DesignPage designPage = designTab.design();
designPage.getDesignTree().select(formName);
designPage.getToolbarMenu().clickButton(I18N.CONSTANTS.openTable());
return new TablePage(page);
}
use of org.activityinfo.test.pageobject.web.design.DesignTab 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);
}
Aggregations