Examples of KarmaConfig


Examples of com.intellij.javascript.karma.KarmaConfig

  private static final Logger LOG = Logger.getInstance(KarmaCoverageRunner.class);
  private KarmaServer myKarmaServer;

  @Override
  public ProjectData loadCoverageData(@NotNull File sessionDataFile, @Nullable CoverageSuite baseCoverageSuite) {
    KarmaConfig karmaConfig = null;
    if (myKarmaServer != null) {
      karmaConfig = myKarmaServer.getKarmaConfig();
    }
    String basePath = null;
    if (karmaConfig != null) {
      basePath = karmaConfig.getBasePath();
    }
    if (basePath != null) {
      File basePathDir = new File(basePath);
      if (basePathDir.isAbsolute() && basePathDir.isDirectory()) {
        try {
View Full Code Here

Examples of com.intellij.javascript.karma.KarmaConfig

    return new BrowserStacktraceFilter(myProject, browserName, fileFinder);
  }

  @Nullable
  private Filter getBrowserErrorFilter() {
    KarmaConfig karmaConfig = myKarmaServer.getKarmaConfig();
    if (karmaConfig != null) {
      return new KarmaBrowserErrorFilter(myProject, karmaConfig);
    }
    return null;
  }
View Full Code Here

Examples of com.intellij.javascript.karma.KarmaConfig

    }
  }

  private static DebuggableFileFinder getDebuggableFileFinder(@NotNull KarmaServer karmaServer) {
    BiMap<String, VirtualFile> mappings = HashBiMap.create();
    KarmaConfig karmaConfig = karmaServer.getKarmaConfig();
    if (karmaConfig != null) {
      File basePath = new File(karmaConfig.getBasePath());
      VirtualFile vBasePath = VfsUtil.findFileByIoFile(basePath, false);
      if (vBasePath != null && vBasePath.isValid()) {
        String baseUrl = karmaServer.formatUrlWithoutUrlRoot("/base");
        mappings.put(baseUrl, vBasePath);
      }
View Full Code Here

Examples of com.intellij.javascript.karma.KarmaConfig

  @NotNull
  private String formatUrl(@NotNull String path, boolean withUrlRoot) {
    if (!path.startsWith("/")) {
      path = "/" + path;
    }
    KarmaConfig config = myState.getKarmaConfig();
    if (config != null) {
      String baseUrl = "http://" + config.getHostname() + ":" + getServerPort();
      String urlRoot = config.getUrlRoot();
      if (!withUrlRoot || "/".equals(urlRoot)) {
        return baseUrl + path;
      }
      return baseUrl + config.getUrlRoot() + path;
    }
    LOG.error("Karma config isn't ready yet.");
    return "http://localhost:" + getServerPort() + path;
  }
View Full Code Here

Examples of com.intellij.javascript.karma.KarmaConfig

  private boolean canSetBrowsersReady(@Nullable Boolean autoCaptured) {
    if (autoCaptured == Boolean.FALSE) {
      return true;
    }
    KarmaConfig config = myConfig;
    if (config == null) {
      return true;
    }
    int autoCapturedBrowsers = getAutoCapturedBrowserCount();
    return autoCapturedBrowsers == config.getBrowsers().size();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.