예제 #1
0
 private Response makePageHistoryResponse(Request request) {
   page.setTitle("Page History");
   page.put("pageHistory", pageHistory);
   page.setNavTemplate("viewNav");
   page.put("viewLocation", request.getResource());
   page.setMainTemplate("pageHistory");
   return makeResponse();
 }
예제 #2
0
 private Response generateHtmlTestExecutionResponse(Request request, TestExecutionReport report)
     throws Exception {
   page.setTitle("Test Execution Report");
   page.setNavTemplate("viewNav");
   page.put("viewLocation", request.getResource());
   page.put("testExecutionReport", report);
   page.put("ExecutionResult", ExecutionResult.class);
   page.setMainTemplate("testExecutionReport");
   page.setErrorNavTemplate("errorNavigator");
   page.put("errorNavOnDocumentReady", true);
   return makeResponse();
 }
예제 #3
0
 private Response generateHtmlSuiteExecutionResponse(Request request, SuiteExecutionReport report)
     throws Exception {
   page.setTitle("Suite Execution Report");
   page.setNavTemplate("viewNav");
   page.put("viewLocation", request.getResource());
   page.put("suiteExecutionReport", report);
   page.put("ExecutionResult", ExecutionResult.class);
   page.setMainTemplate("suiteExecutionReport");
   return makeResponse();
 }
예제 #4
0
  private void prepareResponse(Request request) {
    response = new SimpleResponse();
    if (resultsDirectory == null) resultsDirectory = context.getTestHistoryDirectory();
    history = new TestHistory();
    pageName = request.getResource();
    history.readPageHistoryDirectory(resultsDirectory, pageName);
    pageHistory = history.getPageHistory(pageName);
    page = context.pageFactory.newPage();

    String tags = "";
    if (context.root != null) {
      WikiPagePath path = PathParser.parse(pageName);
      PageCrawler crawler = context.root.getPageCrawler();
      WikiPage wikiPage = crawler.getPage(path);
      if (wikiPage != null) {
        PageData pageData = wikiPage.getData();
        tags = pageData.getAttribute(PageData.PropertySUITES);
      }
    }

    pageTitle = new PageTitle("Test History", PathParser.parse(request.getResource()), tags);
    page.setPageTitle(pageTitle);
  }
예제 #5
0
 private Response makeResponse() {
   response.setContent(page.html());
   return response;
 }