0

The example from Capybara documentation. They tag the whole scenario:

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
  ...

But I want to tag only one step:

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"

Is it acceptable behavior? Or do I need to create a separate @javascript tagged Scenario for only this click action?

Green
  • 28,742
  • 61
  • 158
  • 247

1 Answers1

0

It seems no. I got Gherkin::Parser::ParseError:

../features/deleting_tickets.feature: Parse error at ../features/deleting_tickets.feature:17. 

Found step when expecting one of: examples, feature, scenario, scenario_outline, tag.
(Current state: tag). (Gherkin::Parser::ParseError)

So one more disadvantage met.

Green
  • 28,742
  • 61
  • 158
  • 247