pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/appium/python-client/commit/fea88d1397d2721fa4da8a48a1a1a5cd6bbde6c7

.css" /> test: cleanup test more (#1032) · appium/python-client@fea88d1 · GitHub
Skip to content

Commit fea88d1

Browse files
authored
test: cleanup test more (#1032)
* test: cleanup duplicated tests more * test: just remove existing ones
1 parent 9cdfe5c commit fea88d1

File tree

7 files changed

+34
-184
lines changed

7 files changed

+34
-184
lines changed

.github/workflows/functional-test.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,12 @@ jobs:
9595
name: func_test_android1
9696
- target: test/functional/android/keyboard_tests.py test/functional/android/location_tests.py
9797
name: func_test_android2
98-
- target: test/functional/android/appium_service_tests.py
98+
- target: test/functional/android/appium_service_tests.py test/functional/android/chrome_tests.py
9999
name: func_test_android3
100-
- target: test/functional/android/finger_print_tests.py test/functional/android/screen_record_tests.py test/functional/android/settings_tests.py test/functional/android/chrome_tests.py
100+
- target: test/functional/android/finger_print_tests.py test/functional/android/screen_record_tests.py test/functional/android/settings_tests.py
101101
name: func_test_android4
102-
- target: test/functional/android/remote_fs_tests.py
102+
- target: test/functional/android/remote_fs_tests.py test/functional/android/log_event_tests.py
103103
name: func_test_android5
104-
- target: test/functional/android/common_tests.py test/functional/android/webelement_tests.py
105-
name: func_test_android6
106-
- target: test/functional/android/network_connection_tests.py test/functional/android/log_event_tests.py test/functional/android/hw_actions_tests.py
107-
name: func_test_android8
108104

109105
runs-on: ubuntu-latest
110106

@@ -234,7 +230,7 @@ jobs:
234230
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
235231
sudo udevadm control --reload-rules
236232
sudo udevadm trigger --name-match=kvm
237-
233+
238234
- name: Set up Python 3.12
239235
uses: actions/setup-python@v3
240236
with:
@@ -247,7 +243,7 @@ jobs:
247243

248244
- name: Install Appium
249245
run: npm install --location=global appium
250-
246+
251247
- name: Install Android drivers and Run Appium
252248
if: matrix.e2e-tests == 'flutter-android'
253249
run: |

test/functional/android/common_tests.py

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

test/functional/android/hw_actions_tests.py

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

test/functional/android/network_connection_tests.py

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

test/functional/android/webelement_tests.py

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

test/unit/webdriver/device/common_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@
1515
import httpretty
1616

1717
from appium.webdriver.webdriver import WebDriver
18-
from test.unit.helper.test_helper import android_w3c_driver, appium_command
18+
from test.unit.helper.test_helper import android_w3c_driver, appium_command, get_httpretty_request_body
1919

2020

2121
class TestWebDriverCommon(object):
2222
@httpretty.activate
2323
def test_open_notifications(self):
2424
driver = android_w3c_driver()
25-
httpretty.register_uri(httpretty.POST, appium_command('/session/1234567890/appium/device/open_notifications'))
2625
httpretty.register_uri(httpretty.POST, appium_command('/session/1234567890/execute/sync'))
2726
assert isinstance(driver.open_notifications(), WebDriver)
27+
assert {'args': [], 'script': 'mobile: openNotifications'} == get_httpretty_request_body(
28+
httpretty.last_request()
29+
)
2830

2931
@httpretty.activate
3032
def test_current_package(self):

test/unit/webdriver/webelement_test.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ def test_send_key_with_file(self):
6262
d = get_httpretty_request_body(httpretty.last_request())
6363
assert d['text'] == ''.join(d['value'])
6464

65+
@httpretty.activate
66+
def test_clear(self):
67+
driver = android_w3c_driver()
68+
httpretty.register_uri(httpretty.POST, appium_command('/session/1234567890/element/element_id/clear'))
69+
70+
element = MobileWebElement(driver, 'element_id')
71+
element.clear()
72+
6573
@httpretty.activate
6674
def test_get_attribute_with_dict(self):
6775
driver = android_w3c_driver()
@@ -79,3 +87,20 @@ def test_get_attribute_with_dict(self):
7987

8088
assert isinstance(ef, dict)
8189
assert ef == rect_dict
90+
91+
@httpretty.activate
92+
def test_element_location_in_view(self):
93+
driver = android_w3c_driver()
94+
location_in_view = {'y': 200, 'x': 100}
95+
httpretty.register_uri(
96+
httpretty.GET,
97+
appium_command('/session/1234567890/element/element_id/location_in_view'),
98+
body=json.dumps({"value": location_in_view}),
99+
)
100+
101+
element = MobileWebElement(driver, 'element_id')
102+
loc = element.location_in_view
103+
104+
httpretty.last_request()
105+
106+
assert loc == location_in_view

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy