fixed flake8 CQ issues
This commit is contained in:
parent
70c0d31906
commit
4f69119eb8
|
@ -33,10 +33,7 @@ RUN apt install -qq --yes --no-install-recommends \
|
||||||
sudo \
|
sudo \
|
||||||
unzip \
|
unzip \
|
||||||
zip \
|
zip \
|
||||||
zlib1g-dev \
|
zlib1g-dev
|
||||||
libncurses5-dev \
|
|
||||||
libncursesw5-dev \
|
|
||||||
libtinfo5
|
|
||||||
|
|
||||||
RUN pip3 install "cython==0.28.6"
|
RUN pip3 install "cython==0.28.6"
|
||||||
RUN pip3 install "buildozer==1.0"
|
RUN pip3 install "buildozer==1.0"
|
||||||
|
|
|
@ -7,12 +7,9 @@ from kivy.properties import (
|
||||||
ListProperty,
|
ListProperty,
|
||||||
StringProperty
|
StringProperty
|
||||||
)
|
)
|
||||||
from kivy.uix.button import Button
|
|
||||||
from kivymd.uix.button import MDRaisedButton
|
from kivymd.uix.button import MDRaisedButton
|
||||||
from kivy.uix.carousel import Carousel
|
|
||||||
from kivymd.uix.dialog import MDDialog
|
from kivymd.uix.dialog import MDDialog
|
||||||
from kivymd.uix.label import MDLabel
|
from kivymd.uix.label import MDLabel
|
||||||
from kivymd.uix.list import TwoLineAvatarIconListItem
|
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
|
@ -1,18 +1,13 @@
|
||||||
from bitmessagekivy import kivy_helper_search
|
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
from helper_sql import sqlExecute, sqlQuery
|
from helper_sql import sqlExecute, sqlQuery
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
from kivy.metrics import dp
|
|
||||||
from kivy.properties import (
|
from kivy.properties import (
|
||||||
ListProperty,
|
ListProperty,
|
||||||
StringProperty
|
StringProperty
|
||||||
)
|
)
|
||||||
from kivy.uix.button import Button
|
|
||||||
from kivy.uix.carousel import Carousel
|
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
from kivymd.uix.label import MDLabel
|
from kivymd.uix.label import MDLabel
|
||||||
from kivymd.uix.list import TwoLineAvatarIconListItem
|
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
||||||
|
@ -22,7 +17,7 @@ from bitmessagekivy.baseclass.common import (
|
||||||
ShowTimeHistoy
|
ShowTimeHistoy
|
||||||
)
|
)
|
||||||
from bitmessagekivy.baseclass.maildetail import MailDetail
|
from bitmessagekivy.baseclass.maildetail import MailDetail
|
||||||
from bitmessagekivy.baseclass.trash import Trash
|
# from bitmessagekivy.baseclass.trash import Trash
|
||||||
|
|
||||||
|
|
||||||
class Allmails(Screen):
|
class Allmails(Screen):
|
||||||
|
@ -113,8 +108,6 @@ class Allmails(Screen):
|
||||||
self.mail_detail, item[5], item[4], message_row))
|
self.mail_detail, item[5], item[4], message_row))
|
||||||
message_row.ids.time_tag.text = str(ShowTimeHistoy(item[7]))
|
message_row.ids.time_tag.text = str(ShowTimeHistoy(item[7]))
|
||||||
message_row.ids.chip_tag.text = item[4]
|
message_row.ids.chip_tag.text = item[4]
|
||||||
|
|
||||||
|
|
||||||
# listItem = message_row.ids.content
|
# listItem = message_row.ids.content
|
||||||
# secondary_text = (subject[:50] + '........' if len(
|
# secondary_text = (subject[:50] + '........' if len(
|
||||||
# subject) >= 50 else (
|
# subject) >= 50 else (
|
||||||
|
@ -132,8 +125,6 @@ class Allmails(Screen):
|
||||||
# listItem.add_widget(chipTag(item[4]))
|
# listItem.add_widget(chipTag(item[4]))
|
||||||
message_row.ids.delete_msg.bind(on_press=partial(
|
message_row.ids.delete_msg.bind(on_press=partial(
|
||||||
self.swipe_delete, item[5], item[4]))
|
self.swipe_delete, item[5], item[4]))
|
||||||
|
|
||||||
|
|
||||||
self.ids.ml.add_widget(message_row)
|
self.ids.ml.add_widget(message_row)
|
||||||
updated_data = len(self.ids.ml.children)
|
updated_data = len(self.ids.ml.children)
|
||||||
self.has_refreshed = True if data_exist != updated_data else False
|
self.has_refreshed = True if data_exist != updated_data else False
|
||||||
|
|
|
@ -6,10 +6,6 @@ from kivy.metrics import dp
|
||||||
from kivymd.uix.list import (
|
from kivymd.uix.list import (
|
||||||
ILeftBody,
|
ILeftBody,
|
||||||
IRightBodyTouch,
|
IRightBodyTouch,
|
||||||
TwoLineAvatarIconListItem,
|
|
||||||
OneLineIconListItem,
|
|
||||||
OneLineAvatarIconListItem,
|
|
||||||
OneLineListItem
|
|
||||||
)
|
)
|
||||||
from kivy.uix.image import Image
|
from kivy.uix.image import Image
|
||||||
from kivymd.uix.label import MDLabel
|
from kivymd.uix.label import MDLabel
|
||||||
|
@ -32,8 +28,8 @@ data_screens = {
|
||||||
"name_screen": "mailDetail",
|
"name_screen": "mailDetail",
|
||||||
"object": 0,
|
"object": 0,
|
||||||
"Import": "from bitmessagekivy.baseclass.maildetail import MailDetail",
|
"Import": "from bitmessagekivy.baseclass.maildetail import MailDetail",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
,}
|
|
||||||
|
|
||||||
|
|
||||||
def chipTag(text):
|
def chipTag(text):
|
||||||
|
@ -72,6 +68,7 @@ def initailize_detail_page(manager):
|
||||||
manager.add_widget(screen_object)
|
manager.add_widget(screen_object)
|
||||||
manager.current = data_screens['MailDetail']["name_screen"]
|
manager.current = data_screens['MailDetail']["name_screen"]
|
||||||
|
|
||||||
|
|
||||||
def toast(text):
|
def toast(text):
|
||||||
"""Method will display the toast message"""
|
"""Method will display the toast message"""
|
||||||
# pylint: disable=redefined-outer-name
|
# pylint: disable=redefined-outer-name
|
||||||
|
|
|
@ -6,16 +6,12 @@ from helper_sql import sqlExecute
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from addresses import decodeAddress
|
from addresses import decodeAddress
|
||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
from kivy.metrics import dp
|
|
||||||
from kivy.properties import (
|
from kivy.properties import (
|
||||||
ListProperty,
|
ListProperty,
|
||||||
StringProperty
|
StringProperty
|
||||||
)
|
)
|
||||||
from kivy.uix.button import Button
|
|
||||||
from kivy.uix.carousel import Carousel
|
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
from kivymd.uix.label import MDLabel
|
from kivymd.uix.label import MDLabel
|
||||||
from kivymd.uix.list import TwoLineAvatarIconListItem
|
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
||||||
|
@ -108,7 +104,6 @@ class Draft(Screen):
|
||||||
listItem.secondary_text = item["text"]
|
listItem.secondary_text = item["text"]
|
||||||
listItem.theme_text_color = "Custom"
|
listItem.theme_text_color = "Custom"
|
||||||
listItem.text_color = ThemeClsColor
|
listItem.text_color = ThemeClsColor
|
||||||
# meny._txt_right_pad = dp(70)
|
|
||||||
message_row.ids.avater_img.source = state.imageDir + '/avatar.png'
|
message_row.ids.avater_img.source = state.imageDir + '/avatar.png'
|
||||||
listItem.bind(on_release=partial(
|
listItem.bind(on_release=partial(
|
||||||
self.draft_detail, item['ackdata'], message_row))
|
self.draft_detail, item['ackdata'], message_row))
|
||||||
|
|
|
@ -10,11 +10,8 @@ from kivy.properties import (
|
||||||
ListProperty,
|
ListProperty,
|
||||||
StringProperty
|
StringProperty
|
||||||
)
|
)
|
||||||
from kivy.uix.button import Button
|
|
||||||
from kivy.uix.carousel import Carousel
|
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
from kivymd.uix.label import MDLabel
|
from kivymd.uix.label import MDLabel
|
||||||
from kivymd.uix.list import TwoLineAvatarIconListItem
|
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,7 @@ from kivy.uix.screenmanager import Screen
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
||||||
from bitmessagekivy.baseclass.common import (
|
from bitmessagekivy.baseclass.common import toast
|
||||||
toast, ThemeClsColor
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Login(Screen):
|
class Login(Screen):
|
||||||
|
@ -108,5 +106,3 @@ class InfoLayout(BoxLayout, RectangularElevationBehavior):
|
||||||
|
|
||||||
class RandomBoxlayout(BoxLayout):
|
class RandomBoxlayout(BoxLayout):
|
||||||
"""RandomBoxlayout class for BoxLayout behaviour"""
|
"""RandomBoxlayout class for BoxLayout behaviour"""
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ from kivymd.uix.list import (
|
||||||
OneLineListItem,
|
OneLineListItem,
|
||||||
IRightBodyTouch
|
IRightBodyTouch
|
||||||
)
|
)
|
||||||
from kivymd.uix.label import MDLabel
|
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
|
@ -124,7 +124,6 @@ class MyAddress(Screen):
|
||||||
meny.add_widget(ToggleBtn(active=True if is_enable == 'true' else False))
|
meny.add_widget(ToggleBtn(active=True if is_enable == 'true' else False))
|
||||||
self.ids.ml.add_widget(meny)
|
self.ids.ml.add_widget(meny)
|
||||||
|
|
||||||
|
|
||||||
def check_scroll_y(self, instance, somethingelse):
|
def check_scroll_y(self, instance, somethingelse):
|
||||||
"""Load data on scroll down"""
|
"""Load data on scroll down"""
|
||||||
if self.ids.refresh_layout.scroll_y <= -0.0 and self.has_refreshed:
|
if self.ids.refresh_layout.scroll_y <= -0.0 and self.has_refreshed:
|
||||||
|
|
|
@ -3,7 +3,6 @@ import state
|
||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
from kivy.properties import StringProperty
|
from kivy.properties import StringProperty
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
from bitmessagekivy.baseclass.common import ThemeClsColor
|
|
||||||
|
|
||||||
|
|
||||||
class NetworkStat(Screen):
|
class NetworkStat(Screen):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
|
|
||||||
|
from bitmessagekivy.baseclass.common import toast
|
||||||
from kivy.uix.boxlayout import BoxLayout
|
from kivy.uix.boxlayout import BoxLayout
|
||||||
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
|
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
|
@ -9,6 +10,7 @@ from kivymd.uix.list import (
|
||||||
OneLineAvatarIconListItem
|
OneLineAvatarIconListItem
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import queues
|
||||||
import state
|
import state
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -230,4 +230,3 @@ class ToAddrBoxlayout(BoxLayout):
|
||||||
|
|
||||||
class ToAddressTitle(BoxLayout):
|
class ToAddressTitle(BoxLayout):
|
||||||
"""ToAddressTitle class for BoxLayout behaviour"""
|
"""ToAddressTitle class for BoxLayout behaviour"""
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
from bitmessagekivy.get_platform import platform
|
|
||||||
# from bitmessagekivy import identiconGeneration
|
# from bitmessagekivy import identiconGeneration
|
||||||
from bitmessagekivy import kivy_helper_search
|
from bitmessagekivy import kivy_helper_search
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
|
@ -6,21 +5,16 @@ from functools import partial
|
||||||
from helper_sql import sqlExecute
|
from helper_sql import sqlExecute
|
||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
from kivy.factory import Factory
|
from kivy.factory import Factory
|
||||||
from kivy.metrics import dp
|
|
||||||
from kivy.properties import StringProperty, ListProperty
|
from kivy.properties import StringProperty, ListProperty
|
||||||
|
|
||||||
from kivy.uix.button import Button
|
|
||||||
from kivy.uix.carousel import Carousel
|
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
from kivymd.uix.label import MDLabel
|
from kivymd.uix.label import MDLabel
|
||||||
from kivymd.uix.list import TwoLineAvatarIconListItem
|
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
||||||
from bitmessagekivy.baseclass.common import (
|
from bitmessagekivy.baseclass.common import (
|
||||||
showLimitedCnt, ThemeClsColor, avatarImageFirstLetter,
|
showLimitedCnt, ThemeClsColor, avatarImageFirstLetter,
|
||||||
AddTimeWidget, AvatarSampleWidget, toast, SwipeToDeleteItem,
|
toast, SwipeToDeleteItem, ShowTimeHistoy
|
||||||
ShowTimeHistoy
|
|
||||||
)
|
)
|
||||||
from bitmessagekivy.baseclass.maildetail import MailDetail
|
from bitmessagekivy.baseclass.maildetail import MailDetail
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,13 @@ from bmconfigparser import BMConfigParser
|
||||||
from helper_sql import sqlExecute, sqlQuery
|
from helper_sql import sqlExecute, sqlQuery
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
from kivy.metrics import dp
|
|
||||||
from kivy.properties import (
|
from kivy.properties import (
|
||||||
ListProperty,
|
ListProperty,
|
||||||
StringProperty
|
StringProperty
|
||||||
)
|
)
|
||||||
from kivy.uix.button import Button
|
|
||||||
from kivymd.uix.button import MDFlatButton
|
from kivymd.uix.button import MDFlatButton
|
||||||
from kivy.uix.carousel import Carousel
|
|
||||||
from kivymd.uix.dialog import MDDialog
|
from kivymd.uix.dialog import MDDialog
|
||||||
from kivymd.uix.label import MDLabel
|
from kivymd.uix.label import MDLabel
|
||||||
from kivymd.uix.list import TwoLineAvatarIconListItem
|
|
||||||
from kivy.uix.screenmanager import Screen
|
from kivy.uix.screenmanager import Screen
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
|
@ -81,8 +81,7 @@ elif platform == "android":
|
||||||
t.show()
|
t.show()
|
||||||
|
|
||||||
|
|
||||||
with open(os.path.join(os.path.dirname(__file__), "screens_data.json")
|
with open(os.path.join(os.path.dirname(__file__), "screens_data.json")) as read_file:
|
||||||
) as read_file:
|
|
||||||
all_data = ast.literal_eval(read_file.read())
|
all_data = ast.literal_eval(read_file.read())
|
||||||
data_screens = list(all_data.keys())
|
data_screens = list(all_data.keys())
|
||||||
|
|
||||||
|
|
|
@ -13,5 +13,6 @@ def make_ordered_test():
|
||||||
|
|
||||||
return ordered, compare
|
return ordered, compare
|
||||||
|
|
||||||
|
|
||||||
ordered, compare = make_ordered_test()
|
ordered, compare = make_ordered_test()
|
||||||
unittest.defaultTestLoader.sortTestMethodsUsing = compare
|
unittest.defaultTestLoader.sortTestMethodsUsing = compare
|
|
@ -3,8 +3,7 @@ import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from telenium.tests import TeleniumTestCase
|
from telenium.tests import TeleniumTestCase
|
||||||
from threads import sqlThread
|
# from threads import sqlThread
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_files = (
|
_files = (
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import time
|
|
||||||
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
|
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
|
||||||
from .common import ordered
|
from .common import ordered
|
||||||
|
|
||||||
|
@ -77,7 +76,8 @@ class AddressBook(TeleniumTestProcess):
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//MDRaisedButton[0]')
|
self.cli.click_on('//MDRaisedButton[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
self.cli.click_on(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]')
|
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
|
@ -86,7 +86,8 @@ class AddressBook(TeleniumTestProcess):
|
||||||
random_label = ""
|
random_label = ""
|
||||||
for char in "Hey This is Message From Address Book":
|
for char in "Hey This is Message From Address Book":
|
||||||
random_label += char
|
random_label += char
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
|
self.cli.setattr(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
|
||||||
self.cli.sleep(0.2)
|
self.cli.sleep(0.2)
|
||||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
|
@ -100,8 +101,11 @@ class AddressBook(TeleniumTestProcess):
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//NavigationItem[6]')
|
self.cli.click_on('//NavigationItem[6]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.drag('//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//TwoLineAvatarIconListItem[0]/BoxLayout[0]',
|
self.cli.drag(
|
||||||
'//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]', 2)
|
'''//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//'''
|
||||||
|
'''TwoLineAvatarIconListItem[0]/BoxLayout[0]''',
|
||||||
|
'''//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//'''
|
||||||
|
'''TwoLineAvatarIconListItem[0]/BoxLayout[2]''', 2)
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//Button[0]')
|
self.cli.click_on('//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//Button[0]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
|
|
|
@ -20,7 +20,9 @@ class CreateRandomAddress(TeleniumTestProcess):
|
||||||
"""Clicking on Proceed Button to Proceed to Next Screen."""
|
"""Clicking on Proceed Button to Proceed to Next Screen."""
|
||||||
print("=====================Test - Login Screen=====================")
|
print("=====================Test - Login Screen=====================")
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.wait_click('//Login/BoxLayout[0]/BoxLayout[0]/ScreenManager[0]/Screen[0]/BoxLayout[0]/AnchorLayout[3]/MDFillRoundFlatIconButton[0]')
|
self.cli.wait_click(
|
||||||
|
'''//Login/BoxLayout[0]/BoxLayout[0]/ScreenManager[0]/Screen[0]/BoxLayout[0]/AnchorLayout[3]'''
|
||||||
|
'''/MDFillRoundFlatIconButton[0]''')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
|
|
||||||
@ordered
|
@ordered
|
||||||
|
@ -53,7 +55,9 @@ class CreateRandomAddress(TeleniumTestProcess):
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//NavigationItem[9]')
|
self.cli.click_on('//NavigationItem[9]')
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
self.cli.wait_click('//Login/BoxLayout[0]/BoxLayout[0]/ScreenManager[0]/Screen[0]/BoxLayout[0]/AnchorLayout[3]/MDFillRoundFlatIconButton[0]')
|
self.cli.wait_click(
|
||||||
|
'''//Login/BoxLayout[0]/BoxLayout[0]/ScreenManager[0]/Screen[0]/BoxLayout[0]/AnchorLayout[3]'''
|
||||||
|
'''/MDFillRoundFlatIconButton[0]''')
|
||||||
self.test_random_screen()
|
self.test_random_screen()
|
||||||
|
|
||||||
@ordered
|
@ordered
|
||||||
|
|
|
@ -21,12 +21,14 @@ class DraftMessage(TeleniumTestProcess):
|
||||||
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
# SELECT - TO ADDRESS
|
# SELECT - TO ADDRESS
|
||||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
self.cli.click_on(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//MyTextInput[0]')
|
self.cli.click_on('//MyTextInput[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
# ADD FROM MESSAGE
|
# ADD FROM MESSAGE
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text",'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
|
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]',
|
||||||
|
"text", 'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
# CLICK BACK-BUTTON
|
# CLICK BACK-BUTTON
|
||||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||||
|
@ -34,12 +36,14 @@ class DraftMessage(TeleniumTestProcess):
|
||||||
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
# SELECT - TO ADDRESS
|
# SELECT - TO ADDRESS
|
||||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
self.cli.click_on(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||||
self.cli.sleep(1)
|
self.cli.sleep(1)
|
||||||
self.cli.click_on('//MyTextInput[0]')
|
self.cli.click_on('//MyTextInput[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
# ADD FROM MESSAGE
|
# ADD FROM MESSAGE
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text",'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
|
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]',
|
||||||
|
"text", 'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
random_label = ""
|
random_label = ""
|
||||||
for char in "Another Draft message":
|
for char in "Another Draft message":
|
||||||
|
@ -70,7 +74,8 @@ class DraftMessage(TeleniumTestProcess):
|
||||||
random_label = ""
|
random_label = ""
|
||||||
for char in "Hey,This is draft Message Body":
|
for char in "Hey,This is draft Message Body":
|
||||||
random_label += char
|
random_label += char
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
|
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]',
|
||||||
|
'text', random_label)
|
||||||
self.cli.sleep(0.2)
|
self.cli.sleep(0.2)
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||||
|
|
|
@ -27,7 +27,9 @@ class MyAddressScreen(TeleniumTestProcess):
|
||||||
"""Show the Qr code of selected address"""
|
"""Show the Qr code of selected address"""
|
||||||
print("=====================Test -Show QR code of selected address=====================")
|
print("=====================Test -Show QR code of selected address=====================")
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
self.cli.click_on('//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/CustomTwoLineAvatarIconListItem[0]')
|
self.cli.click_on(
|
||||||
|
'''//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/'''
|
||||||
|
'''CustomTwoLineAvatarIconListItem[0]''')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[1]/MDLabel[0]')
|
self.cli.click_on('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[1]/MDLabel[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
|
@ -39,18 +41,22 @@ class MyAddressScreen(TeleniumTestProcess):
|
||||||
"""Send Message From Send Message From Button"""
|
"""Send Message From Send Message From Button"""
|
||||||
print("=====================Test -Send Message From Send Message From Button=====================")
|
print("=====================Test -Send Message From Send Message From Button=====================")
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
self.cli.click_on('//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/CustomTwoLineAvatarIconListItem[0]')
|
self.cli.click_on(
|
||||||
|
'''//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/'''
|
||||||
|
'''CustomTwoLineAvatarIconListItem[0]''')
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
self.cli.click_on('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]')
|
self.cli.click_on('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput', "text", data[1])
|
self.cli.setattr(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput', "text", data[1])
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Hey')
|
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Hey')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
random_label = ""
|
random_label = ""
|
||||||
for char in "Hey,i am sending message directly from MyAddress book":
|
for char in "Hey,i am sending message directly from MyAddress book":
|
||||||
random_label += char
|
random_label += char
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
|
self.cli.setattr(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
|
||||||
self.cli.sleep(0.2)
|
self.cli.sleep(0.2)
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||||
|
|
|
@ -14,7 +14,8 @@ class PaymentScreen(TeleniumTestProcess):
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//NavigationItem[8]')
|
self.cli.click_on('//NavigationItem[8]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.drag('//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[1]',
|
self.cli.drag(
|
||||||
|
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[1]',
|
||||||
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[0]', 1)
|
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[0]', 1)
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//MDRaisedButton[3]')
|
self.cli.click_on('//MDRaisedButton[3]')
|
||||||
|
|
|
@ -16,7 +16,7 @@ class SendMessage(TeleniumTestProcess):
|
||||||
Sending Message From Inbox Screen
|
Sending Message From Inbox Screen
|
||||||
opens a pop-up(screen)which send message from sender to reciever
|
opens a pop-up(screen)which send message from sender to reciever
|
||||||
"""
|
"""
|
||||||
print("=====================Test - Sending Message From Inbox Screen with validation Checks=====================")
|
print("=======Test - Sending Message From Inbox Screen with validation Checks=======")
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
|
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
|
||||||
self.cli.execute('app.clickNavDrawer()')
|
self.cli.execute('app.clickNavDrawer()')
|
||||||
|
@ -29,7 +29,8 @@ class SendMessage(TeleniumTestProcess):
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]')
|
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]', "text", "second add")
|
self.cli.setattr(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]', "text", "second add")
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]')
|
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]')
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
|
@ -39,7 +40,8 @@ class SendMessage(TeleniumTestProcess):
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//MDFlatButton[0]')
|
self.cli.click_on('//MDFlatButton[0]')
|
||||||
self.cli.sleep(5)
|
self.cli.sleep(5)
|
||||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
self.cli.click_on(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//MyTextInput[0]')
|
self.cli.click_on('//MyTextInput[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
|
@ -52,14 +54,16 @@ class SendMessage(TeleniumTestProcess):
|
||||||
random_label = ""
|
random_label = ""
|
||||||
for char in "how are you this is message body":
|
for char in "how are you this is message body":
|
||||||
random_label += char
|
random_label += char
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]','text',random_label)
|
self.cli.setattr(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
|
||||||
self.cli.sleep(0.2)
|
self.cli.sleep(0.2)
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//MDFlatButton[0]')
|
self.cli.click_on('//MDFlatButton[0]')
|
||||||
self.cli.sleep(6)
|
self.cli.sleep(6)
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]',"text", data[0])
|
self.cli.setattr(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text", data[0])
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
|
@ -79,18 +83,21 @@ class SendMessage(TeleniumTestProcess):
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
self.cli.click_on(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//MyTextInput[0]')
|
self.cli.click_on('//MyTextInput[0]')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text", data[0])
|
self.cli.setattr(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text", data[0])
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Second')
|
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Second')
|
||||||
self.cli.sleep(3)
|
self.cli.sleep(3)
|
||||||
random_label = ""
|
random_label = ""
|
||||||
for char in "Hey This Is Second Message Body":
|
for char in "Hey This Is Second Message Body":
|
||||||
random_label += char
|
random_label += char
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]',"text",random_label)
|
self.cli.setattr(
|
||||||
|
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', "text", random_label)
|
||||||
self.cli.sleep(0.2)
|
self.cli.sleep(0.2)
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||||
|
|
|
@ -12,8 +12,11 @@ class TrashMessage(TeleniumTestProcess):
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
self.cli.click_on('//NavigationItem[4]')
|
self.cli.click_on('//NavigationItem[4]')
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
self.cli.drag('//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//TwoLineAvatarIconListItem[0]/BoxLayout[0]',
|
self.cli.drag(
|
||||||
'//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]', 2)
|
'''//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//'''
|
||||||
|
'''TwoLineAvatarIconListItem[0]/BoxLayout[0]''',
|
||||||
|
'''//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//'''
|
||||||
|
'''TwoLineAvatarIconListItem[0]/BoxLayout[2]''', 2)
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
self.cli.click_on('//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//Button[0]')
|
self.cli.click_on('//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//Button[0]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
|
|
|
@ -16,6 +16,7 @@ fake_addresses = [
|
||||||
'BM-2cW2a5R1KidMGNByqPKn6nJDDnHtazoere'
|
'BM-2cW2a5R1KidMGNByqPKn6nJDDnHtazoere'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class FakeAddressGenerator(StoppableThread):
|
class FakeAddressGenerator(StoppableThread):
|
||||||
"""A thread for creating fake addresses"""
|
"""A thread for creating fake addresses"""
|
||||||
name = "addressGenerator"
|
name = "addressGenerator"
|
||||||
|
@ -25,7 +26,7 @@ class FakeAddressGenerator(StoppableThread):
|
||||||
queues.addressGeneratorQueue.put(("stopThread", "data"))
|
queues.addressGeneratorQueue.put(("stopThread", "data"))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
super(addressGenerator, self).stopThread()
|
super(FakeAddressGenerator, self).stopThread()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -4,6 +4,7 @@ from bitmessagekivy.mpybit import NavigateApp
|
||||||
from fake_addressGenerator import FakeAddressGenerator
|
from fake_addressGenerator import FakeAddressGenerator
|
||||||
from threads import sqlThread
|
from threads import sqlThread
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if state.enableObjProc:
|
if state.enableObjProc:
|
||||||
# Start the address generation thread
|
# Start the address generation thread
|
||||||
|
@ -22,6 +23,5 @@ def main():
|
||||||
state.kivyapp.run()
|
state.kivyapp.run()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Reference in New Issue
Block a user