use of org.activityinfo.test.pageobject.web.design.designer.FormDesignerPage in project activityinfo by bedatadriven.
the class DesignUiTest method globalDatabase.
@Test
public void globalDatabase() throws Exception {
driver.login();
driver.setup().createDatabase(property("name", DATABASE), property("country", "Global"));
driver.createForm(name(FORM), property("database", DATABASE), property("classicView", false));
FormDesignerPage formDesignerPage = driver.openFormDesigner(DATABASE, FORM);
formDesignerPage.save();
}
use of org.activityinfo.test.pageobject.web.design.designer.FormDesignerPage 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.designer.FormDesignerPage in project activityinfo by bedatadriven.
the class FormDesignUiTest method addingFields.
@Test
public void addingFields() throws Exception {
driver.login();
driver.setup().createDatabase(name(DATABASE));
driver.setup().createForm(name("Form"), property("database", DATABASE), property("classicView", false));
ApplicationPage applicationPage = driver.getApplicationPage();
FormDesignerPage designer = applicationPage.navigateToFormDesigner(aliasTable.getAlias(DATABASE), aliasTable.getAlias("Form"));
List<String> types = designer.fields().getFieldTypes();
if (types.isEmpty()) {
throw new AssertionError("Could not find any field types");
}
for (String type : types) {
designer.fields().dropNewField(type);
designer.save();
}
designer.fields().dropNewField(I18N.CONSTANTS.fieldTypeCalculated());
}
Aggregations