Skip to content

Commit 00f50d1

Browse files
committed
test: define mobile ext command in unit test instead of functional
1 parent bb8d509 commit 00f50d1

File tree

3 files changed

+24
-61
lines changed

3 files changed

+24
-61
lines changed

.github/workflows/functional-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
name: func_test_android6
106106
- target: test/functional/android/applications_tests.py
107107
name: func_test_android7
108-
- target: test/functional/android/network_connection_tests.py test/functional/android/log_event_tests.py test/functional/android/activities_tests.py test/functional/android/hw_actions_tests.py
108+
- target: test/functional/android/network_connection_tests.py test/functional/android/log_event_tests.py test/functional/android/hw_actions_tests.py
109109
name: func_test_android8
110110

111111
runs-on: ubuntu-latest

test/functional/android/activities_tests.py

Lines changed: 0 additions & 60 deletions
This file was deleted.

test/unit/webdriver/webdriver_test.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,29 @@ class CustomAppiumConnection(AppiumConnection):
369369
assert isinstance(driver.command_executor, CustomAppiumConnection)
370370

371371

372+
@httpretty.activate
373+
def test_extention_command_check(self):
374+
driver = android_w3c_driver()
375+
httpretty.register_uri(
376+
httpretty.POST, appium_command('/session/1234567890/execute/sync'), body='{"value": true}'
377+
)
378+
assert driver.execute_script(
379+
'mobile: startActivity',
380+
{
381+
'component': 'io.appium.android.apis/.accessibility.AccessibilityNodeProviderActivity'
382+
}
383+
) is True
384+
385+
assert {
386+
'args': [
387+
{
388+
'component': 'io.appium.android.apis/.accessibility.AccessibilityNodeProviderActivity'
389+
}
390+
],
391+
'script': 'mobile: startActivity'
392+
}, get_httpretty_request_body(httpretty.last_request())
393+
394+
372395
class SubWebDriver(WebDriver):
373396
def __init__(self, command_executor, direct_connection=False, options=None):
374397
super().__init__(

0 commit comments

Comments
 (0)