From 346d157b5c6da791259d17fcd50012680afd3352 Mon Sep 17 00:00:00 2001 From: osamacis Date: Mon, 14 Nov 2022 18:38:51 +0530 Subject: [PATCH] Refactor test create_random_address --- src/bitmessagekivy/main.kv | 5 ++--- .../tests/test_create_random_address.py | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/bitmessagekivy/main.kv b/src/bitmessagekivy/main.kv index d55b5f9c..71fda69c 100644 --- a/src/bitmessagekivy/main.kv +++ b/src/bitmessagekivy/main.kv @@ -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: diff --git a/src/bitmessagekivy/tests/test_create_random_address.py b/src/bitmessagekivy/tests/test_create_random_address.py index cd062c45..87698369 100644 --- a/src/bitmessagekivy/tests/test_create_random_address.py +++ b/src/bitmessagekivy/tests/test_create_random_address.py @@ -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