Now let's fix the controller tests. The first one will be the product controller.
Your ProductControllerTestSpec.scala
file should look like this:
class ProductControllerTestSpec extends PlaySpec with OneServerPerSuite with OneBrowserPerSuite with HtmlUnitFactory { "ProductController" should { DBCleaner.cleanUp() "insert a new product should be ok" in { goTo(s"http://localhost:${port}/product/add") click on id("name") enter("Blue Ball") click on id("details") enter("Blue Ball is a Awesome and simple product") click on id("price") enter("17.55") submit() } "details from the product 1 should be ok" in { goTo(s"http://localhost:${port}/product/details/1") textField("name").value mustBe "Blue Ball" textField("details").value mustBe "Blue Ball is a Awesome and simple product" ...