Recover same acc twice test
Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
parent
e6c859dd2d
commit
d281c560dc
|
@ -2,7 +2,7 @@ import re
|
|||
|
||||
from tests import marks, bootnode_address, mailserver_address, camera_access_error_text, \
|
||||
photos_access_error_text, test_dapp_url, test_dapp_name, mailserver_ams, mailserver_gc, \
|
||||
mailserver_hk, prod_fleet, staging_fleet
|
||||
mailserver_hk, prod_fleet, common_password
|
||||
from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase
|
||||
from tests.users import transaction_senders, basic_user, ens_user
|
||||
from views.sign_in_view import SignInView
|
||||
|
@ -254,12 +254,25 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
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()
|
||||
recovery_phrase = profile_view.backup_recovery_phrase()
|
||||
if sign_in_view.profile_button.counter.is_element_displayed():
|
||||
self.errors.append('Profile button counter is shown after recovery phrase backup')
|
||||
profile_view.backup_recovery_phrase_button.click()
|
||||
if not profile_view.backup_recovery_phrase_button.is_element_displayed():
|
||||
self.errors.append('Back up seed phrase option is available after seed phrase backed up!')
|
||||
self.driver.fail('Back up seed phrase option is available after seed phrase backed up!')
|
||||
profile_view.back_button.click()
|
||||
profile_view.logout()
|
||||
recover_view = sign_in_view.access_key_button.click()
|
||||
recover_view.enter_seed_phrase_button.click()
|
||||
recover_view.seedphrase_input.click()
|
||||
recover_view.seedphrase_input.set_value(' '.join(recovery_phrase.values()))
|
||||
recover_view.next_button.click()
|
||||
recover_view.element_by_text('UNLOCK').click()
|
||||
sign_in_view.password_input.set_value(common_password)
|
||||
chats_view = sign_in_view.sign_in_button.click()
|
||||
chats_view.plus_button.click()
|
||||
if not chats_view.start_new_chat_button.is_element_displayed():
|
||||
self.errors.append("Can't proceed using account after it's re-recover twice.")
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5329)
|
||||
|
|
|
@ -2,7 +2,7 @@ from selenium.common.exceptions import NoSuchElementException
|
|||
|
||||
from tests import marks, test_dapp_url
|
||||
from tests.base_test_case import SingleDeviceTestCase
|
||||
from tests.users import basic_user
|
||||
from tests.users import basic_user, ens_user
|
||||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
|
@ -28,8 +28,9 @@ class TestDeepLinks(SingleDeviceTestCase):
|
|||
def test_open_user_profile_using_deep_link(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
sign_in_view.create_user()
|
||||
for user_ident in ens_user['ens'], basic_user['public_key']:
|
||||
self.driver.close_app()
|
||||
deep_link = 'https://join.status.im/user/%s' % basic_user['public_key']
|
||||
deep_link = 'https://get.status.im/user/%s' % user_ident
|
||||
sign_in_view.open_weblink_and_login(deep_link)
|
||||
chat_view = sign_in_view.get_chat_view()
|
||||
for text in basic_user['username'], 'Add to contacts':
|
||||
|
|
|
@ -2,10 +2,10 @@ from views.base_element import BaseEditBox, BaseButton, BaseElement
|
|||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
class PassphraseInput(BaseEditBox):
|
||||
class SeedphraseInput(BaseEditBox):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(PassphraseInput, self).__init__(driver)
|
||||
super(SeedphraseInput, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector("//android.widget.EditText")
|
||||
|
||||
|
||||
|
@ -97,7 +97,7 @@ class RecoverAccessView(SignInView):
|
|||
super(RecoverAccessView, self).__init__(driver)
|
||||
self.driver = driver
|
||||
|
||||
self.passphrase_input = PassphraseInput(self.driver)
|
||||
self.seedphrase_input = SeedphraseInput(self.driver)
|
||||
self.enter_seed_phrase_button = EnterSeedPhraseButton(self.driver)
|
||||
self.confirm_recover_access = ConfirmRecoverAccess(self.driver)
|
||||
self.reencrypt_your_key_button = ReencryptYourKeyButton(self.driver)
|
||||
|
|
|
@ -61,6 +61,7 @@ class SignInButton(BaseButton):
|
|||
from views.home_view import HomeView
|
||||
return HomeView(self.driver)
|
||||
|
||||
|
||||
class LetsGoButton(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(LetsGoButton, self).__init__(driver)
|
||||
|
@ -217,8 +218,8 @@ class SignInView(BaseView):
|
|||
def recover_access(self, passphrase: str, password: str = common_password):
|
||||
recover_access_view = self.access_key_button.click()
|
||||
recover_access_view.enter_seed_phrase_button.click()
|
||||
recover_access_view.passphrase_input.click()
|
||||
recover_access_view.passphrase_input.set_value(passphrase)
|
||||
recover_access_view.seedphrase_input.click()
|
||||
recover_access_view.seedphrase_input.set_value(passphrase)
|
||||
recover_access_view.next_button.click()
|
||||
recover_access_view.reencrypt_your_key_button.click()
|
||||
recover_access_view.next_button.click()
|
||||
|
|
Loading…
Reference in New Issue