Fix critical e2e for new profile

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2019-08-29 09:52:30 +02:00
parent 3541f636df
commit fe6f7999bd
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
1 changed files with 8 additions and 1 deletions

View File

@ -166,7 +166,7 @@ class BackupRecoveryPhraseButton(BaseButton):
def __init__(self, driver):
super(BackupRecoveryPhraseButton, self).__init__(driver)
self.locator = self.Locator.text_selector('Backup your recovery phrase')
self.locator = self.Locator.xpath_selector('//*[@content-desc="back-up-recovery-phrase-button"]')
def click(self):
self.scroll_to_element().click()
@ -477,6 +477,11 @@ class RevokeAccessButton(BaseButton):
super(RevokeAccessButton, self).__init__(driver)
self.locator = self.Locator.text_selector('Revoke access')
class PrivacyAndSecurityButton(BaseButton):
def __init__(self, driver):
super(PrivacyAndSecurityButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector('//*[@content-desc="privacy-and-security-settings-button"]')
class ProfileView(BaseView):
@ -519,6 +524,7 @@ class ProfileView(BaseView):
self.contacts_button = ContactsButton(self.driver)
self.dapp_permissions_button = DappPermissionsButton(self.driver)
self.revoke_access_button = RevokeAccessButton(self.driver)
self.privacy_and_security_button = PrivacyAndSecurityButton(self.driver)
# Backup recovery phrase
self.backup_recovery_phrase_button = BackupRecoveryPhraseButton(self.driver)
@ -593,6 +599,7 @@ class ProfileView(BaseView):
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()