启用播放时黄瓜无法识别步骤

时间:2015-07-06 06:03:10

标签: scala playframework cucumber

使用示例sbt应用程序,当我在src / test / resources中添加功能以及src / test / scala中的步骤时,它运行良好。当我启用播放并将以下行添加到build.sbt时,它将停止识别功能和步骤

 let group = dispatch_group_create()

    for item: AnyObject in self.extensionContext!.inputItems {
        let inputItem = item as! NSExtensionItem
        for provider: AnyObject in inputItem.attachments! {
            let itemProvider = provider as! NSItemProvider
            if itemProvider.hasItemConformingToTypeIdentifier("public.url") {
                dispatch_group_enter(group)
                itemProvider.loadItemForTypeIdentifier("public.url", options: nil, completionHandler: {
                    (result: NSSecureCoding!, error: NSError!) -> Void in
                    //...
                    dispatch_group_leave(group)
                });
            }
            if itemProvider.hasItemConformingToTypeIdentifier(kUTTypeImage as String) {
                dispatch_group_enter(group)
                itemProvider.loadItemForTypeIdentifier(kUTTypeImage as String, options: nil, completionHandler: { (result, error) -> Void in
                    if let resultURL = result as? NSURL {
                        if let image = UIImage(data: NSData(contentsOfURL: resultURL)!) {
                            // ...
                        }
                    }
                    dispatch_group_leave(group)
                });
            }
        }
    }
    dispatch_group_notify(group,dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {
        self.extensionContext!.completeRequestReturningItems([], completionHandler: nil)
    })

如果我添加 cucumberFeaturesLocation:=“src / test / resources” 到build.sbt文件,它会获取功能,但仍然找不到步骤。

这就是我的plugins.sbt看起来的样子

lazy val root = (project in file(".")).enablePlugins(PlayScala)

我的build.sbt如下所示:

 resolvers += "Templemore Repository" at "https://templemore.co.uk/repo/"

addSbtPlugin("templemore" % "sbt-cucumber-plugin" % "0.9.0-SNAPSHOT")

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.9")

如果我删除了enablePlugins行,它会获取步骤文件,但它们无法编译,因为它找不到播放库。有关如何解决此问题的任何建议吗?

0 个答案:

没有答案