use of org.activityinfo.test.pageobject.api.FluentElement in project activityinfo by bedatadriven.
the class Dashboard method getPortletTitles.
public List<String> getPortletTitles() {
assertAtLeastOnePortletIsVisible();
List<String> titles = new ArrayList<>();
FluentElements headers = container.find().span(withClass("x-panel-header-text")).asList();
for (FluentElement header : headers) {
titles.add(header.text());
}
return titles;
}
use of org.activityinfo.test.pageobject.api.FluentElement in project activityinfo by bedatadriven.
the class ImportDialog method enterExcelData.
public ImportDialog enterExcelData(String excelData) {
FluentElement textArea = modal.form().getForm().find().textArea(withClass("form-control")).first();
textArea.element().clear();
textArea.sendKeys(excelData);
return this;
}
use of org.activityinfo.test.pageobject.api.FluentElement in project activityinfo by bedatadriven.
the class GxtGrid method waitUntilReloaded.
public GxtGrid waitUntilReloaded() throws InterruptedException {
// Wait until the loading mask appears
FluentElement loadingMask = container.root().waitFor(By.className("ext-el-mask"));
// Wait until it disappears...
loadingMask.waitUntil(ExpectedConditions.stalenessOf(loadingMask.element()));
return this;
}
use of org.activityinfo.test.pageobject.api.FluentElement 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