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

Add toggle touch id enrollment #521

Merged
merged 4 commits into from
Mar 28, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ios_tests/lib/ios/specs/common/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def before_first
Selenium::WebDriver::Remote::Bridge.method_defined?(:pull_file).must_equal true
Selenium::WebDriver::Remote::Bridge.method_defined?(:pull_folder).must_equal true
Selenium::WebDriver::Remote::Bridge.method_defined?(:touch_id).must_equal true
Selenium::WebDriver::Remote::Bridge.method_defined?(:toggle_touch_id_enrollment).must_equal true
Selenium::WebDriver::Remote::Bridge.method_defined?(:get_settings).must_equal true
Selenium::WebDriver::Remote::Bridge.method_defined?(:update_settings).must_equal true
Selenium::WebDriver::Remote::Bridge.method_defined?(:touch_actions).must_equal true
Expand Down
1 change: 1 addition & 0 deletions lib/appium_lib/common/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module Commands

# iOS
touch_id: [:post, 'session/:session_id/appium/simulator/touch_id'.freeze]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add , at the end of this line

toggle_touch_id_enrollment: [:post, 'session/:session_id/appium/simulator/toggle_touch_id_enrollment'.freeze]
}.merge(COMMAND_NO_ARG).merge(::Selenium::WebDriver::Remote::Bridge::COMMANDS).freeze
end
end
Expand Down
10 changes: 10 additions & 0 deletions lib/appium_lib/device/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ module Device
# touch_id false #=> Simulate invalid fingerprint
# ```

# @!method toggle_touch_id_enrollment
# iOS Simulator only: Toggle touch id enrollment on an iOS Simulator.

# @!method end_coverage
# Android only; Ends the test coverage and writes the results to the given path on device.
# @param [String] path Path on the device to write too.
Expand Down Expand Up @@ -339,6 +342,13 @@ def touch_id(match = true)
end
end

# TODO: TEST ME
add_endpoint_method(:toggle_touch_id_enrollment) do
def toggle_touch_id_enrollment()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove ()

execute :toggle_touch_id_enrollment, {}
end
end

# TODO: TEST ME
add_endpoint_method(:end_coverage) do
def end_coverage(path, intent)
Expand Down