Skip to content

Commit

Permalink
Merge branch 'remove-uiautomation-in-ios7' of github.com:MichaelBuckl…
Browse files Browse the repository at this point in the history
…ey/Frank into remove-uiautomation-in-ios7
  • Loading branch information
MichaelBuckley committed Jan 19, 2014
2 parents 0f41d7b + 908b675 commit 93ac615
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Then /^I touch the alert view's "(.*?)" button$/ do |button_mark|
touch "alertView button marked:'#{button_mark}'"
touch "view:'_UIModalItemTableViewCell' marked:'#{button_mark}'"
end
8 changes: 5 additions & 3 deletions example/Controls/features/ui_alert_view.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ Scenario Outline: Showing and dismissing the Alert View

When I touch "Show UIAlertView"
Then I should see "AlertView Title"
And I should see a button "Button1"
And I should see a button "Button 2"
And I should see "Button1"
And I should see "Button 2"

When I touch the alert view's "Ok" button
And I wait for nothing to be animating
And I wait for nothing to be animating
Then I should not see "AlertView Title"
And I should not see "Button1"
And I should not see "Button 2"

Examples:
| orientation |
Expand Down
8 changes: 4 additions & 4 deletions gem/lib/frank-cucumber/frank_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,23 @@ def element_exists( selector )
# @raise an rspec exception if the assertion fails
# @see #element_exists, #check_element_does_not_exist
def check_element_exists( selector )
element_exists( selector ).should be_true
element_exists( selector ).should be_true, "Could not find element matching selector (#{selector})"
end

def check_element_exists_and_is_visible( selector )
element_is_not_hidden( selector ).should be_true
element_is_not_hidden( selector ).should be_true, "Could not find visible element matching selector (#{selector})"
end

# Assert whether there are no views in the current view heirarchy which match the specified selector.
# @param [String] selector a view selector.
# @raise an rspec exception if the assertion fails
# @see #element_exists, #check_element_exists
def check_element_does_not_exist( selector )
element_exists( selector ).should be_false
element_exists( selector ).should be_false, "Found element matching selector when it should not exist (#{selector})"
end

def check_element_does_not_exist_or_is_not_visible( selector )
element_is_not_hidden( selector ).should be_false
element_is_not_hidden( selector ).should be_false, "Found visible element matching selector when it should not be visible (#{selector})"
end

# Indicate whether there are any views in the current view heirarchy which contain the specified accessibility label.
Expand Down

0 comments on commit 93ac615

Please sign in to comment.