-
-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TouchID Implementation [iOS Sim Only] (#509)
* Fixed broken tests Tests were failing because of an indentation problem in IOSGesturesTest.java and because a static import in XCUIAutomationTest.java was coming after the rest of the imports instead of before * Added 'touch_id' endpoint (See https://support.apple.com/en-ca/HT201371 for description of the Touch ID feature) This endpoint simulates the TouchID feature. * removed obselete gson-2.6.2 dependency. (#507) * Fix documentation * Fix documentation * Don't commit 'touchID()' This will be added post release * Added touchId test This test only executes the driver.touchId method, it doesn't do any assertions. Just verifies that it doesn't throw any exceptions. * Added assertion to keep codacy happy * Fixed broken tests Tests were failing because of an indentation problem in IOSGesturesTest.java and because a static import in XCUIAutomationTest.java was coming after the rest of the imports instead of before * Added 'touch_id' endpoint (See https://support.apple.com/en-ca/HT201371 for description of the Touch ID feature) This endpoint simulates the TouchID feature. * Fix documentation * Fix documentation * Don't commit 'touchID()' This will be added post release * Added touchId test This test only executes the driver.touchId method, it doesn't do any assertions. Just verifies that it doesn't throw any exceptions. * Added assertion to keep codacy happy * Moved touchID into new file -Moved touchID out of IOSDeviceActionShorcuts and into PerformsTouchID -Made IOSDriver implement PerformsTouchID -Fixed typo that I noticed in CommandExecutionHelper -Fixed linting errors * Fixed conflicts * Update IOSMobileCommandHelper.java * Throws exception instead of bogus assertion
- Loading branch information
1 parent
9f214cd
commit 3e9c949
Showing
8 changed files
with
378 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/io/appium/java_client/ios/PerformsTouchID.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.appium.java_client.ios; | ||
|
||
import static io.appium.java_client.ios.IOSMobileCommandHelper.touchIdCommand; | ||
|
||
import io.appium.java_client.CommandExecutionHelper; | ||
import io.appium.java_client.ExecutesMethod; | ||
|
||
public interface PerformsTouchID extends ExecutesMethod { | ||
|
||
/** | ||
* Simulate touchId event | ||
* | ||
* @param match If true, simulates a successful fingerprint scan. If false, simulates a failed fingerprint scan. | ||
*/ | ||
default void performTouchID(boolean match) { | ||
CommandExecutionHelper.execute(this, touchIdCommand(match)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters