2021-06-11 19:14:57 +02:00
|
|
|
# pylint: disable=too-few-public-methods
|
|
|
|
|
|
|
|
from .telenium_process import TeleniumTestProcess
|
|
|
|
from .common import skip_screen_checks
|
|
|
|
|
|
|
|
|
|
|
|
class SettingScreen(TeleniumTestProcess):
|
|
|
|
"""Setting Screen Functionality Testing"""
|
|
|
|
|
|
|
|
@skip_screen_checks
|
|
|
|
def test_setting_screen(self):
|
|
|
|
"""Show Setting Screen"""
|
2021-07-30 10:02:05 +02:00
|
|
|
# This is for checking Current screen
|
|
|
|
self.assert_wait_no_except('//ScreenManager[@current]', timeout=15, value='inbox')
|
|
|
|
# This is for checking the Side nav Bar id closed
|
|
|
|
self.assertExists('//MDNavigationDrawer[@status~=\"closed\"]', timeout=5)
|
|
|
|
# This is for checking the menu button is appeared
|
|
|
|
self.assertExists('//MDActionTopAppBarButton[@icon~=\"menu\"]', timeout=5)
|
2021-06-11 19:14:57 +02:00
|
|
|
# this is for opening Nav drawer
|
2021-07-30 10:02:05 +02:00
|
|
|
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=5)
|
2021-06-11 19:14:57 +02:00
|
|
|
# checking state of Nav drawer
|
2021-07-30 10:02:05 +02:00
|
|
|
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=5)
|
2021-06-11 19:14:57 +02:00
|
|
|
# this is for scrolling Nav drawer
|
|
|
|
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
2021-07-30 10:02:05 +02:00
|
|
|
# assert for checking scroll function
|
|
|
|
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=5)
|
2021-06-11 19:14:57 +02:00
|
|
|
# this is for opening setting screen
|
2021-07-30 10:02:05 +02:00
|
|
|
self.cli.wait_click('//NavigationItem[@text=\"Settings\"]', timeout=3)
|
2021-06-11 19:14:57 +02:00
|
|
|
# Checking current screen
|
2021-07-30 10:02:05 +02:00
|
|
|
self.assertExists("//ScreenManager[@current=\"set\"]", timeout=2)
|