From 081b90ff4ecc84336d0152934ae3a65efd0ff2ea Mon Sep 17 00:00:00 2001 From: Churikova Tetiana Date: Thu, 29 Aug 2019 17:53:17 +0200 Subject: [PATCH] Fix high/critical e2e for profile Signed-off-by: Churikova Tetiana --- .../atomic/account_management/test_profile.py | 9 ++++--- .../test_wallet_management.py | 1 + test/appium/views/profile_view.py | 24 ++++++++++++------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/test/appium/tests/atomic/account_management/test_profile.py b/test/appium/tests/atomic/account_management/test_profile.py index b4cf4d284e..ca6b6fddf5 100644 --- a/test/appium/tests/atomic/account_management/test_profile.py +++ b/test/appium/tests/atomic/account_management/test_profile.py @@ -163,6 +163,8 @@ class TestProfileSingleDevice(SingleDeviceTestCase): if sign_in_view.profile_button.counter.text != '1': self.errors.append('Profile button counter is not shown after re-login') sign_in_view.profile_button.click() + profile_view.privacy_and_security_button.click() + profile_view.backup_recovery_phrase_button.click() profile_view.backup_recovery_phrase() if sign_in_view.profile_button.counter.is_element_displayed(60): self.errors.append('Profile button counter is shown after recovery phrase backup') @@ -197,6 +199,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): sign_in_view = SignInView(self.driver) sign_in_view.create_user() profile_view = sign_in_view.profile_button.click() + profile_view.privacy_and_security_button.click() profile_view.backup_recovery_phrase_button.click() profile_view.ok_continue_button.click() recovery_phrase = profile_view.get_recovery_phrase() @@ -222,7 +225,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase): base_web_view.open_in_webview() base_web_view.find_full_text('Frequently Asked Questions') base_web_view.click_system_back_button() - profile_view.submit_bug_button.click() + profile_view.request_a_feature_button.click() profile_view.find_full_text('#status') @marks.testrail_id(5382) @@ -501,9 +504,9 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase): device_1_home = device_1.create_user() device_1_home.profile_button.click() device_1_profile = device_1_home.get_profile_view() + device_1_profile.privacy_and_security_button.click() device_1_profile.backup_recovery_phrase_button.click() - device_1_profile.ok_continue_button.click() - recovery_phrase = device_1_profile.get_recovery_phrase() + recovery_phrase = device_1_profile.backup_recovery_phrase() device_1_profile.back_button.click() device_1_profile.get_back_to_home_view() device_1_name = 'device_%s' % device_1.driver.number diff --git a/test/appium/tests/atomic/account_management/test_wallet_management.py b/test/appium/tests/atomic/account_management/test_wallet_management.py index b47c70d50a..6cac269653 100644 --- a/test/appium/tests/atomic/account_management/test_wallet_management.py +++ b/test/appium/tests/atomic/account_management/test_wallet_management.py @@ -126,6 +126,7 @@ class TestWalletManagement(SingleDeviceTestCase): if not wallet.backup_recovery_phrase_warning_text.is_element_present(): pytest.fail("'Back up your recovery phrase' warning is not shown on Wallet") wallet.multiaccount_more_options.click_until_presence_of_element(wallet.backup_recovery_phrase) + wallet.backup_recovery_phrase.click() profile = wallet.get_profile_view() profile.backup_recovery_phrase() diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index efdff50ec3..9610dc2529 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -293,6 +293,12 @@ class SubmitBugButton(BaseButton): self.locator = self.Locator.accessibility_id("submit-bug-button") +class RequestFeatureButton(BaseButton): + + def __init__(self, driver): + super(RequestFeatureButton, self).__init__(driver) + self.locator = self.Locator.accessibility_id("request-a-feature-button") + class FaqButton(BaseButton): def __init__(self, driver): @@ -304,12 +310,6 @@ class FaqButton(BaseButton): return BaseWebView(self.driver) -class AboutButton(BaseButton): - def __init__(self, driver): - super(AboutButton, self).__init__(driver) - self.locator = self.Locator.accessibility_id("about-button") - - class VersionText(BaseText): def __init__(self, driver): super(VersionText, self).__init__(driver) @@ -415,7 +415,7 @@ class RemovePictureButton(BaseButton): class DevicesButton(BaseButton): def __init__(self, driver): super().__init__(driver) - self.locator = self.Locator.accessibility_id('pairing-settings-button') + self.locator = self.Locator.xpath_selector('//*[@content-desc="pairing-settings-button"]') class DeviceNameInput(BaseEditBox): @@ -429,6 +429,10 @@ class ContinueButton(BaseButton): super(ContinueButton, self).__init__(driver) self.locator = self.Locator.text_selector('Continue') +class SyncSettingsButton(BaseButton): + def __init__(self, driver): + super(SyncSettingsButton, self).__init__(driver) + self.locator = self.Locator.xpath_selector('//*[@content-desc="sync-settings-button"]') class GoToPairingSettingsButton(BaseButton): def __init__(self, driver): @@ -539,8 +543,10 @@ class ProfileView(BaseView): self.help_button = HelpButton(self.driver) self.submit_bug_button = SubmitBugButton(self.driver) + self.request_a_feature_button = RequestFeatureButton(self.driver) self.faq_button = FaqButton(self.driver) self.about_button = AboutButton(self.driver) + self.sync_settings_button = SyncSettingsButton(self.driver) # Bootnodes self.bootnodes_button = BootnodesButton(self.driver) @@ -598,9 +604,8 @@ class ProfileView(BaseView): text = [i.text for i in self.recovery_phrase_table.find_elements()] return dict(zip(map(int, text[::2]), text[1::2])) + def backup_recovery_phrase(self): - self.privacy_and_security_button.click() - self.backup_recovery_phrase_button.click() self.ok_continue_button.click() recovery_phrase = self.get_recovery_phrase() self.next_button.click() @@ -647,6 +652,7 @@ class ProfileView(BaseView): def discover_and_advertise_device(self, device_name): self.profile_button.click() + self.sync_settings_button.click() self.devices_button.scroll_to_element() self.devices_button.click() self.device_name_input.set_value(device_name)