fixed code quality
This commit is contained in:
parent
90ffb7318a
commit
050b113e01
|
@ -61,7 +61,7 @@ class AddressBook(TeleniumTestProcess):
|
||||||
def test_cancel_addressbook_popup(self):
|
def test_cancel_addressbook_popup(self):
|
||||||
"""Cancel Address"""
|
"""Cancel Address"""
|
||||||
print("=====================Test -Cancel Address Add Popup=====================")
|
print("=====================Test -Cancel Address Add Popup=====================")
|
||||||
# Click on Account-Plus Icon to opeb popup for add Address
|
# Click on Account-Plus Icon to open popup for add Address
|
||||||
self.cli.execute('app.addingtoaddressbook()')
|
self.cli.execute('app.addingtoaddressbook()')
|
||||||
# Add Label to label Field
|
# Add Label to label Field
|
||||||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[0]', 'text', 'test2')
|
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[0]', 'text', 'test2')
|
||||||
|
@ -97,7 +97,7 @@ class AddressBook(TeleniumTestProcess):
|
||||||
self.assertExists('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[@text=\"Demo Subject\"]', timeout=2)
|
self.assertExists('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[@text=\"Demo Subject\"]', timeout=2)
|
||||||
# ADD MESSAGE BODY
|
# ADD MESSAGE BODY
|
||||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]',
|
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]',
|
||||||
'text', 'Hey,This is draft Message Body from Address Book')
|
'text', 'Hey,This is draft Message Body from Address Book')
|
||||||
# Checking Message body is Entered
|
# Checking Message body is Entered
|
||||||
self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[@text]', '')
|
self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[@text]', '')
|
||||||
# Click on Send Icon
|
# Click on Send Icon
|
||||||
|
@ -121,7 +121,6 @@ class AddressBook(TeleniumTestProcess):
|
||||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
||||||
# Swipe to delete
|
# Swipe to delete
|
||||||
self.assertTrue('//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[@disabled]', 'True')
|
self.assertTrue('//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[@disabled]', 'True')
|
||||||
self.cli.sleep(1)
|
|
||||||
self.drag(
|
self.drag(
|
||||||
'//MDList[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
'//MDList[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
||||||
'//MDList[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]')
|
'//MDList[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]')
|
||||||
|
|
|
@ -6,7 +6,7 @@ class TrashMessage(TeleniumTestProcess):
|
||||||
def test_delete_trash_message(self):
|
def test_delete_trash_message(self):
|
||||||
"""Delete Trash message permanently from trash message listing"""
|
"""Delete Trash message permanently from trash message listing"""
|
||||||
print("=====================Test -Delete Message From Trash Message Listing=====================")
|
print("=====================Test -Delete Message From Trash Message Listing=====================")
|
||||||
self.cli.sleep()
|
self.cli.sleep(8)
|
||||||
# this is for opening Nav drawer
|
# this is for opening Nav drawer
|
||||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=5)
|
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=5)
|
||||||
# checking state of Nav drawer
|
# checking state of Nav drawer
|
||||||
|
@ -43,4 +43,4 @@ class TrashMessage(TeleniumTestProcess):
|
||||||
self.assertExists("//Trash[@name~=\"trash\"]", timeout=2)
|
self.assertExists("//Trash[@name~=\"trash\"]", timeout=2)
|
||||||
total_trash_msgs = len(self.cli.select("//CutsomSwipeToDeleteItem"))
|
total_trash_msgs = len(self.cli.select("//CutsomSwipeToDeleteItem"))
|
||||||
# Checking the number of messages after delete.
|
# Checking the number of messages after delete.
|
||||||
self.assertEqual(total_trash_msgs, 1)
|
self.assertEqual(total_trash_msgs, 1)
|
||||||
|
|
Reference in New Issue
Block a user