public ComponentOperator open() {
    log(":: open");
    Node doc = new Node(processNode, "fields.xsd");
    doc.select();

    return new TopComponentOperator("fields.xsd");
  }
  public ComponentOperator open() {
    log("::open");

    Node projectNode = new ProjectsTabOperator().getProjectRootNode(project_name);
    projectNode.performPopupActionNoBlock("Deploy Project"); // NOI18N
    new EventTool().waitNoEvent(60000);
    MainWindowOperator.getDefault().waitStatusText("Finished building " + project_name); // NOI18N

    return null;
  }
  @Override
  protected void initialize() {
    log(":: initialize");
    //        new CloseAllDocumentsAction().performAPI();

    processNode = new EPUtilities().getProcessFilesNode("SOATestProject");
    Node doc1 = new Node(processNode, "batch.xsd");
    doc1.select();

    JComboBoxOperator combo =
        new JComboBoxOperator(new TopComponentOperator("Navigator")); // NOI18N
    combo.selectItem("Schema View"); // NOI18N
  }
  @Override
  public void initialize() {
    log(":: initialize");
    Node asNode = new EPUtilities().startApplicationServer();

    OutputOperator oot = new OutputOperator();
    timeout = JemmyProperties.getCurrentTimeout(TIMEOUT_NAME);
    JemmyProperties.setCurrentTimeout(TIMEOUT_NAME, 300000);

    OutputTabOperator asot = oot.getOutputTab(asNode.getText()); // NOI18N
    asot.waitText("Application server startup complete"); // NOI18N

    //        new CloseAllDocumentsAction().performAPI();
  }
  @Override
  public void initialize() {
    MENU =
        Bundle.getStringTrimmed(
            "org.netbeans.modules.j2ee.deployment.impl.ui.actions.Bundle",
            "LBL_Add_Server_Instance"); // "Add Server..."
    TITLE =
        Bundle.getStringTrimmed(
            "org.netbeans.modules.j2ee.deployment.impl.ui.wizard.Bundle",
            "LBL_ASIW_Title"); // "Add Server Instance"

    String path =
        Bundle.getStringTrimmed(
            "org.netbeans.modules.server.ui.manager.Bundle", "ACSN_ServerList"); // "Servers"

    thenode = new Node(RuntimeTabOperator.invoke().getRootNode(), path);
    thenode.select();
  }
  public void prepare() {
    log(":: prepare");
    String documentPath = MPUtilities.SOURCE_PACKAGES + "|" + "allComponents" + "|" + midletName;

    long nodeTimeout = pto.getTimeouts().getTimeout("ComponentOperator.WaitStateTimeout");
    pto.getTimeouts().setTimeout("ComponentOperator.WaitStateTimeout", 60000);

    try {
      openNode = new Node(pto.getProjectRootNode(targetProject), documentPath);
    } catch (TimeoutExpiredException ex) {
      pto.getTimeouts().setTimeout("ComponentOperator.WaitStateTimeout", nodeTimeout);
      throw new Error("Cannot find expected node because of Timeout");
    }
    pto.getTimeouts().setTimeout("ComponentOperator.WaitStateTimeout", nodeTimeout);

    if (this.openNode == null) {
      throw new Error("Cannot find expected node ");
    }
    openNode.select();
  }
 public ComponentOperator open() {
   thenode.callPopup().pushMenu(MENU);
   return new NbDialogOperator(TITLE);
 }
Example #8
0
  public void testIgnoreUnignoreFile() throws Exception {
    // JemmyProperties.setCurrentTimeout("ComponentOperator.WaitComponentTimeout", 30000);
    // JemmyProperties.setCurrentTimeout("DialogWaiter.WaitDialogTimeout", 30000);
    try {
      TestKit.showStatusLabels();
      TestKit.closeProject(PROJECT_NAME);

      OutputOperator oo = OutputOperator.invoke();

      stream = new PrintStream(new File(getWorkDir(), getName() + ".log"));
      TestKit.loadOpenProject(PROJECT_NAME, getDataDir());

      TestKit.createNewElement(PROJECT_NAME, "javaapp", "NewClass");
      Node node = new Node(new SourcePackagesNode(PROJECT_NAME), "javaapp|NewClass");
      node.performPopupAction("Mercurial|Ignore");
      OutputTabOperator oto = new OutputTabOperator("Mercurial");
      oto.waitText("INFO: End of Ignore");

      node = new Node(new SourcePackagesNode(PROJECT_NAME), "javaapp|NewClass");

      org.openide.nodes.Node nodeIDE = (org.openide.nodes.Node) node.getOpenideNode();
      String color = TestKit.getColor(nodeIDE.getHtmlDisplayName());
      String status = TestKit.getStatus(nodeIDE.getHtmlDisplayName());
      assertEquals(
          "Wrong color of node - file color should be ignored!!!", TestKit.IGNORED_COLOR, color);
      assertEquals(
          "Wrong annotation of node - file status should be ignored!!!",
          TestKit.IGNORED_STATUS,
          status);

      node = new Node(new SourcePackagesNode(PROJECT_NAME), "javaapp|NewClass");
      TimeoutExpiredException tee = null;
      try {
        node.performPopupAction("Mercurial|Ignore");
      } catch (Exception e) {
        tee = (TimeoutExpiredException) e;
      }
      assertNotNull("Ignore action should be disabled!!!", tee);

      // unignore file
      oto = new OutputTabOperator("Mercurial");
      oto.clear();
      node = new Node(new SourcePackagesNode(PROJECT_NAME), "javaapp|NewClass");
      node.performPopupAction("Mercurial|Unignore");
      oto.waitText("INFO: End of Unignore");
      node = new Node(new SourcePackagesNode(PROJECT_NAME), "javaapp|NewClass");
      nodeIDE = (org.openide.nodes.Node) node.getOpenideNode();
      color = TestKit.getColor(nodeIDE.getHtmlDisplayName());
      status = TestKit.getStatus(nodeIDE.getHtmlDisplayName());
      assertEquals("Wrong color of node - file color should be new!!!", TestKit.NEW_COLOR, color);
      assertEquals(
          "Wrong annotation of node - file status should be new!!!", TestKit.NEW_STATUS, status);

      // verify content of Versioning view
      node = new Node(new SourcePackagesNode(PROJECT_NAME), "javaapp|NewClass");
      node.performPopupAction("Mercurial|Status");
      new EventTool().waitNoEvent(1000);
      VersioningOperator vo = VersioningOperator.invoke();
      TableModel model = vo.tabFiles().getModel();
      assertEquals("Versioning view should be empty", 1, model.getRowCount());
      assertEquals(
          "File should be listed in Versioning view",
          "NewClass.java",
          model.getValueAt(0, 0).toString());

      stream.flush();
      stream.close();

    } catch (Exception e) {
      throw new Exception("Test failed: " + e);
    } finally {
      TestKit.closeProject(PROJECT_NAME);
    }
  }
 @Override
 public void close() {
   log("::close");
   Node doc1 = new Node(processNode, "batch.xsd");
   doc1.select();
 }
 public ComponentOperator open() {
   testNode.performPopupAction(ACTION);
   return new NbDialogOperator(TITLE);
 }