From e88472a0e0246dce7283d252becb696ff0aafc13 Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Tue, 15 Oct 2019 10:58:11 +0200 Subject: [PATCH] fix some testrail links and add new test for checking log_level and fleet Signed-off-by: Churikova Tetiana --- .../atomic/account_management/test_profile.py | 29 ++++++++++++++----- test/appium/views/profile_view.py | 7 +++++ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/test/appium/tests/atomic/account_management/test_profile.py b/test/appium/tests/atomic/account_management/test_profile.py index ef60e99a11..5fb4bed12e 100644 --- a/test/appium/tests/atomic/account_management/test_profile.py +++ b/test/appium/tests/atomic/account_management/test_profile.py @@ -56,7 +56,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): self.errors.append("Message was not sent!") self.verify_no_errors() - @marks.testrail_id(5741) + @marks.testrail_id(6228) @marks.high def test_mobile_data_usage_popup_stop_syncing(self): sign_in_view = SignInView(self.driver) @@ -78,7 +78,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): if sign_in_view.element_by_text_part(offline_banner_text).is_element_displayed(): self.driver.fail("Popup about offline history is shown") - @marks.testrail_id(6228) + @marks.testrail_id(6229) @marks.high def test_mobile_data_usage_settings(self): sign_in_view = SignInView(self.driver) @@ -333,6 +333,26 @@ class TestProfileSingleDevice(SingleDeviceTestCase): self.errors.append('%s is not visible' % text) self.verify_no_errors() + @marks.testrail_id(5368) + @marks.high + def test_log_level_and_fleet(self): + sign_in_view = SignInView(self.driver) + sign_in_view.create_user() + profile_view = sign_in_view.profile_button.click() + profile_view.advanced_button.click() + if 'release' in str(pytest.config.getoption('apk')): + # should be edited after showing some text in setting when log in disabled + if profile_view.log_level_setting.is_element_displayed(): + self.errors.append('Log is not disabled') + if not profile_view.element_by_text('eth.beta').is_element_displayed(): + self.errors.append('Fleet is not set to eth.beta') + else: + for text in 'INFO', 'eth.beta': + if not profile_view.element_by_text(text).is_element_displayed(): + self.errors.append('%s is not selected by default' % text) + self.verify_no_errors() + + @marks.testrail_id(5468) @marks.medium def test_deny_camera_access_changing_profile_photo(self): @@ -533,11 +553,6 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): chat_2.send_message_button.click() chat_1.chat_element_by_text(message_1).wait_for_visibility_of_element() - -@marks.all -@marks.account -class TestProfileMultipleDevice(MultipleDeviceTestCase): - @marks.testrail_id(5762) @marks.high def test_pair_devices_sync_one_to_one_contacts(self): diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index a64e93389c..0e3c67941a 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -162,6 +162,12 @@ class AdvancedButton(BaseButton): return self.navigate() +class LogLevelSetting(BaseButton): + + def __init__(self, driver): + super(LogLevelSetting, self).__init__(driver) + self.locator = self.Locator.xpath_selector('//*[@content-desc="log-level-settings-button"]/android.widget.TextView[2]') + class BackupRecoveryPhraseButton(BaseButton): def __init__(self, driver): @@ -555,6 +561,7 @@ class ProfileView(BaseView): self.cross_icon = CrossIcon(self.driver) self.share_button = ShareButton(self.driver) self.advanced_button = AdvancedButton(self.driver) + self.log_level_setting = LogLevelSetting(self.driver) self.debug_mode_toggle = DebugModeToggle(self.driver) self.contacts_button = ContactsButton(self.driver) self.dapp_permissions_button = DappPermissionsButton(self.driver)