use of org.testfx.service.finder.NodeFinder in project TestFX by TestFX.
the class ListViewMatchers method hasListCell.
private static boolean hasListCell(ListView listView, Object value) {
NodeFinder nodeFinder = FxAssert.assertContext().getNodeFinder();
NodeQuery nodeQuery = nodeFinder.from(listView);
return nodeQuery.lookup(SELECTOR_LIST_CELL).<Cell>match(cell -> hasCellValue(cell, value)).tryQuery().isPresent();
}
use of org.testfx.service.finder.NodeFinder in project TestFX by TestFX.
the class TableViewMatchers method hasTableCell.
private static boolean hasTableCell(TableView tableView, Object value) {
NodeFinder nodeFinder = FxAssert.assertContext().getNodeFinder();
NodeQuery nodeQuery = nodeFinder.from(tableView);
return nodeQuery.lookup(SELECTOR_TABLE_CELL).<Cell>match(cell -> hasCellValue(cell, value)).tryQuery().isPresent();
}
use of org.testfx.service.finder.NodeFinder in project TestFX by TestFX.
the class NodeMatchers method hasChildren.
private static boolean hasChildren(Node node, int amount, String query) {
NodeFinder nodeFinder = FxAssert.assertContext().getNodeFinder();
NodeQuery nodeQuery = nodeFinder.from(node);
return nodeQuery.lookup(query).queryAll().size() == amount;
}
use of org.testfx.service.finder.NodeFinder in project TestFX by TestFX.
the class NodeMatchers method hasChild.
private static boolean hasChild(Node node, String query) {
NodeFinder nodeFinder = FxAssert.assertContext().getNodeFinder();
NodeQuery nodeQuery = nodeFinder.from(node);
return !nodeQuery.lookup(query).queryAll().isEmpty();
}
Aggregations