From 28fe3f9f28bfdff2412cd8dbc02338a8f0b4df5d Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Thu, 14 Oct 2021 16:54:11 +0530 Subject: [PATCH] Payment test case[added attribute to check state of sub tabs] --- src/bitmessagekivy/tests/test_network_screen.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/bitmessagekivy/tests/test_network_screen.py b/src/bitmessagekivy/tests/test_network_screen.py index 18ee938a..a01746d4 100644 --- a/src/bitmessagekivy/tests/test_network_screen.py +++ b/src/bitmessagekivy/tests/test_network_screen.py @@ -28,7 +28,14 @@ class NetworkStatusScreen(TeleniumTestProcess): self.cli.wait_click('//NavigationItem[@text=\"Network status\"]', timeout=5) # checking current screen self.assertExists("//ScreenManager[@current=\"networkstat\"]", timeout=5) + # Checking the state of "Total Connection" tab + self.assertExists( + '//NetworkStat/MDTabs[0]//MDTabsLabel[@text=\"Total connections\"][@state=\"down\"]', timeout=3) + # Checking the state of "Processes" tab + self.assertExists('//NetworkStat/MDTabs[0]//MDTabsLabel[@text=\"Processes\"][@state=\"normal\"]', timeout=3) + # Checking the "Tab" is rendered + self.assertExists('//NetworkStat/MDTabs[0]//MDTabsLabel[@text=\"Processes\"]', timeout=4) # Clicking on Processes Tab - self.cli.wait_click('//NetworkStat/MDTabs[0]//MDTabsLabel[@text=\"Processes\"]', timeout=3) - # this is for checking current sub-tab - self.assertTrue('//NetworkStat/RelativeLayout[1]/Tab[@disabled]', 'False') + self.cli.wait_click('//NetworkStat/MDTabs[0]//MDTabsLabel[@text=\"Processes\"]', timeout=4) + # Checking the state of "Processes" tab + self.assertExists('//NetworkStat/MDTabs[0]//MDTabsLabel[@text=\"Processes\"][@state=\"normal\"]', timeout=3)