|
|
|
@ -291,25 +291,21 @@ Then /^the "([^"]*)" field should have no error$/ do |field| |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
Then /^the "([^"]*)" checkbox(?: within (.*))? should be checked$/ do |label, parent| |
|
|
|
|
with_scope(parent) do |
|
|
|
|
field_checked = find_field(label)['checked'] |
|
|
|
|
if field_checked.respond_to? :should |
|
|
|
|
field_checked.should be_true |
|
|
|
|
else |
|
|
|
|
assert field_checked |
|
|
|
|
end |
|
|
|
|
Then /^the "([^"]*)" checkbox should be checked$/ do |label | |
|
|
|
|
field_checked = find_field(label)['checked'] |
|
|
|
|
if field_checked.respond_to? :should |
|
|
|
|
field_checked.should be_true |
|
|
|
|
else |
|
|
|
|
assert field_checked |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label, parent| |
|
|
|
|
with_scope(parent) do |
|
|
|
|
field_checked = find_field(label)['checked'] |
|
|
|
|
if field_checked.respond_to? :should |
|
|
|
|
field_checked.should be_false |
|
|
|
|
else |
|
|
|
|
assert !field_checked |
|
|
|
|
end |
|
|
|
|
Then /^the "([^"]*)" checkbox should not be checked$/ do |label | |
|
|
|
|
field_checked = find_field(label)['checked'] |
|
|
|
|
if field_checked.respond_to? :should |
|
|
|
|
field_checked.should be_false |
|
|
|
|
else |
|
|
|
|
assert !field_checked |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|