Package fitnesse.html

Examples of fitnesse.html.HtmlTag.addAttribute()


  protected void addStopLink(String stopResponderId) {
    String link = "?responder=stoptest&id=" + stopResponderId;

    HtmlTag status = HtmlUtil.makeSilentLink(link, new RawHtml("Stop Test"));
    status.addAttribute("class", "stop");

    writeData(HtmlUtil.makeReplaceElementScript("test-action", status.html()).html());
  }

  protected void removeStopTestLink() {
View Full Code Here


    return init.html();
  }

  public static String makeExecutionStatusLink(String linkHref, ExecutionStatus executionStatus) {
    HtmlTag status = HtmlUtil.makeLink(linkHref, executionStatus.getMessage());
    status.addAttribute("class", executionStatus.getStyle());
    return status.html();
  }

}
View Full Code Here

  private void writeTestOutputDiv(String relativeName, String fullPathName) {
    if (!testBasePathName.equals(fullPathName)) {
      HtmlTag pageNameBar = HtmlUtil.makeDivTag("test_output_name");
      HtmlTag anchor = HtmlUtil.makeLink(fullPathName, relativeName);
      anchor.addAttribute("id", relativeName + currentTest);
      anchor.addAttribute("class", "test_name");
      HtmlTag title = new HtmlTag("h3", anchor);

      HtmlTag topLink = HtmlUtil.makeLink("#" + TEST_SUMMARIES_ID, "Top");
      topLink.addAttribute("class", "top_of_page");
View Full Code Here

  private void writeTestOutputDiv(String relativeName, String fullPathName) {
    if (!testBasePathName.equals(fullPathName)) {
      HtmlTag pageNameBar = HtmlUtil.makeDivTag("test_output_name");
      HtmlTag anchor = HtmlUtil.makeLink(fullPathName, relativeName);
      anchor.addAttribute("id", relativeName + currentTest);
      anchor.addAttribute("class", "test_name");
      HtmlTag title = new HtmlTag("h3", anchor);

      HtmlTag topLink = HtmlUtil.makeLink("#" + TEST_SUMMARIES_ID, "Top");
      topLink.addAttribute("class", "top_of_page");
View Full Code Here

      anchor.addAttribute("id", relativeName + currentTest);
      anchor.addAttribute("class", "test_name");
      HtmlTag title = new HtmlTag("h3", anchor);

      HtmlTag topLink = HtmlUtil.makeLink("#" + TEST_SUMMARIES_ID, "Top");
      topLink.addAttribute("class", "top_of_page");

      pageNameBar.add(title);
      pageNameBar.add(topLink);
      writeData(pageNameBar.html());
    }
View Full Code Here

    text = text.replaceAll(" ", " ");
    HtmlTag progressDiv = new HtmlTag("div", text);

    // need some results before we can check pageCounts for results
    ExecutionResult cssClass = (currentTest == 1) ? ExecutionResult.PASS : getExecutionResult(relativeName, this.pageCounts);
    progressDiv.addAttribute("id", "progressBar");
    progressDiv.addAttribute("class", cssClass.toString());
    progressDiv.addAttribute("style", "width:" + percentFinished + "%");

    return progressDiv.html();
  }
View Full Code Here

    HtmlTag progressDiv = new HtmlTag("div", text);

    // need some results before we can check pageCounts for results
    ExecutionResult cssClass = (currentTest == 1) ? ExecutionResult.PASS : getExecutionResult(relativeName, this.pageCounts);
    progressDiv.addAttribute("id", "progressBar");
    progressDiv.addAttribute("class", cssClass.toString());
    progressDiv.addAttribute("style", "width:" + percentFinished + "%");

    return progressDiv.html();
  }
View Full Code Here

    // need some results before we can check pageCounts for results
    ExecutionResult cssClass = (currentTest == 1) ? ExecutionResult.PASS : getExecutionResult(relativeName, this.pageCounts);
    progressDiv.addAttribute("id", "progressBar");
    progressDiv.addAttribute("class", cssClass.toString());
    progressDiv.addAttribute("style", "width:" + percentFinished + "%");

    return progressDiv.html();
  }

  public void processTestResults(String relativeName, TestSummary testSummary) throws IOException {
View Full Code Here

    HtmlTag tag = new HtmlTag("li");

    tag.add(HtmlUtil.makeSpanTag("results " + getExecutionResult(relativeName, testSummary), testSummary.toString()));

    HtmlTag link = HtmlUtil.makeLink("#" + relativeName + currentTest, relativeName);
    link.addAttribute("class", "link");
    tag.add(link);

    if (latestTestTime != null) {
      tag.add(HtmlUtil.makeSpanTag("", String.format("(%.03f seconds)", latestTestTime.elapsedSeconds())));
    }
View Full Code Here

  @Override
  public String getAsText() {
    // Use HtmlTag, same as we do for fitnesse.wikitext.parser.HashTable.
    Map<Object, Object> hash = (Map) getValue();
    HtmlTag table = new HtmlTag("table");
    table.addAttribute("class", "hash_table");
    for (Map.Entry<Object, Object> entry : hash.entrySet()) {
      HtmlTag row = new HtmlTag("tr");
      row.addAttribute("class", "hash_row");
      table.add(row);
      String key = entry.getKey().toString();
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.