PageRenderTime 28ms CodeModel.GetById 22ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/scalate-war/src/test/scala/org/fusesource/scalate/console/ConsoleTest.scala

http://github.com/scalate/scalate
Scala | 52 lines | 1 code | 1 blank | 50 comment | 0 complexity | 49d8979bf809a195217f13c148437528 MD5 | raw file
 1package org.fusesource.scalate.console
 2
 3//import _root_.org.junit.runner.RunWith
 4//import _root_.org.scalatest.junit.JUnitRunner
 5//import org.scalatest.{ ConfigMap, FunSuite }
 6//import _root_.org.fusesource.scalate.test._
 7//import java.io.File
 8//
 9///**
10// * @version $Revision : 1.1 $
11// */
12//@RunWith(classOf[JUnitRunner])
13//class ConsoleTest extends FunSuite with WebServerMixin with WebDriverMixin {
14//  test("home page") {
15//    webDriver.get(rootUrl)
16//    pageContains("Scalate")
17//  }
18//
19//  test("create Simple Resource") {
20//    webDriver.get(rootUrl)
21//
22//    // lets find the console link
23//    xpath("//a[@class = 'consoleLink']").click
24//
25//    xpath("//a[@title = 'Create Simple Resource']").click
26//
27//    xpath("//form[@class='createArchetype']").submit
28//
29//    // TODO use a trim in an xpath
30//    pageContains("Try the New Resource")
31//
32//    // Note we now need to test the generated resource after we restart the web app
33//    // which requires rebuilding the genreated scala files
34//    // so see the TestGeneratedConsoleFiles.scala for the rest of this test
35//    // which we run on the generated archetypes
36//  }
37//
38//  override protected def beforeAll(configMap: ConfigMap) = {
39//    System.setProperty("scalate.mode", "development")
40//    super.beforeAll(configMap)
41//
42//    // lets force generated files into a new temporary directory
43//    if (System.getProperty("scalate.generate.src", "").length == 0) {
44//      val file = File.createTempFile("scalate-gen-src-", ".dir")
45//      file.delete
46//      file.mkdirs
47//      val genSrcDir = file.getPath
48//      info("setting source generation directory to: " + genSrcDir)
49//      System.setProperty("scalate.generate.src", genSrcDir)
50//    }
51//  }
52//}