Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert View step ammends #64

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 25 additions & 4 deletions gem/lib/frank-cucumber/core_frank_steps.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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|
Expand Down