示例#1
0
  private void _addTestOrSuite(@NotNull final SMTestProxy newTestOrSuite) {

    final SMTestProxy parentSuite = newTestOrSuite.getParent();
    assert parentSuite != null;

    // Tree
    final Update update =
        new Update(parentSuite) {
          @Override
          public void run() {
            myRequests.remove(this);
            myTreeBuilder.updateTestsSubtree(parentSuite);
          }
        };
    if (ApplicationManager.getApplication().isUnitTestMode()) {
      update.run();
    } else if (myRequests.add(update) && !myUpdateQueue.isDisposed()) {
      myUpdateQueue.addRequest(update, 100);
    }
    myTreeBuilder.repaintWithParents(newTestOrSuite);

    myAnimator.setCurrentTestCase(newTestOrSuite);

    if (TestConsoleProperties.TRACK_RUNNING_TEST.value(myProperties)) {
      if (myLastSelected == null || myLastSelected == newTestOrSuite) {
        myLastSelected = null;
        selectAndNotify(newTestOrSuite);
      }
    }
  }
示例#2
0
 /**
  * Adds test to tree and updates status line. Test proxy should be initialized, proxy parent must
  * be some suite (already added to tree)
  *
  * @param testProxy Proxy
  */
 public void onTestStarted(@NotNull final SMTestProxy testProxy) {
   if (!testProxy.isConfig()) {
     updateOnTestStarted(false);
   }
   _addTestOrSuite(testProxy);
   fireOnTestNodeAdded(testProxy);
 }
示例#3
0
  public void onTestFailed(@NotNull final SMTestProxy test) {
    updateOnTestFailed(false);
    if (test.isConfig()) {
      myStartedTestCount++;
      myFinishedTestCount++;
    }
    updateIconProgress(false);

    // still expand failure when user selected another test
    if (myLastSelected != null
        && TestConsoleProperties.TRACK_RUNNING_TEST.value(myProperties)
        && TestConsoleProperties.HIDE_PASSED_TESTS.value(myProperties)) {
      myTreeBuilder.expand(test, null);
    }
  }
示例#4
0
 public void onTestFinished(@NotNull final SMTestProxy test) {
   if (!test.isConfig()) {
     updateOnTestFinished(false);
   }
   updateIconProgress(false);
 }