Create Test Case For draft(Add,Delete,Edit)
This commit is contained in:
parent
3126cabc01
commit
f496591c9a
|
@ -37,8 +37,7 @@ class TestBitMessageApp(TeleniumTestCase):
|
||||||
self.cli.setattr(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Random[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]', "text", random_label)
|
self.cli.setattr(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Random[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]', "text", random_label)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Random[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Random[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
||||||
time.sleep(5)
|
time.sleep(8)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -47,8 +46,8 @@ if __name__ == '__main__':
|
||||||
print("==================start from first screen=====================")
|
print("==================start from first screen=====================")
|
||||||
TestBitMessageApp().test_login_screen()
|
TestBitMessageApp().test_login_screen()
|
||||||
TestBitMessageApp().test_random_screen()
|
TestBitMessageApp().test_random_screen()
|
||||||
obj_11=test_telenium_cases.TestCreateNewAddress()
|
obj_3=test_telenium_cases.TestCreateNewAddress()
|
||||||
obj_11.test_create_new_address()
|
obj_3.test_create_new_address()
|
||||||
TestBitMessageApp().test_random_screen()
|
TestBitMessageApp().test_random_screen()
|
||||||
obj=test_telenium_cases.TestSelectAddress()
|
obj=test_telenium_cases.TestSelectAddress()
|
||||||
obj.test_select_second_address()
|
obj.test_select_second_address()
|
||||||
|
@ -63,5 +62,7 @@ if __name__ == '__main__':
|
||||||
obj_1.test_archive_sent_message_from_list()
|
obj_1.test_archive_sent_message_from_list()
|
||||||
obj_2=test_telenium_cases.TestDraftMessage()
|
obj_2=test_telenium_cases.TestDraftMessage()
|
||||||
obj_2.test_select_draft_message()
|
obj_2.test_select_draft_message()
|
||||||
# obj_11.test_random_screen()
|
obj_2.test_edit_draft_messgae()
|
||||||
|
obj_2.test_delete_draft_message()
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import time
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
import os
|
import os
|
||||||
|
data=[]
|
||||||
|
|
||||||
class TestCreateNewAddress(TeleniumTestCase):
|
class TestCreateNewAddress(TeleniumTestCase):
|
||||||
|
|
||||||
|
@ -14,36 +14,34 @@ class TestCreateNewAddress(TeleniumTestCase):
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"All Mails\"]",2)
|
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"All Mails\"]",1)
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
self.cli.click_on('//NavigationDrawerIconButton[10]')
|
self.cli.click_on('//NavigationDrawerIconButton[10]')
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[2]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[2]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
||||||
|
|
||||||
|
|
||||||
class TestSelectAddress(TeleniumTestCase):
|
class TestSelectAddress(TeleniumTestCase):
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
print(self,"-------------Welcome To Kivy Testing Application second Page-------------")
|
print(self,"-------------Welcome To Kivy Testing Application second Page-------------")
|
||||||
|
|
||||||
def test_select_second_address(self):
|
def test_select_second_address(self):
|
||||||
time.sleep(8)
|
global data
|
||||||
data=[]
|
time.sleep(5)
|
||||||
second_address=self.cli.getattr("//CustomTwoLineAvatarIconListItem[0]","secondary_text")
|
second_address=self.cli.getattr("//CustomTwoLineAvatarIconListItem[0]","secondary_text")
|
||||||
data.append(second_address)
|
data.append(second_address)
|
||||||
return data
|
return data[0]
|
||||||
|
|
||||||
def test_select_address(self):
|
def test_select_address(self):
|
||||||
time.sleep(6)
|
time.sleep(8)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(5)
|
|
||||||
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"Address Book\"]",2)
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"Address Book\"]",2)
|
||||||
|
time.sleep(5)
|
||||||
self.cli.click_on('//NavigationDrawerIconButton[0]')
|
self.cli.click_on('//NavigationDrawerIconButton[0]')
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
var = cli.getattr('//CustomSpinner[0]',"text")
|
self.cli.click_on('//NavigationDrawerIconButton[1]')
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
|
||||||
class TestSentMessage(TestSelectAddress):
|
class TestSentMessage(TestSelectAddress):
|
||||||
|
|
||||||
|
@ -60,11 +58,10 @@ class TestSentMessage(TestSelectAddress):
|
||||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Inbox[0]/ComposerButton[0]/MDFloatingActionButton[0]/MDLabel[0]')
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Inbox[0]/ComposerButton[0]/MDFloatingActionButton[0]/MDLabel[0]')
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||||
time.sleep(2)
|
time.sleep(5)
|
||||||
self.cli.click_on('//MyTextInput[0]')
|
self.cli.click_on('//MyTextInput[0]')
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
# TestSelectAddress().test_select_second_address()
|
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]',"text",data[0])
|
||||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]',"text",TestSelectAddress().test_select_second_address())
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]','text','heyyyyyy')
|
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]','text','heyyyyyy')
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
@ -206,3 +203,35 @@ class TestDraftMessage(TeleniumTestCase):
|
||||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/Toolbar[0]/BoxLayout[0]/MDIconButton[0]/MDLabel[0]')
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/Toolbar[0]/BoxLayout[0]/MDIconButton[0]/MDLabel[0]')
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
|
||||||
|
def test_edit_draft_messgae(self):
|
||||||
|
print("---------------Edit Draft Message----------------")
|
||||||
|
# OPEN NAVIGATION-DRAWER
|
||||||
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
|
time.sleep(4)
|
||||||
|
# OPEN DRAFT SCREEN
|
||||||
|
self.cli.click_on('//NavigationDrawerIconButton[3]')
|
||||||
|
time.sleep(7)
|
||||||
|
# SHOW DRAFT MESSAGE AND SELECT FIRST MESSAGE
|
||||||
|
self.cli.click_on('//Carousel[0]')
|
||||||
|
time.sleep(3)
|
||||||
|
# CLICK EDIT BUTTON
|
||||||
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/Toolbar[0]/BoxLayout[2]/MDIconButton[0]/MDLabel[0]')
|
||||||
|
time.sleep(5)
|
||||||
|
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]','text','draft message')
|
||||||
|
time.sleep(4)
|
||||||
|
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/MDTextField[1]','text','Hey , This is draft Message Body')
|
||||||
|
time.sleep(3)
|
||||||
|
self.cli.click_on('//MDIconButton[2]')
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
def test_delete_draft_message(self):
|
||||||
|
print("-------------Delete Draft Message-----------------")
|
||||||
|
time.sleep(5)
|
||||||
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
|
time.sleep(4)
|
||||||
|
self.cli.click_on('//NavigationDrawerIconButton[3]')
|
||||||
|
time.sleep(5)
|
||||||
|
self.cli.click_on('//Carousel[0]')
|
||||||
|
time.sleep(5)
|
||||||
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/Toolbar[0]/BoxLayout[2]/MDIconButton[1]/MDLabel[0]')
|
||||||
|
time.sleep(2)
|
Reference in New Issue
Block a user