Refactor test create_random_address

This commit is contained in:
osamacis 2022-11-14 18:38:51 +05:30
parent c80529eb9e
commit 346d157b5c
No known key found for this signature in database
GPG Key ID: 15F978BEFADAB9E1
2 changed files with 23 additions and 3 deletions

View File

@ -113,7 +113,6 @@
id: identity_dropdown
pos_hint:{"x":0,"y":0}
name: "identity_dropdown"
text: 'Select Address'
option_cls: Factory.get("MySpinnerOption")
font_size: '12.5sp'
text: app.getDefaultAccData(self)
@ -219,6 +218,8 @@ MDNavigationLayout:
id: scr_mngr
size_hint_y: None
height: root.height - toolbar.height
Inbox:
id:id_inbox
Login:
id:sc6
Random:
@ -235,8 +236,6 @@ MDNavigationLayout:
id:id_networkstat
Setting:
id:id_settings
Inbox:
id:id_inbox
Sent:
id:id_sent
Trash:

View File

@ -22,6 +22,27 @@ class CreateRandomAddress(TeleniumTestProcess):
"""Click on Proceed Button to Proceed to Next Screen."""
# Checking current Screen(Login screen)
self.assert_wait_no_except('//ScreenManager[@current]', timeout=15, value='login')
# Dragging from sent to PROS: to NOTE:
self.drag(
'''//Login//Screen//ContentHead[1][@section_name=\"PROS:\"]''',
'''//Login//Screen//ContentHead[0][@section_name=\"NOTE:\"]'''
)
# Assert the checkbox is rendered
self.assertExists(
'//Login//Screen[@name=\"check_screen\"]//AnchorLayout[1]/Check', timeout=5)
# Checking Status of checkbox before click
self.assertEqual(self.cli.getattr(
'//Login//Screen[@name=\"check_screen\"]//AnchorLayout[1]/Check[@active]', 'active'), False
)
# Clicking on the checkbox
self.cli.wait_click(
'//Login//Screen[@name=\"check_screen\"]//AnchorLayout[1]/Check', timeout=5
)
# Checking Status of checkbox after click
self.assertEqual(self.cli.getattr(
'//Login//Screen[@name=\"check_screen\"]//AnchorLayout[1]/Check', 'active'), True
)
# Checking the Proceed Next button is rendered or not
self.assertExists(
'''//Login//Screen[@name=\"check_screen\"]'''
'''//MDFillRoundFlatIconButton[@text=\"Proceed Next\"]''', timeout=5