Skip to content

Commit

Permalink
Merge pull request moredip#260 from seanoshea/master
Browse files Browse the repository at this point in the history
Allowing UIAlertViews be queryable in iOS7.
  • Loading branch information
moredip committed Dec 6, 2013
2 parents e955c48 + 452df56 commit 0bc4aab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions gem/lib/frank-cucumber/core_frank_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@
end

Then /^I should see an alert view titled "([^\"]*)"$/ do |expected_mark|
values = frankly_map( 'alertView', 'title')
if frankly_os_version.to_f >= 7.0
values = frankly_map( "view:'_UIModalItemRepresentationView' label", 'text')
else
values = frankly_map( 'alertView', 'title')
end
values.should include(expected_mark)
end

Expand All @@ -76,7 +80,11 @@
end

Then /^I should not see an alert view$/ do
check_element_does_not_exist( 'alertView' )
if frankly_os_version.to_f >= 7.0
check_element_does_not_exist( '_UIModalItemRepresentationView' )
else
check_element_does_not_exist( 'alertView' )
end
end

Then /^I should see an element of class "([^\"]*)" with name "([^\"]*)" with the following labels: "([^\"]*)"$/ do |className, classLabel, listOfLabels|
Expand Down

0 comments on commit 0bc4aab

Please sign in to comment.