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