Sha256: 3452239e1733c5c53cfb4b942022e579416dd67d3d254f20ed26eabb451d7ec2

Contents?: true

Size: 1023 Bytes

Versions: 34

Compression:

Stored size: 1023 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

Then "I should see that the plan is a trial plan" do
  within(".plan.chosen") do
    page.should have_content("Trial")
  end
end

Then "I should see that the plan is not a trial plan" do
  within(".plan.chosen") do
    page.should have_no_content("Trial")
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
saucy-0.16.1 features/step_definitions/engine/plan_steps.rb
saucy-0.16.0 features/step_definitions/engine/plan_steps.rb
saucy-0.15.2 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.15.1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.15.0 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.14.5 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.14.3 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.10.10 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.14.2 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.14.1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.14.0 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.13.3 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.13.2 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.10.9 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.10.8 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.13.1 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.13.0 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.12.5 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.12.4 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb
saucy-0.12.3 lib/generators/saucy/features/templates/step_definitions/plan_steps.rb