Sha256: 748a2cb17e98dc478cfc5befff6bebac234ec1360bfea892896277fa1a8d7dce

Contents?: true

Size: 718 Bytes

Versions: 14

Compression:

Stored size: 718 Bytes

Contents

When /^I choose the "([^"]*)" plan$/ do |plan_name|
  input_id = page.find(:xpath, "//label/p[contains(text(),'#{plan_name}')]/../@for").node.value
  choose(input_id)
end

Then /^the "([^"]*)" plan should be disabled$/ do |plan_name|
  input_id = page.find(:xpath, "//label/p[contains(text(),'#{plan_name}')]/../@for").node.value
  page.should have_css("##{input_id}[disabled='disabled']")
end

When /^I should see the "([^"]*)" plan before the "([^"]*)" plan$/ do |first_plan_name, second_plan_name|
  first_expression  = Regexp.escape(first_plan_name)
  second_expression = Regexp.escape(second_plan_name)
  joint_expression  = /#{first_expression}.*#{second_expression}/m
  page.body.should =~ joint_expression
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
saucy-0.2.27 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.26 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.25 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.24 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.21 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.20 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.18 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.17 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.16 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.15 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.14 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.13 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.12 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.2.11 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb