我很难理解如何格式化" context"使用Canopy API进行测试。
以下网站列出了示例,但我无法使用以下代码构建我的程序。我尝试了其他缩进,没有任何改变。
参考:http://lefthandedgoat.github.io/canopy/testing.html
context: "Change text in the fields"
once(fun _ -> contains "98402" (read "#ZipCodeID"))
before(fun _ -> "#FirstNameID" << "Paul")
after(fun _ -> "#CityID" == "Tacoma")
lastly(fun _ -> "#StateID" == "WA")
这会出现以下错误:
Error 1 Incomplete structured construct at or before this point in lambda expression. Expected incomplete structured construct at or before this point or other token.
答案 0 :(得分:2)