【问题标题】:F# Canopy - how can I use the "context" tests?F# Canopy - 我如何使用“上下文”测试?
【发布时间】:2014-07-28 07:31:50
【问题描述】:

我不知道如何使用 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.

【问题讨论】:

  • :context: "..." 中是多余的。
  • 啊,是的,我正在测试并在发布此问题之前添加了这一点。但是,您提到我的语法错误,导致我遇到了另一个问题。谢谢,我会在几分钟后发布我的新问题。

标签: f# canopy-web-testing


【解决方案1】:

@Eugene Fotin,指出我的语法错误“:”。我已经解决了这个问题,构建错误消失了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-02-11
    • 2017-06-13
    • 1970-01-01
    • 2018-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多