use of org.activityinfo.test.pageobject.web.design.TargetsPage in project activityinfo by bedatadriven.
the class TargetsUiTest method statefulTree.
@Test
public void statefulTree() throws Exception {
background();
ApplicationPage app = driver.getApplicationPage();
TargetsPage targets = app.navigateToDesignTab().selectDatabase(driver.alias(DATABASE)).targets();
targets.select("Target1");
// expand tree only one time for Target1, then it should be stateful and keep it expanded
targets.expandTree("nb. kits");
targets.valueGrid().findCell("1000");
targets.select("Target2");
targets.valueGrid().findCell("2000");
// back to Target1 without expand, tree must be already expanded
targets.select("Target1");
targets.valueGrid().findCell("1000");
}
use of org.activityinfo.test.pageobject.web.design.TargetsPage in project activityinfo by bedatadriven.
the class TargetsUiTest method targetEdit.
@Test
public void targetEdit() throws Exception {
background();
TargetsPage targets = driver.getApplicationPage().navigateToDesignTab().selectDatabase(driver.alias(DATABASE)).targets();
targets.editTarget("Target1", driver.alias("ARC"), driver.alias("FY2014"));
targets.targetGrid().findCell(driver.alias("ARC"));
targets.targetGrid().findCell(driver.alias("FY2014"));
targets.editTarget("Target1", I18N.CONSTANTS.none(), I18N.CONSTANTS.none());
assertFalse(targets.targetGrid().findCellOptional(driver.alias("ARC")).isPresent());
}
use of org.activityinfo.test.pageobject.web.design.TargetsPage in project activityinfo by bedatadriven.
the class TargetsUiTest method treeEditorStateOnSelectionChange.
@Test
public void treeEditorStateOnSelectionChange() throws Exception {
background();
driver.setTargetValues("Target1", Lists.newArrayList(new FieldValue("nb. kits", "1000")));
TargetsPage targetPage = driver.targetsPage();
targetPage.select(driver.alias("Target2"));
// switch back and check whether value is in tree
targetPage.select(driver.alias("Target1"));
// value must be present in tree
assertNotNull(targetPage.valueGrid().findCell("1000"));
}
Aggregations