首页 > 解决方案 > .feature 文件中的 Intellij IDEA 语言注入

问题描述

我在.feature文件中定义了一个 Cucumber 场景,我在其中测试了我开发的 API:

Given Something
When an API call is executed: GET '/v1/my/endpoint'
Then response status is OK
And response body is:
"""
{
  "id": "id-1",
  "message": "it worked"
}
"""

我希望能够突出显示 JSON 片段的语法。在 docs 1 2中找不到任何内容。语言注入注释也不起作用:

# language=javascript
And response body is:
"""
{
  "id": "id-1",
  "message": "it worked"
}
"""

所以问题是如何使语言注入在.feature文件中工作?

标签: intellij-ideacucumbergherkincucumber-java

解决方案


该功能暂不支持,欢迎投票。


推荐阅读