added sample data and fixed telenium test cases

This commit is contained in:
navjot 2021-05-20 19:37:56 +05:30
parent 4f69119eb8
commit 44133f1e74
No known key found for this signature in database
GPG Key ID: 9EE70AFD71357F1C
9 changed files with 27 additions and 31 deletions

View File

@ -76,9 +76,12 @@ class AddressBook(Screen):
listItem.secondary_text = item[1] listItem.secondary_text = item[1]
listItem.theme_text_color = "Custom" listItem.theme_text_color = "Custom"
listItem.text_color = ThemeClsColor listItem.text_color = ThemeClsColor
listItem.add_widget(AvatarSampleWidget( # listItem.add_widget(AvatarSampleWidget(
source=state.imageDir + '/text_images/{}.png'.format( # source=state.imageDir + '/text_images/{}.png'.format(
avatarImageFirstLetter(item[0].strip())))) # avatarImageFirstLetter(item[0].strip()))))
image = state.imageDir + "/text_images/{}.png".format(
avatarImageFirstLetter(item[0].strip()))
message_row.ids.avater_img.source = image
listItem.bind(on_release=partial( listItem.bind(on_release=partial(
self.addBook_detail, item[1], item[0], message_row)) self.addBook_detail, item[1], item[0], message_row))
message_row.ids.delete_msg.bind(on_press=partial(self.delete_address, item[1])) message_row.ids.delete_msg.bind(on_press=partial(self.delete_address, item[1]))

View File

@ -0,0 +1 @@
18675

View File

@ -3,8 +3,6 @@ import shutil
import tempfile import tempfile
from telenium.tests import TeleniumTestCase from telenium.tests import TeleniumTestCase
# from threads import sqlThread
_files = ( _files = (
'keys.dat', 'debug.log', 'messages.dat', 'knownnodes.dat', 'keys.dat', 'debug.log', 'messages.dat', 'knownnodes.dat',
@ -53,11 +51,3 @@ class TeleniumTestProcess(TeleniumTestCase):
cleanup() cleanup()
cls.cli.app_quit() cls.cli.app_quit()
cls.process.kill() cls.process.kill()
@classmethod
def setUp(self):
pass
@classmethod
def tearDown(self):
pass

View File

@ -1,3 +1,4 @@
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
from .common import ordered from .common import ordered
@ -72,7 +73,8 @@ class AddressBook(TeleniumTestProcess):
"""Directly Send Message To The User""" """Directly Send Message To The User"""
print("=====================Test -Directly Send Message To The User=====================") print("=====================Test -Directly Send Message To The User=====================")
self.cli.sleep(4) self.cli.sleep(4)
self.cli.click_on('//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]') self.cli.click_on(
'//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/SwipeToDeleteItem[0]')
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)
@ -102,10 +104,9 @@ class AddressBook(TeleniumTestProcess):
self.cli.click_on('//NavigationItem[6]') self.cli.click_on('//NavigationItem[6]')
self.cli.sleep(3) self.cli.sleep(3)
self.cli.drag( self.cli.drag(
'''//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//''' '//MDList[0]/SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
'''TwoLineAvatarIconListItem[0]/BoxLayout[0]''', '//MDList[0]/SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]', 1)
'''//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//''' self.cli.click_on('//MDList[0]/SwipeToDeleteItem[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('//MDList[0]/SwipeToDeleteItem[0]//MDIconButton[0]')
self.cli.sleep(2) self.cli.sleep(2)

View File

@ -20,7 +20,8 @@ class AllMailMessage(TeleniumTestProcess):
"""Delete Message From Message body of Mail Screen/Window""" """Delete Message From Message body of Mail Screen/Window"""
print("=====================Test -Delete Messages Of Mail Screen=====================") print("=====================Test -Delete Messages Of Mail Screen=====================")
self.cli.sleep(4) self.cli.sleep(4)
self.cli.click_on('//Allmails[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]') self.cli.click_on(
'//Allmails[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/CutsomSwipeToDeleteItem[0]')
self.cli.sleep(5) self.cli.sleep(5)
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[1]') self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[1]')
self.cli.sleep(5) self.cli.sleep(5)

View File

@ -21,8 +21,7 @@ class CreateRandomAddress(TeleniumTestProcess):
print("=====================Test - Login Screen=====================") print("=====================Test - Login Screen=====================")
self.cli.sleep(3) self.cli.sleep(3)
self.cli.wait_click( self.cli.wait_click(
'''//Login/BoxLayout[0]/BoxLayout[0]/ScreenManager[0]/Screen[0]/BoxLayout[0]/AnchorLayout[3]''' '//ScreenManager[0]/Screen[0]/BoxLayout[0]/AnchorLayout[3]/MDFillRoundFlatIconButton[0]')
'''/MDFillRoundFlatIconButton[0]''')
self.cli.sleep(3) self.cli.sleep(3)
@ordered @ordered

View File

@ -66,7 +66,8 @@ class DraftMessage(TeleniumTestProcess):
self.cli.click_on('//NavigationItem[3]') self.cli.click_on('//NavigationItem[3]')
self.cli.sleep(4) self.cli.sleep(4)
# SHOW DRAFT MESSAGE AND SELECT FIRST MESSAGE # SHOW DRAFT MESSAGE AND SELECT FIRST MESSAGE
self.cli.click_on('//Carousel[0]//TwoLineAvatarIconListItem[0]') # self.cli.click_on('//Carousel[0]//TwoLineAvatarIconListItem[0]')
self.cli.click_on('//SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]')
self.cli.sleep(3) self.cli.sleep(3)
# CLICK EDIT BUTTON # CLICK EDIT BUTTON
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[0]') self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[0]')
@ -91,7 +92,8 @@ class DraftMessage(TeleniumTestProcess):
self.cli.sleep(4) self.cli.sleep(4)
self.cli.click_on('//NavigationItem[3]') self.cli.click_on('//NavigationItem[3]')
self.cli.sleep(5) self.cli.sleep(5)
self.cli.click_on('//Carousel[0]//TwoLineAvatarIconListItem[0]') self.cli.click_on('//SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]')
# self.cli.click_on('//Carousel[0]//TwoLineAvatarIconListItem[0]')
self.cli.sleep(5) self.cli.sleep(5)
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[1]') self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[1]')
self.cli.sleep(5) self.cli.sleep(5)

View File

@ -13,4 +13,4 @@ class SettingScreen(TeleniumTestProcess):
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1) self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
self.cli.sleep(3) self.cli.sleep(3)
self.cli.click_on('//NavigationItem[7]') self.cli.click_on('//NavigationItem[7]')
self.cli.sleep(2) self.cli.sleep(4)

View File

@ -13,13 +13,12 @@ class TrashMessage(TeleniumTestProcess):
self.cli.click_on('//NavigationItem[4]') self.cli.click_on('//NavigationItem[4]')
self.cli.sleep(4) self.cli.sleep(4)
self.cli.drag( self.cli.drag(
'''//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//''' '//MDList[0]/CutsomSwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
'''TwoLineAvatarIconListItem[0]/BoxLayout[0]''', '//MDList[0]/CutsomSwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]', 1)
'''//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//''' self.cli.click_on('//MDList[0]/CutsomSwipeToDeleteItem[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('//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[0]')
self.cli.sleep(2) self.cli.sleep(2)
# self.cli.click_on('//MDDialog/MDCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]') # self.cli.click_on('//MDDialog/MDCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]')
self.cli.click_on('//MDDialog/MDCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]') self.cli.click_on('//MDDialog/DialogFakeCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]')
self.cli.sleep(4) self.cli.sleep(4)