使用Capybara和poltergeist测试我的应用时,我遇到了一个奇怪的错误。
/features/document.feature
@javascript
Scenario: admin users can publish documents
Given a "admin" user exists and is signed in
And the following categories exist:
| name |
| Category 1 |
And the following documents exist:
| name | id |
| Test Document 1 | 1 |
And I goto "/admin/documents"
When I toggle publish document
And I wait for index
Then Document "Test Document 1" should be published
And I should see "Document published successfully!"
结果:
Failing Scenarios:
cucumber features/admin_features/document.feature:135 # Scenario: admin users can publish documents.
我尝试调试,我按预期获得输出,即文档成功发布!但我不知道为什么在情景成功后测试失败了。我认为它适应了一些配置问题。
答案 0 :(得分:0)
我弄清楚为什么场景失败了....实际上我将黄瓜从2.0.0降级到1.3.8并且它向我展示了确切的错误。无论如何感谢Mark