made changes in kivy-requirement.txt
This commit is contained in:
parent
4be622ac42
commit
bcf662b6d2
|
@ -1,34 +1,6 @@
|
||||||
certifi==2020.12.5
|
|
||||||
chardet==4.0.0
|
|
||||||
cheroot==8.5.2
|
|
||||||
CherryPy==18.6.0
|
|
||||||
docutils==0.16
|
|
||||||
idna==2.10
|
|
||||||
jaraco.classes==3.2.1
|
|
||||||
jaraco.collections==3.2.0
|
|
||||||
jaraco.functools==3.2.1
|
|
||||||
jaraco.text==3.5.0
|
|
||||||
json-rpc==1.13.0
|
|
||||||
Kivy==2.0.0
|
Kivy==2.0.0
|
||||||
Kivy-Garden==0.1.4
|
|
||||||
kivy-garden.qrcode==2021.314
|
kivy-garden.qrcode==2021.314
|
||||||
-e git+https://github.com/kivymd/KivyMD#egg=kivymd
|
-e git+https://github.com/kivymd/KivyMD#egg=kivymd
|
||||||
Mako==1.1.4
|
|
||||||
MarkupSafe==1.1.1
|
|
||||||
more-itertools==8.7.0
|
|
||||||
numpy==1.20.1
|
|
||||||
opencv-python==4.5.1.48
|
opencv-python==4.5.1.48
|
||||||
Pillow==8.1.2
|
|
||||||
portend==2.7.1
|
|
||||||
Pygments==2.8.1
|
|
||||||
pytz==2021.1
|
|
||||||
pyzbar==0.1.8
|
pyzbar==0.1.8
|
||||||
qrcode==6.1
|
telenium==0.5.0
|
||||||
requests==2.25.1
|
|
||||||
six==1.15.0
|
|
||||||
telenium==0.5.0
|
|
||||||
tempora==4.0.1
|
|
||||||
urllib3==1.26.4
|
|
||||||
Werkzeug==1.0.1
|
|
||||||
ws4py==0.5.1
|
|
||||||
zc.lockfile==2.0
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
"""
|
||||||
|
Base class for telenium test cases which run kivy app as background process
|
||||||
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -28,10 +32,10 @@ def cleanup(home=None, files=_files):
|
||||||
|
|
||||||
def set_temp_data():
|
def set_temp_data():
|
||||||
"""Set temp data in tmp directory"""
|
"""Set temp data in tmp directory"""
|
||||||
for file in tmp_db_file:
|
for file_name in tmp_db_file:
|
||||||
old_source_file = os.path.join(
|
old_source_file = os.path.join(
|
||||||
os.path.abspath(os.path.dirname(__file__)), 'sampleData', file)
|
os.path.abspath(os.path.dirname(__file__)), 'sampleData', file_name)
|
||||||
new_destination_file = os.path.join(os.environ['BITMESSAGE_HOME'], file)
|
new_destination_file = os.path.join(os.environ['BITMESSAGE_HOME'], file_name)
|
||||||
shutil.copyfile(old_source_file, new_destination_file)
|
shutil.copyfile(old_source_file, new_destination_file)
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,9 +53,17 @@ class TeleniumTestProcess(TeleniumTestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
def tearDownClass(cls):
|
||||||
"""Ensures that pybitmessage stopped and removes files"""
|
"""Ensures that pybitmessage stopped and removes files"""
|
||||||
|
# pylint: disable=no-member
|
||||||
|
try:
|
||||||
|
cls.cli.app_quit()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
cls.process.kill()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
cleanup()
|
cleanup()
|
||||||
cls.cli.app_quit()
|
|
||||||
cls.process.kill()
|
|
||||||
|
|
||||||
def click_on(self, xpath, seconds=0.3):
|
def click_on(self, xpath, seconds=0.3):
|
||||||
"""this methos is used for on_click event with time"""
|
"""this methos is used for on_click event with time"""
|
||||||
|
@ -60,15 +72,16 @@ class TeleniumTestProcess(TeleniumTestCase):
|
||||||
|
|
||||||
def drag(self, xpath1, xpath2):
|
def drag(self, xpath1, xpath2):
|
||||||
"""this method is for dragging"""
|
"""this method is for dragging"""
|
||||||
self.cli.drag(xpath1, xpath2, 1.5)
|
self.cli.drag(xpath1, xpath2, 1)
|
||||||
self.cli.sleep(0.3)
|
self.cli.sleep(0.3)
|
||||||
|
|
||||||
def assertCheckScrollDown(self, scroll_distance, destination, timeout=-1):
|
def assertCheckScrollDown(self, selector, timeout=-1):
|
||||||
"""this method is for checking scroll"""
|
"""this method is for checking scroll"""
|
||||||
start = time()
|
start = time()
|
||||||
while True:
|
while True:
|
||||||
if scroll_distance <= destination:
|
scroll_distance = self.cli.getattr('//ContentNavigationDrawer//ScrollView[0]', 'scroll_y')
|
||||||
self.assertLessEqual(scroll_distance, destination)
|
if scroll_distance > 0.0:
|
||||||
|
self.assertGreaterEqual(scroll_distance, 0.0)
|
||||||
return True
|
return True
|
||||||
if timeout == -1:
|
if timeout == -1:
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -17,8 +17,7 @@ class SettingScreen(TeleniumTestProcess):
|
||||||
# this is for scrolling Nav drawer
|
# this is for scrolling Nav drawer
|
||||||
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||||
# assert for checking scroll funcation
|
# assert for checking scroll funcation
|
||||||
scroll_distance = self.cli.getattr('//ContentNavigationDrawer//ScrollView[0]', 'scroll_y')
|
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
|
||||||
self.assertCheckScrollDown(scroll_distance, -0.0, timeout=1)
|
|
||||||
# this is for opening setting screen
|
# this is for opening setting screen
|
||||||
self.cli.wait_click('//NavigationItem[@text=\"Settings\"]', timeout=1)
|
self.cli.wait_click('//NavigationItem[@text=\"Settings\"]', timeout=1)
|
||||||
# Checking current screen
|
# Checking current screen
|
||||||
|
|
Reference in New Issue
Block a user