Sha256: 4e464302e7ec426b32d1beaa29c02fc6cebd61722bc0ed20413ddc5e0b9519cd

Contents?: true

Size: 756 Bytes

Versions: 31

Compression:

Stored size: 756 Bytes

Contents

When /^I choose the "([^"]*)" plan$/ do |plan_name|
  input_id = find(:xpath, "//li[contains(@class, 'plan')]//p[contains(text(), '#{plan_name}')]/../../input")["id"]
  choose(input_id)
end

Then /^the "([^"]*)" plan should be disabled$/ do |plan_name|
  input_id = find(:xpath, "//li[contains(@class, 'plan')]//p[contains(text(), '#{plan_name}')]/../../input")["id"]
  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

31 entries across 31 versions & 2 rubygems

Version Path
saasy-0.0.2.alpha3 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saasy-0.0.2.alpha2 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saasy-0.0.2.alpha1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.9.1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.9.0 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.8.5 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.8.4 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.8.3 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saasy-0.0.1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.8.2 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.8.1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.8.0 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.7.3 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.7.2 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.7.1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.7.0 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.6.1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.6.0 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.5.5 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.5.4 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb