0
來自Capybara文檔的示例。他們吊牌全場景:水豚:是否可以在場景中標記`@ javascript`只有一步?不是整個場景?
You can switch to the Capybara.javascript_driver (:selenium by default) by tagging scenarios (or features) with @javascript:
@javascript
Scenario: do something Ajaxy
When I click the Ajax link
...
但我想標記一個步驟:
Background:
Given I am on the homepage
And There is a button "Click me"
When I click the button "Click me"
@javascript
Then I should see a js pop-up element "Hello" within "#hello .hello"
是可以接受的行爲嗎?或者,我是否需要爲此點擊操作創建單獨的@javascript
已標記的情景?