added pybitmessage.bitmessagekivy package into setup file
This commit is contained in:
parent
95444da6be
commit
2f2a3f8df9
|
@ -13,5 +13,6 @@ addons:
|
|||
install:
|
||||
- pip3 install -r kivy-requirements.txt
|
||||
- python setup.py install
|
||||
- export PYTHONWARNINGS=all
|
||||
script:
|
||||
- xvfb-run python3 tests-kivy.py
|
||||
|
|
4
setup.py
4
setup.py
|
@ -70,9 +70,11 @@ if __name__ == "__main__":
|
|||
'pybitmessage.plugins',
|
||||
'pybitmessage.pyelliptic',
|
||||
'pybitmessage.storage',
|
||||
'pybitmessage.bitmessagekivy',
|
||||
]
|
||||
|
||||
if sys.version_info[0] == 3:
|
||||
packages.append('pybitmessage.bitmessagekivy')
|
||||
|
||||
# this will silently accept alternative providers of msgpack
|
||||
# if they are already installed
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ class NavigateApp(App):
|
|||
def build(self):
|
||||
"""Method builds the widget"""
|
||||
# pylint: disable=no-self-use
|
||||
|
||||
return Label(text="Hello World !")
|
||||
|
||||
def clickNavDrawer(self):
|
||||
|
|
|
@ -3,6 +3,8 @@ This module is used for running test cases ui order.
|
|||
"""
|
||||
import unittest
|
||||
|
||||
from pybitmessage import state
|
||||
|
||||
|
||||
def make_ordered_test():
|
||||
"""this method is for compairing and arranging in order"""
|
||||
|
@ -22,3 +24,14 @@ def make_ordered_test():
|
|||
|
||||
ordered, compare = make_ordered_test()
|
||||
unittest.defaultTestLoader.sortTestMethodsUsing = compare
|
||||
|
||||
|
||||
def skip_screen_checks(x):
|
||||
"""This methos is skipping current screen checks"""
|
||||
def inner(y):
|
||||
"""Inner function"""
|
||||
if not state.isKivyworking:
|
||||
return unittest.skip('Kivy is not working')
|
||||
else:
|
||||
x(y)
|
||||
return inner
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import ordered
|
||||
from .common import ordered, skip_screen_checks
|
||||
|
||||
data = [
|
||||
'BM-2cWmjntZ47WKEUtocrdvs19y5CivpKoi1h',
|
||||
|
@ -10,16 +10,18 @@ data = [
|
|||
class AddressBook(TeleniumTestProcess):
|
||||
"""AddressBook Screen Functionality Testing"""
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_save_address(self):
|
||||
"""Save Address On Address Book Screen/Window"""
|
||||
print("=====================Test -Save Address In Address Book=====================")
|
||||
self.cli.sleep(6)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[6]')
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=0)
|
||||
self.cli.sleep(4)
|
||||
self.cli.execute('app.addingtoaddressbook()')
|
||||
self.cli.sleep(3)
|
||||
|
@ -53,7 +55,10 @@ class AddressBook(TeleniumTestProcess):
|
|||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[0]')
|
||||
self.cli.sleep(4)
|
||||
address_book_msgs = len(self.cli.select("//SwipeToDeleteItem"))
|
||||
self.assertEqual(address_book_msgs, 1)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_cancel_addressbook_popup(self):
|
||||
"""Cancel Address"""
|
||||
|
@ -66,7 +71,9 @@ class AddressBook(TeleniumTestProcess):
|
|||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]', 'text', data[0])
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[1]')
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=1)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_send_message_to_addressbook(self):
|
||||
"""Directly Send Message To The User"""
|
||||
|
@ -76,6 +83,7 @@ class AddressBook(TeleniumTestProcess):
|
|||
'//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/SwipeToDeleteItem[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[0]')
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on(
|
||||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||
|
@ -91,16 +99,19 @@ class AddressBook(TeleniumTestProcess):
|
|||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
|
||||
self.cli.sleep(0.2)
|
||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||
self.cli.sleep(2)
|
||||
self.cli.sleep(4)
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=1)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_delete_address_from_address_contact(self):
|
||||
"""Delete Address From Address Book"""
|
||||
print("=====================Test -Delete Address From Address Book=====================")
|
||||
self.cli.sleep(3)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[6]')
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.drag(
|
||||
'//MDList[0]/SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
||||
|
@ -108,4 +119,4 @@ class AddressBook(TeleniumTestProcess):
|
|||
self.cli.click_on('//MDList[0]/SwipeToDeleteItem[0]')
|
||||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MDList[0]/SwipeToDeleteItem[0]//MDIconButton[0]')
|
||||
self.cli.sleep(2)
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import ordered
|
||||
from .common import ordered, skip_screen_checks
|
||||
|
||||
|
||||
class AllMailMessage(TeleniumTestProcess):
|
||||
"""AllMail Screen Functionality Testing"""
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_show_allmail_list(self):
|
||||
"""Show All Messages on Mail Screen/Window"""
|
||||
print("=====================Test -Show Messages Of Mail Screen=====================")
|
||||
self.cli.sleep(5)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on('//NavigationItem[5]')
|
||||
self.cli.sleep(4)
|
||||
self.assertExists("//Allmails[@name~=\"allmails\"]", timeout=2)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_delete_message_from_allmail_list(self):
|
||||
"""Delete Message From Message body of Mail Screen/Window"""
|
||||
|
@ -22,6 +25,8 @@ class AllMailMessage(TeleniumTestProcess):
|
|||
self.cli.sleep(4)
|
||||
self.cli.click_on(
|
||||
'//Allmails[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/CutsomSwipeToDeleteItem[0]')
|
||||
self.assertExists("//MailDetail[@name~=\"mailDetail\"]", timeout=0)
|
||||
self.cli.sleep(5)
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[1]')
|
||||
self.cli.sleep(5)
|
||||
self.assertExists("//Allmails[@name~=\"allmails\"]", timeout=0)
|
||||
|
|
|
@ -2,7 +2,7 @@ import os
|
|||
import tempfile
|
||||
|
||||
from .telenium_process import TeleniumTestProcess, cleanup
|
||||
from .common import ordered
|
||||
from .common import ordered, skip_screen_checks
|
||||
from random import choice
|
||||
from string import ascii_lowercase
|
||||
|
||||
|
@ -12,21 +12,24 @@ class CreateRandomAddress(TeleniumTestProcess):
|
|||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""overriding setupclass for cleaning temp storage."""
|
||||
# pylint: disable=bad-super-call
|
||||
os.environ["BITMESSAGE_HOME"] = tempfile.gettempdir()
|
||||
cleanup()
|
||||
super(TeleniumTestProcess, cls).setUpClass()
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_login_screen(self):
|
||||
"""Clicking on Proceed Button to Proceed to Next Screen."""
|
||||
print("=====================Test - Login Screen=====================")
|
||||
self.cli.sleep(3)
|
||||
self.assertExists("//Login[@name~=\"login\"]", timeout=1)
|
||||
self.cli.wait_click(
|
||||
'//ScreenManager[0]/Screen[0]/BoxLayout[0]/AnchorLayout[3]/MDFillRoundFlatIconButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.assertExists("//Random[@name~=\"random\"]", timeout=1)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_random_screen(self):
|
||||
"""Creating New Adress For New User."""
|
||||
|
@ -45,30 +48,36 @@ class CreateRandomAddress(TeleniumTestProcess):
|
|||
self.cli.sleep(1)
|
||||
self.cli.wait_click('//RandomBoxlayout/BoxLayout[0]/AnchorLayout[2]/MDFillRoundFlatIconButton[0]')
|
||||
self.cli.sleep(5)
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=3)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_create_new_address(self):
|
||||
"""Clicking on Navigation Drawer To Open New Address"""
|
||||
print("=====================Test - Create New Address=====================")
|
||||
self.cli.sleep(5)
|
||||
self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
|
||||
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(2)
|
||||
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[9]')
|
||||
self.assertExists("//Login[@name~=\"login\"]", timeout=1)
|
||||
self.cli.sleep(4)
|
||||
self.cli.wait_click(
|
||||
'''//Login/BoxLayout[0]/BoxLayout[0]/ScreenManager[0]/Screen[0]/BoxLayout[0]/AnchorLayout[3]'''
|
||||
'''/MDFillRoundFlatIconButton[0]''')
|
||||
self.assertExists("//Random[@name~=\"random\"]", timeout=1)
|
||||
self.test_random_screen()
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_select_address(self):
|
||||
"""Select First Address From Drawer-Box"""
|
||||
print("=====================Test - Select First Address From Drawer-Box=======================")
|
||||
self.cli.sleep(3)
|
||||
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(2)
|
||||
self.cli.drag("//NavigationItem[@text=\"Address Book\"]", "//NavigationItem[@text=\"Settings\"]", 1)
|
||||
self.cli.sleep(2)
|
||||
|
@ -76,3 +85,4 @@ class CreateRandomAddress(TeleniumTestProcess):
|
|||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MySpinnerOption[0]')
|
||||
self.cli.sleep(3)
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=1)
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import ordered
|
||||
from .common import ordered, skip_screen_checks
|
||||
|
||||
|
||||
class DraftMessage(TeleniumTestProcess):
|
||||
"""Draft Screen Functionality Testing"""
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_save_draft_message(self):
|
||||
"""Select A Draft Screen From Navigaion-Drawer-Box Then
|
||||
|
@ -12,13 +13,15 @@ class DraftMessage(TeleniumTestProcess):
|
|||
print("=====================Test - Select A Draft Screen From Navigaion-Drawer-Box=====================")
|
||||
# OPEN NAVIGATION-DRAWER
|
||||
self.cli.sleep(4)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(2)
|
||||
# OPEN INBOX SCREEN
|
||||
self.cli.click_on('//NavigationItem[1]')
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=2)
|
||||
self.cli.sleep(2)
|
||||
# CLICK ON PLUS ICON BUTTON
|
||||
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=2)
|
||||
self.cli.sleep(3)
|
||||
# SELECT - TO ADDRESS
|
||||
self.cli.click_on(
|
||||
|
@ -32,8 +35,10 @@ class DraftMessage(TeleniumTestProcess):
|
|||
self.cli.sleep(3)
|
||||
# CLICK BACK-BUTTON
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=2)
|
||||
self.cli.sleep(5)
|
||||
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=2)
|
||||
self.cli.sleep(3)
|
||||
# SELECT - TO ADDRESS
|
||||
self.cli.click_on(
|
||||
|
@ -53,24 +58,29 @@ class DraftMessage(TeleniumTestProcess):
|
|||
# CLICK BACK-BUTTON
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(4)
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=1)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_edit_and_resend_draft_messgae(self):
|
||||
"""Select A Message From List of Messages Then
|
||||
make changes and send it."""
|
||||
print("=====================Test - Edit A Message From Draft Screen=====================")
|
||||
# OPEN NAVIGATION-DRAWER
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(4)
|
||||
# OPEN DRAFT SCREEN
|
||||
self.cli.click_on('//NavigationItem[3]')
|
||||
self.assertExists("//Draft[@name~=\"draft\"]", timeout=2)
|
||||
self.cli.sleep(4)
|
||||
# SHOW DRAFT MESSAGE AND SELECT FIRST MESSAGE
|
||||
# self.cli.click_on('//Carousel[0]//TwoLineAvatarIconListItem[0]')
|
||||
self.cli.click_on('//SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]')
|
||||
self.assertExists("//MailDetail[@name~=\"mailDetail\"]", timeout=2)
|
||||
self.cli.sleep(3)
|
||||
# CLICK EDIT BUTTON
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[0]')
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=2)
|
||||
self.cli.sleep(5)
|
||||
random_label = ""
|
||||
for char in "Hey,This is draft Message Body":
|
||||
|
@ -80,20 +90,25 @@ class DraftMessage(TeleniumTestProcess):
|
|||
self.cli.sleep(0.2)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||
self.cli.sleep(5)
|
||||
# self.cli.sleep(5)
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=5)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_delete_draft_message(self):
|
||||
"""Delete A Message From List of Messages"""
|
||||
print("=====================Test - Delete A Message From List of Messages=====================")
|
||||
self.cli.sleep(5)
|
||||
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on('//NavigationItem[3]')
|
||||
self.assertExists("//Draft[@name~=\"draft\"]", timeout=1)
|
||||
self.cli.sleep(5)
|
||||
self.cli.click_on('//SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]')
|
||||
self.assertExists("//MailDetail[@name~=\"mailDetail\"]", timeout=2)
|
||||
# self.cli.click_on('//Carousel[0]//TwoLineAvatarIconListItem[0]')
|
||||
self.cli.sleep(5)
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDActionTopAppBarButton[1]')
|
||||
self.cli.sleep(5)
|
||||
self.assertExists("//Draft[@name~=\"draft\"]", timeout=1)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import ordered
|
||||
from .common import ordered, skip_screen_checks
|
||||
|
||||
data = [
|
||||
'BM-2cWmjntZ47WKEUtocrdvs19y5CivpKoi1h',
|
||||
|
@ -10,18 +10,21 @@ data = [
|
|||
class MyAddressScreen(TeleniumTestProcess):
|
||||
"""MyAddress Screen Functionality Testing"""
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_select_myaddress_list(self):
|
||||
"""Select Address From List of Address"""
|
||||
print("=====================Test -Select Address From List of Address=====================")
|
||||
self.cli.sleep(4)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[11]')
|
||||
self.cli.sleep(4)
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_show_Qrcode(self):
|
||||
"""Show the Qr code of selected address"""
|
||||
|
@ -32,10 +35,13 @@ class MyAddressScreen(TeleniumTestProcess):
|
|||
'''CustomTwoLineAvatarIconListItem[0]''')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[1]/MDLabel[0]')
|
||||
self.assertExists("//ShowQRCode[@name~=\"showqrcode\"]", timeout=2)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
|
||||
@skip_screen_checks
|
||||
@ordered
|
||||
def test_send_message_from(self):
|
||||
"""Send Message From Send Message From Button"""
|
||||
|
@ -46,6 +52,7 @@ class MyAddressScreen(TeleniumTestProcess):
|
|||
'''CustomTwoLineAvatarIconListItem[0]''')
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]')
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=2)
|
||||
self.cli.sleep(3)
|
||||
self.cli.setattr(
|
||||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput', "text", data[1])
|
||||
|
@ -61,3 +68,4 @@ class MyAddressScreen(TeleniumTestProcess):
|
|||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||
self.cli.sleep(4)
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=2)
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
# pylint: disable=too-few-public-methods
|
||||
|
||||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import skip_screen_checks
|
||||
|
||||
|
||||
class NetwrokStatusScreen(TeleniumTestProcess):
|
||||
"""NetwrokStatus Screen Functionality Testing"""
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
||||
@skip_screen_checks
|
||||
def test_network_status(self):
|
||||
"""Show NetwrokStatus"""
|
||||
print("=====================Test -Show NetwrokStatus=====================")
|
||||
self.cli.sleep(4)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
|
||||
self.cli.sleep(3)
|
||||
|
@ -17,3 +20,4 @@ class NetwrokStatusScreen(TeleniumTestProcess):
|
|||
self.cli.sleep(4)
|
||||
self.cli.click_on('//NetworkStat/MDTabs[0]/MDTabsBar[0]/MDTabsScrollView[0]/MDGridLayout[0]/MDTabsLabel[1]')
|
||||
self.cli.sleep(4)
|
||||
self.assertExists("//NetworkStat[@name~=\"networkstat\"]", timeout=2)
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
# pylint: disable=too-few-public-methods
|
||||
|
||||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import skip_screen_checks
|
||||
|
||||
|
||||
class PaymentScreen(TeleniumTestProcess):
|
||||
"""SubscriptionPayment Screen Functionality Testing"""
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
||||
@skip_screen_checks
|
||||
def test_select_subscripton(self):
|
||||
"""Select Subscripton From List of Subscriptons"""
|
||||
print("=====================Test -Select Subscripton From List of Subscriptons=====================")
|
||||
self.cli.sleep(4)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[8]')
|
||||
self.assertExists("//Payment[@name~=\"payment\"]", timeout=2)
|
||||
self.cli.sleep(3)
|
||||
self.cli.drag(
|
||||
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[1]',
|
||||
|
@ -25,3 +29,4 @@ class PaymentScreen(TeleniumTestProcess):
|
|||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MDRaisedButton[3]')
|
||||
self.cli.sleep(2)
|
||||
self.assertExists("//Payment[@name~=\"payment\"]", timeout=2)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# pylint: disable=too-few-public-methods
|
||||
|
||||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import ordered
|
||||
from .common import skip_screen_checks
|
||||
|
||||
data = [
|
||||
'BM-2cWmjntZ47WKEUtocrdvs19y5CivpKoi1h',
|
||||
|
@ -10,20 +12,22 @@ data = [
|
|||
class SendMessage(TeleniumTestProcess):
|
||||
"""Sent Screen Functionality Testing"""
|
||||
|
||||
@ordered
|
||||
@skip_screen_checks
|
||||
def test_send_message_and_validation(self):
|
||||
"""
|
||||
Sending Message From Inbox Screen
|
||||
opens a pop-up(screen)which send message from sender to reciever
|
||||
"""
|
||||
# pylint: disable=too-many-statements
|
||||
print("=======Test - Sending Message From Inbox Screen with validation Checks=======")
|
||||
self.cli.sleep(3)
|
||||
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(2)
|
||||
self.cli.click_on('//NavigationItem[1]')
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=2)
|
||||
self.cli.sleep(2)
|
||||
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=2)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/MyMDTextField[0]')
|
||||
self.cli.sleep(3)
|
||||
|
@ -67,42 +71,9 @@ class SendMessage(TeleniumTestProcess):
|
|||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||
self.cli.sleep(3)
|
||||
|
||||
@ordered
|
||||
def test_sent_multiple_messages(self):
|
||||
"""
|
||||
Sending Second Message From Inbox Screen
|
||||
for testing the search and delete functionality for two messages on the screen
|
||||
"""
|
||||
print("=====================Test - Sending Message From Inbox Screen=====================")
|
||||
self.cli.sleep(3)
|
||||
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.sleep(5)
|
||||
self.cli.click_on('//NavigationItem[1]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on(
|
||||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MyTextInput[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.setattr(
|
||||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text", data[0])
|
||||
self.cli.sleep(3)
|
||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Second')
|
||||
self.cli.sleep(3)
|
||||
random_label = ""
|
||||
for char in "Hey This Is Second Message Body":
|
||||
random_label += char
|
||||
self.cli.setattr(
|
||||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', "text", random_label)
|
||||
self.cli.sleep(0.2)
|
||||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||
self.cli.sleep(5)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[2]')
|
||||
self.cli.sleep(3)
|
||||
# total_sent_msgs = len(self.cli.select("//SwipeToDeleteItem"))
|
||||
self.assertEqual(len(self.cli.select("//SwipeToDeleteItem")), 2)
|
||||
|
|
|
@ -1,17 +1,22 @@
|
|||
# pylint: disable=too-few-public-methods
|
||||
|
||||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import skip_screen_checks
|
||||
|
||||
|
||||
class SettingScreen(TeleniumTestProcess):
|
||||
"""Setting Screen Functionality Testing"""
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
||||
@skip_screen_checks
|
||||
def test_setting_screen(self):
|
||||
"""Show Setting Screen"""
|
||||
print("=====================Test -Show Setting Screen=====================")
|
||||
self.cli.sleep(3)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
# self.cli.wait_click("//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]", timeout=20)
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[7]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.sleep(2)
|
||||
self.assertExists("//Setting[@name~=\"set\"]", timeout=2)
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
# pylint: disable=too-few-public-methods
|
||||
|
||||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import skip_screen_checks
|
||||
|
||||
|
||||
class TrashMessage(TeleniumTestProcess):
|
||||
"""Trash Screen Functionality Testing"""
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
||||
@skip_screen_checks
|
||||
def test_delete_trash_message(self):
|
||||
"""Delete Trash message permanently from trash message listing"""
|
||||
print("=====================Test -Delete Message From Trash Message Listing=====================")
|
||||
self.cli.sleep(4)
|
||||
self.cli.execute('app.clickNavDrawer()')
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on('//NavigationItem[4]')
|
||||
self.assertExists("//Trash[@name~=\"trash\"]", timeout=2)
|
||||
self.cli.sleep(4)
|
||||
self.cli.drag(
|
||||
'//MDList[0]/CutsomSwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
||||
|
@ -22,4 +26,6 @@ class TrashMessage(TeleniumTestProcess):
|
|||
self.cli.sleep(2)
|
||||
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(2)
|
||||
total_trash_msgs = len(self.cli.select("//CutsomSwipeToDeleteItem"))
|
||||
self.assertEqual(total_trash_msgs, 1)
|
||||
|
|
|
@ -10,8 +10,12 @@ from datetime import datetime
|
|||
from six import string_types
|
||||
from six.moves import configparser
|
||||
|
||||
from pybitmessage import state
|
||||
from pybitmessage.singleton import Singleton
|
||||
try:
|
||||
import state
|
||||
from singleton import Singleton
|
||||
except ImportError:
|
||||
from pybitmessage import state
|
||||
from pybitmessage.singleton import Singleton
|
||||
|
||||
SafeConfigParser = configparser.SafeConfigParser
|
||||
|
||||
|
|
|
@ -68,3 +68,5 @@ ackdataForWhichImWatching = {}
|
|||
|
||||
thisapp = None
|
||||
"""Singleton instance"""
|
||||
|
||||
isKivyworking = False
|
||||
|
|
Reference in New Issue
Block a user