/** clicks on "Browse..." JButton */ public void browse() { btBrowse().push(); }
/** clicks on "Move Down" JButton */ public void moveDownTest() { btMoveDownTest().push(); }
/** clicks on "Browse..." JButton */ public void browse() { btBrowse().push(); }
/** clicks on "Remove" JButton */ public void removeSrc() { btRemoveSrc().push(); }
/** clicks on "Move Down" JButton */ public void moveDownSrc() { btMoveDownSrc().push(); }
/** clicks on "Browse..." JButton */ public void browse() { btBrowse().push(); }
/** clicks on "Add Folder..." JButton */ public void addFolderTest() { btAddFolderTest().push(); }
/** clicks on "Browse..." JButton */ public void browse3() { btBrowse3().push(); }
/** clicks on "Add Folder..." JButton */ public void addFolderSrc() { btAddFolderSrc().push(); }
/** clicks on "Remove" JButton */ public void removeTest() { btRemoveTest().push(); }
/** clicks on "Move Up" JButton */ public void moveUpSrc() { btMoveUpSrc().push(); }
/** clicks on "Move Up" JButton */ public void moveUpTest() { btMoveUpTest().push(); }
/** clicks on "Browse..." JButton */ public void browse2() { btBrowse2().push(); }
public void decrease() { spinnerOperator.getDecreaseOperator().push(); }
public void increase() { spinnerOperator.getIncreaseOperator().push(); }
/** * push a button identified by a String\Index * * @param operator * the operator the button is inside * @param identifier * the name\Index of the button * @return isEnabled return false if disabled * @throws Exception */ public Boolean pushButton(ContainerOperator operator, Object identifier) throws Exception { Boolean state = isButtonEnabled(operator, identifier); if (state) { JButtonOperator button = getButtonOperator(operator, identifier); button.push(); } return state; }
public static void addTomcatServer() { String appServerPath = System.getProperty("tomcat.installRoot"); if (appServerPath == null) { throw new Error("Can't add tomcat server. tomcat.installRoot property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" String nextButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_NEXT"); String finishButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_FINISH"); RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("Tomcat")) { serversNode.performPopupActionNoBlock(addServerMenuItem); NbDialogOperator addServerInstanceDialog = new NbDialogOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("Tomcat"); new JButtonOperator(addServerInstanceDialog, nextButtonCaption).push(); new JTextFieldOperator(addServerInstanceDialog, 1).setText(appServerPath); new JCheckBoxOperator(addServerInstanceDialog,1).changeSelection(false); new JButtonOperator(addServerInstanceDialog, finishButtonCaption).push(); } }
public static void addTomcatServer() { String appServerPath = System.getProperty("tomcat.installRoot"); if (appServerPath == null) { throw new Error("Can't add tomcat server. tomcat.installRoot property is not set."); } String addServerMenuItem = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle", "LBL_Add_Server_Instance"); // Add Server... String addServerInstanceDialogTitle = Bundle.getStringTrimmed("org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle", "LBL_ASIW_Title"); //"Add Server Instance" String nextButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_NEXT"); String finishButtonCaption = Bundle.getStringTrimmed("org.openide.Bundle", "CTL_FINISH"); RuntimeTabOperator rto = RuntimeTabOperator.invoke(); Node serversNode = new Node(rto.getRootNode(), "Servers"); // Let's check whether GlassFish is already added if (!serversNode.isChildPresent("Tomcat")) { serversNode.performPopupActionNoBlock(addServerMenuItem); NbDialogOperator addServerInstanceDialog = new NbDialogOperator(addServerInstanceDialogTitle); new JListOperator(addServerInstanceDialog, 1).selectItem("Tomcat"); new JButtonOperator(addServerInstanceDialog, nextButtonCaption).push(); new JTextFieldOperator(addServerInstanceDialog, 1).setText(appServerPath); new JCheckBoxOperator(addServerInstanceDialog,1).changeSelection(false); new JButtonOperator(addServerInstanceDialog, finishButtonCaption).push(); } }
@SuppressWarnings("ResultOfObjectAllocationIgnored") @Test public void testTabbedPane() { final ComponentChooser keyFileChooser = new NameComponentChooser("keyFileChooser"); new JTabbedPaneOperator(frame).selectPage(AuthenticationPanel.AUTH_KEY_FILE); // select tab for key files new JButtonOperator(frame, keyFileChooser).push(); // open file chooser JFileChooserOperator fc = new TFileChooserOperator(frame); fc.cancel(); new JTabbedPaneOperator(frame).selectPage(AuthenticationPanel.AUTH_PASSWD); // select tab for passwords new JLabelOperator(frame, LABEL_TEXT); fc = null; new JTabbedPaneOperator(frame).selectPage(AuthenticationPanel.AUTH_KEY_FILE); // select tab for key files new JButtonOperator(frame, keyFileChooser).push(); // open file chooser fc = new TFileChooserOperator(frame); final File file = new File("test"); fc.setSelectedFile(file); fc.approve(); fc.getQueueTool().waitEmpty(WAIT_EMPTY); JTextFieldOperator tf = new JTextFieldOperator(frame); assertEquals(file.getPath(), tf.getText()); fc = null; new JTabbedPaneOperator(frame).selectPage(AuthenticationPanel.AUTH_PASSWD); // select tab for passwords new JLabelOperator(frame, LABEL_TEXT); } }
@Test public void testUpdateErrorLabel() { panel.setError("This is a test error message!"); assertFalse(isBlank(error.getText())); final JTextFieldOperator tf = new JTextFieldOperator(frame); tf.setText("secret"); //tf.getQueueTool().waitEmpty(WAIT_EMPTY); assertTrue(isBlank(error.getText())); panel.setError("This is a test error message!"); assertFalse(isBlank(error.getText())); new JTabbedPaneOperator(frame).selectPage(AuthenticationPanel.AUTH_KEY_FILE); // select tab for key files new JButtonOperator(frame, KEY_FILE_CHOOSER).push(); // open file chooser final JFileChooserOperator fc = new TFileChooserOperator(frame); fc.chooseFile(NON_EXISTING_FILE); fc.getQueueTool().waitEmpty(WAIT_EMPTY); assertTrue(isBlank(error.getText())); }