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