diff --git a/gem/lib/frank-cucumber/core_frank_steps.rb b/gem/lib/frank-cucumber/core_frank_steps.rb index d45c30b6..c79f52c4 100644 --- a/gem/lib/frank-cucumber/core_frank_steps.rb +++ b/gem/lib/frank-cucumber/core_frank_steps.rb @@ -71,10 +71,27 @@ values.should include(expected_mark) end -Then /^I should see an alert view titled "([^\"]*)"$/ do |expected_mark| - values = frankly_map( 'alertView', 'message') - puts values - values.should include(expected_mark) +Then /^I should (not )?see an alert view with title "([^\"]*)"$/ do |qualifier, expected_mark| + expected_to_see = "not " != qualifier + values = frankly_map( 'alertView', 'title') + puts values + if expected_to_see + values.should include(expected_mark) + else + values.should_not include(expected_mark) + end + +end + +Then /^I should (not )?see an alert view with message "([^\"]*)"$/ do |qualifier, expected_mark| + expected_to_see = "not " != qualifier + values = frankly_map( 'alertView', 'message') + puts values + if expected_to_see + values.should include(expected_mark) + else + values.should_not include(expected_mark) + end end Then /^I should not see an alert view$/ do @@ -233,6 +250,10 @@ touch( "alertView threePartButton tag:#{ordinal}" ) end +When /^I touch the alert view button marked "([^\"]*)"$/ do |mark| + touch( "alertView button marked:'#{mark}'" ) +end + # -- switch -- # When /^I flip switch "([^\"]*)"$/ do |mark|