/** * Created by IntelliJ IDEA. * User: tippim * Date: Aug 29, 2006 * Time: 2:26:47 AM * To change this template use File | Settings | File Templates. */ public class TestSystemDialog extends AbstractConsoleTestCase {
public void testTreeItems() { try{ String sql="select hostid from host"; // start the application and login startApplication(); _testConsole=logIn();
// get the tree JTreeOperator tree=new JTreeOperator(_testConsole);
// check that the tree is not empty int numNodes=tree.getChildCount(tree.getRoot()); assertTrue("There should be at least one node in tree",numNodes>0);
// select hosts from the tree. String treeNode="Hosts"; tree.clickOnPath(tree.findPath(treeNode));
// expand and select the hosts branch of the tree tree.expandPath(tree.findPath(treeNode)); tree.selectPath(tree.findPath(treeNode)); //pause so tht we can get the data from the database and render it. tree.getQueueTool().waitEmpty(5000);
tree.callPopupOnPath(tree.findPath("Hosts|Windows Hosts|INENRAPOLSL1C")); JPopupMenuOperator popup = new JPopupMenuOperator(); popup.pushMenuNoBlock("Host|Show System Details...","|");
JDialogOperator systemDetails = new JDialogOperator(_testConsole, "System Details");
systemDetails.getQueueTool().waitEmpty(1000);
assertNotNull("system details for host......",systemDetails);