Skip to content

Commit 8440da7

Browse files
committed
refactor: remove legacy fallbacks for hw_actions extension
Removed the legacy Appium extension presence checks and try-except fallbacks for `lock`, `unlock`, `is_locked`, `shake`, `finger_print`, `touch_id`, and `toggle_touch_id_enrollment` in `HardwareActions`. The commands now exclusively rely on executing scripts with the `mobile:` prefix. Removed inheritance from `CanRememberExtensionPresence` and cleaned up tests to assert on the script execution endpoints.
1 parent 71a53ff commit 8440da7

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

test/unit/webdriver/device/lock_test.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ def test_islocked_true(self):
5151
def test_unlock(self):
5252
driver = android_w3c_driver()
5353
httpretty.register_uri(
54-
httpretty.POST, appium_command('/session/1234567890/execute/sync'), responses=[
54+
httpretty.POST,
55+
appium_command('/session/1234567890/execute/sync'),
56+
responses=[
5557
httpretty.Response(body='{"value": true}'),
5658
httpretty.Response(body='{"value": ""}'),
57-
]
59+
],
5860
)
5961
assert isinstance(driver.unlock(), WebDriver)
6062

@@ -92,10 +94,12 @@ def test_islocked_true(self):
9294
def test_unlock(self):
9395
driver = ios_w3c_driver()
9496
httpretty.register_uri(
95-
httpretty.POST, appium_command('/session/1234567890/execute/sync'), responses=[
97+
httpretty.POST,
98+
appium_command('/session/1234567890/execute/sync'),
99+
responses=[
96100
httpretty.Response(body='{"value": true}'),
97101
httpretty.Response(body='{"value": ""}'),
98-
]
102+
],
99103
)
100104
assert isinstance(driver.unlock(), WebDriver)
101105

0 commit comments

Comments
 (0)