worked on removing time.sleep methods from all the test cases

This commit is contained in:
navjot 2021-03-12 00:18:09 +05:30
parent 50a258f412
commit d62d464b61
No known key found for this signature in database
GPG Key ID: 9EE70AFD71357F1C
11 changed files with 169 additions and 186 deletions

View File

@ -3,6 +3,7 @@ import shutil
import tempfile
from telenium.tests import TeleniumTestCase
from threads import addressGenerator, sqlThread
_files = (

View File

@ -13,92 +13,92 @@ class AddressBook(TeleniumTestProcess):
def test_save_address(self):
"""Save Address On Address Book Screen/Window"""
print("=====================Test -Save Address In Address Book=====================")
time.sleep(6)
self.cli.sleep(6)
self.cli.execute('app.clickNavDrawer()')
time.sleep(4)
self.cli.sleep(4)
self.cli.drag("//NavigationItem[@text=\"Sent\"]","//NavigationItem[@text=\"Inbox\"]",1)
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//NavigationItem[6]')
time.sleep(4)
self.cli.sleep(4)
self.cli.execute('app.addingtoaddressbook()')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[0]')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[1]')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//MDRaisedButton[0]')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[0]','text','peter')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDRaisedButton[0]')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[1]')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]','text','sectorAppartment')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDRaisedButton[0]')
time.sleep(5)
self.cli.sleep(5)
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[1]')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]','text',data[0])
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]','text','')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDRaisedButton[0]')
time.sleep(4)
self.cli.sleep(4)
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]','text','BM-2cX78L9CZpb6GGC3rRVizYiUBwHELMLybd')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDRaisedButton[0]')
time.sleep(4)
self.cli.sleep(4)
@ordered
def test_cancel_address(self):
"""Cancel Address"""
print("=====================Test -Cancel Address=====================")
time.sleep(3)
self.cli.sleep(3)
self.cli.execute('app.addingtoaddressbook()')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[0]','text','prachi')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]','text',data[0])
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDRaisedButton[1]')
@ordered
def test_send_message_to_addressbook(self):
"""Directly Send Message To The User"""
print("=====================Test -Directly Send Message To The User=====================")
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDRaisedButton[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Second')
time.sleep(3)
self.cli.sleep(3)
random_label=""
for char in "Hey This is Message From Address Book":
random_label += char
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
time.sleep(0.2)
self.cli.sleep(0.2)
self.cli.click_on('//MDIconButton[2]')
time.sleep(2)
self.cli.sleep(2)
@ordered
def test_delete_address_from_address_contact(self):
"""Delete Address From Address Book"""
print("=====================Test -Delete Address From Address Book=====================")
time.sleep(3)
self.cli.sleep(3)
self.cli.execute('app.clickNavDrawer()')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//NavigationItem[6]')
time.sleep(3)
self.cli.sleep(3)
self.cli.drag('//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)
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//Button[0]')

View File

@ -1,4 +1,3 @@
import time
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
from .common import ordered
@ -7,21 +6,21 @@ class AllMailMessage(TeleniumTestProcess):
"""AllMail Screen Functionality Testing"""
@ordered
def test_select_all_mails(self):
def test_show_allmail_list(self):
"""Show All Messages on Mail Screen/Window"""
print("=====================Test -Show Messages Of Mail Screen=====================")
time.sleep(5)
self.cli.sleep(5)
self.cli.execute('app.clickNavDrawer()')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//NavigationItem[5]')
time.sleep(4)
self.cli.sleep(4)
@ordered
def test_delete_message_from_draft(self):
def test_delete_message_from_allmail_list(self):
"""Delete Message From Message body of Mail Screen/Window"""
print("=====================Test -Delete Messages Of Mail Screen=====================")
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//Allmails[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]')
time.sleep(5)
self.cli.sleep(5)
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDIconButton[1]')
time.sleep(3)
self.cli.sleep(3)

View File

@ -1,6 +1,5 @@
import os
import tempfile
import time
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess, cleanup
from .common import ordered
@ -12,7 +11,6 @@ class CreateRandomAddress(TeleniumTestProcess):
@classmethod
def setUpClass(cls):
print('ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ', __file__)
os.environ["BITMESSAGE_HOME"] = tempfile.gettempdir()
cleanup()
super(TeleniumTestProcess, cls).setUpClass()
@ -21,40 +19,40 @@ class CreateRandomAddress(TeleniumTestProcess):
def test_login_screen(self):
"""Clicking on Proceed Button to Proceed to Next Screen."""
print("=====================Test - Login Screen=====================")
time.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]')
time.sleep(3)
self.cli.sleep(3)
@ordered
def test_random_screen(self):
"""Creating New Adress For New User."""
print("=====================Test - Create New Address=====================")
self.cli.click_on('//RandomBoxlayout/BoxLayout[0]/AnchorLayout[1]/MDTextField[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.wait_click('//RandomBoxlayout/BoxLayout[0]/AnchorLayout[2]/MDFillRoundFlatIconButton[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//RandomBoxlayout/BoxLayout[0]/AnchorLayout[1]/MDTextField[0]')
time.sleep(3)
self.cli.sleep(3)
random_label = ""
for _ in range(10):
random_label += choice(ascii_lowercase)
self.cli.setattr('//RandomBoxlayout/BoxLayout[0]/AnchorLayout[1]/MDTextField[0]', "text", random_label)
time.sleep(0.2)
time.sleep(1)
self.cli.sleep(0.2)
self.cli.sleep(1)
self.cli.wait_click('//RandomBoxlayout/BoxLayout[0]/AnchorLayout[2]/MDFillRoundFlatIconButton[0]')
time.sleep(5)
self.cli.sleep(5)
@ordered
def test_create_new_address(self):
"""Clicking on Navigation Drawer To Open New Address"""
print("=====================Test - Create New Address=====================")
time.sleep(5)
self.cli.sleep(5)
self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
time.sleep(2)
self.cli.sleep(2)
self.cli.drag("//NavigationItem[@text=\"Sent\"]","//NavigationItem[@text=\"Inbox\"]",1)
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//NavigationItem[9]')
time.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.test_random_screen()
@ -62,12 +60,12 @@ class CreateRandomAddress(TeleniumTestProcess):
def test_select_address(self):
"""Select First Address From Drawer-Box"""
print("=====================Test - Select First Address From Drawer-Box=======================")
time.sleep(3)
self.cli.sleep(3)
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
self.cli.execute('app.clickNavDrawer()')
time.sleep(2)
self.cli.sleep(2)
self.cli.drag("//NavigationItem[@text=\"Address Book\"]","//NavigationItem[@text=\"Settings\"]",1)
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//NavigationItem[0]')
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//MySpinnerOption[0]')

View File

@ -1,4 +1,3 @@
import time
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
from .common import ordered
@ -7,87 +6,87 @@ class DraftMessage(TeleniumTestProcess):
"""Draft Screen Functionality Testing"""
@ordered
def test_select_draft_message(self):
def test_save_draft_message(self):
"""Select A Draft Screen From Navigaion-Drawer-Box Then
Send a drafted message """
print("=====================Test - Select A Draft Screen From Navigaion-Drawer-Box=====================")
# OPEN NAVIGATION-DRAWER
time.sleep(4)
self.cli.sleep(4)
self.cli.execute('app.clickNavDrawer()')
time.sleep(2)
self.cli.sleep(2)
# OPEN INBOX SCREEN
self.cli.click_on('//NavigationItem[1]')
time.sleep(2)
self.cli.sleep(2)
# CLICK ON PLUS ICON BUTTON
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
time.sleep(3)
self.cli.sleep(3)
# SELECT - TO ADDRESS
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//MyTextInput[0]')
time.sleep(3)
self.cli.sleep(3)
# ADD FROM MESSAGE
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text",'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
time.sleep(3)
self.cli.sleep(3)
# CLICK BACK-BUTTON
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDIconButton[0]')
time.sleep(5)
self.cli.sleep(5)
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
time.sleep(3)
self.cli.sleep(3)
# SELECT - TO ADDRESS
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
time.sleep(1)
self.cli.sleep(1)
self.cli.click_on('//MyTextInput[0]')
time.sleep(3)
self.cli.sleep(3)
# ADD FROM MESSAGE
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text",'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
time.sleep(4)
self.cli.sleep(4)
random_label=""
for char in "Another Draft message":
random_label += char
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', random_label)
time.sleep(0.2)
self.cli.sleep(0.2)
# CLICK BACK-BUTTON
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDIconButton[0]')
time.sleep(4)
self.cli.sleep(4)
@ordered
def test_edit_draft_messgae(self):
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()')
time.sleep(4)
self.cli.sleep(4)
# OPEN DRAFT SCREEN
self.cli.click_on('//NavigationItem[3]')
time.sleep(4)
self.cli.sleep(4)
# SHOW DRAFT MESSAGE AND SELECT FIRST MESSAGE
self.cli.click_on('//Carousel[0]//TwoLineAvatarIconListItem[0]')
time.sleep(3)
self.cli.sleep(3)
# CLICK EDIT BUTTON
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDIconButton[0]')
time.sleep(5)
self.cli.sleep(5)
random_label=""
for char in "Hey,This is draft Message Body":
random_label += char
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
time.sleep(0.2)
time.sleep(3)
self.cli.sleep(0.2)
self.cli.sleep(3)
self.cli.click_on('//MDIconButton[2]')
time.sleep(5)
self.cli.sleep(5)
@ordered
def test_delete_draft_message(self):
"""Delete A Message From List of Messages"""
print("=====================Test - Delete A Message From List of Messages=====================")
time.sleep(5)
self.cli.sleep(5)
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
self.cli.execute('app.clickNavDrawer()')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//NavigationItem[3]')
time.sleep(5)
self.cli.sleep(5)
self.cli.click_on('//Carousel[0]//TwoLineAvatarIconListItem[0]')
time.sleep(5)
self.cli.sleep(5)
self.cli.click_on('//MDToolbar/BoxLayout[2]/MDIconButton[1]')
time.sleep(2)
self.cli.sleep(2)

View File

@ -1,4 +1,3 @@
import time
from bmconfigparser import BMConfigParser
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
from .common import ordered
@ -13,44 +12,44 @@ class MyAddressScreen(TeleniumTestProcess):
def test_select_myaddress_list(self):
"""Select Address From List of Address"""
print("=====================Test -Select Address From List of Address=====================")
time.sleep(4)
self.cli.sleep(4)
self.cli.execute('app.clickNavDrawer()')
time.sleep(3)
self.cli.sleep(3)
self.cli.drag("//NavigationItem[@text=\"Sent\"]","//NavigationItem[@text=\"Inbox\"]",1)
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//NavigationItem[11]')
time.sleep(4)
self.cli.sleep(4)
@ordered
def test_show_Qrcode(self):
"""Show the Qr code of selected address"""
print("=====================Test -Show QR code of selected address=====================")
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/CustomTwoLineAvatarIconListItem[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[1]/MDLabel[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDIconButton[0]')
time.sleep(3)
self.cli.sleep(3)
@ordered
def test_send_message_from(self):
"""Send Message From Send Message From Button"""
print("=====================Test -Send Message From Send Message From Button=====================")
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/CustomTwoLineAvatarIconListItem[0]')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput', "text", data[1])
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Hey')
time.sleep(3)
self.cli.sleep(3)
random_label=""
for char in "Hey,i am sending message directly from MyAddress book":
random_label += char
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]', 'text', random_label)
time.sleep(0.2)
time.sleep(2)
self.cli.sleep(0.2)
self.cli.sleep(2)
self.cli.click_on('//MDIconButton[2]')
time.sleep(2)
self.cli.sleep(2)

View File

@ -1,4 +1,3 @@
import time
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
@ -8,12 +7,12 @@ class NetwrokStatusScreen(TeleniumTestProcess):
def test_network_status(self):
"""Show NetwrokStatus"""
print("=====================Test -Show NetwrokStatus=====================")
time.sleep(4)
self.cli.sleep(4)
self.cli.execute('app.clickNavDrawer()')
time.sleep(3)
self.cli.sleep(3)
self.cli.drag("//NavigationItem[@text=\"Sent\"]","//NavigationItem[@text=\"Inbox\"]",1)
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//NavigationItem[10]')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//NetworkStat/MDTabs[0]/MDTabsBar[0]/MDTabsScrollView[0]/MDGridLayout[0]/MDTabsLabel[1]')
time.sleep(4)
self.cli.sleep(4)

View File

@ -1,4 +1,3 @@
import time
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
@ -8,19 +7,19 @@ class PaymentScreen(TeleniumTestProcess):
def test_select_subscripton(self):
"""Select Subscripton From List of Subscriptons"""
print("=====================Test -Select Subscripton From List of Subscriptons=====================")
time.sleep(4)
self.cli.sleep(4)
self.cli.execute('app.clickNavDrawer()')
time.sleep(3)
self.cli.sleep(3)
self.cli.drag("//NavigationItem[@text=\"Sent\"]","//NavigationItem[@text=\"Inbox\"]",1)
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//NavigationItem[8]')
time.sleep(3)
self.cli.sleep(3)
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)
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//MDRaisedButton[3]')
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//ListItemWithLabel[0]')
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//MDRaisedButton[3]')
time.sleep(2)
self.cli.sleep(2)

View File

@ -1,106 +1,101 @@
import os
import queues
import shutil
import tempfile
import time
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
from bmconfigparser import BMConfigParser
from .common import ordered
data = BMConfigParser().addresses()
class SendMessage(TeleniumTestProcess):
"""Sent Screen Functionality Testing"""
@ordered
def test_send_message_to_same_address(self):
def test_send_message_and_validation(self):
"""
Sending Message From Inbox Screen
opens a pop-up(screen)which send message from sender to reciever
"""
print("=====================Test - Sending Message From Inbox Screen=====================")
time.sleep(2)
self.cli.sleep(2)
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
self.cli.execute('app.clickNavDrawer()')
time.sleep(1)
self.cli.sleep(2)
self.cli.click_on('//NavigationItem[1]')
time.sleep(1)
self.cli.sleep(2)
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/MyMDTextField[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]', "text", "second add")
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//MDIconButton[2]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDFlatButton[0]')
time.sleep(5)
self.cli.sleep(5)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//MyTextInput[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]')
time.sleep(2)
self.cli.sleep(2)
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'heyyyyyy')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]')
time.sleep(4)
self.cli.sleep(4)
random_label=""
for char in "how are you this is message body":
random_label += char
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/TextInput[0]','text',random_label)
time.sleep(0.2)
time.sleep(3)
self.cli.sleep(0.2)
self.cli.sleep(3)
self.cli.click_on('//MDIconButton[2]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDFlatButton[0]')
time.sleep(6)
self.cli.sleep(6)
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]',"text", data[0])
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDIconButton[2]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//MDFlatButton[0]')
time.sleep(3)
self.cli.sleep(3)
@ordered
def test_sent_multiple_message(self):
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=====================")
time.sleep(3)
self.cli.sleep(3)
# self.cli.execute('app.root.ids.nav_drawer.set_state("toggle")')
self.cli.execute('app.clickNavDrawer()')
time.sleep(5)
self.cli.sleep(5)
self.cli.click_on('//NavigationItem[1]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//Inbox/ComposerButton[0]/MDFloatingActionButton[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//MyTextInput[0]')
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]', "text", data[0])
time.sleep(3)
self.cli.sleep(3)
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Second')
time.sleep(3)
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)
time.sleep(0.2)
time.sleep(2)
self.cli.sleep(0.2)
self.cli.sleep(2)
self.cli.click_on('//MDIconButton[2]')
time.sleep(5)
self.cli.sleep(5)
self.cli.execute('app.clickNavDrawer()')
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//NavigationItem[2]')
time.sleep(3)
self.cli.sleep(3)

View File

@ -1,21 +1,16 @@
import time
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
class SettingScreen(TeleniumTestProcess):
"""Setting Screen Functionality Testing"""
# @classmethod
# def setUpClass(cls):
# super(SettingScreen, cls).setUpClass()
def test_setting_screen(self):
"""Show Setting Screen"""
print("=====================Test -Show Setting Screen=====================")
time.sleep(4)
self.cli.sleep(3)
self.cli.execute('app.clickNavDrawer()')
time.sleep(3)
self.cli.sleep(3)
self.cli.drag("//NavigationItem[@text=\"Sent\"]","//NavigationItem[@text=\"Inbox\"]",1)
time.sleep(3)
self.cli.sleep(3)
self.cli.click_on('//NavigationItem[7]')
time.sleep(2)
self.cli.sleep(2)

View File

@ -1,4 +1,3 @@
import time
from bitmessagekivy.tests.telenium_process import TeleniumTestProcess
@ -6,17 +5,17 @@ class TrashMessage(TeleniumTestProcess):
"""Trash Screen Functionality Testing"""
def test_delete_trash_message(self):
"""Delete Message From List of Message Permanently Of Trash Screen/Window"""
print("=====================Test -Delete Messages Of Trash Screen=====================")
time.sleep(6)
"""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()')
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//NavigationItem[4]')
time.sleep(4)
self.cli.sleep(4)
self.cli.drag('//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)
time.sleep(4)
self.cli.sleep(4)
self.cli.click_on('//Trash/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]//Button[0]')
time.sleep(2)
self.cli.sleep(2)
self.cli.click_on('//MDDialog/MDCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]')
time.sleep(4)
self.cli.sleep(4)