Added type of selection of words with enter in seed phrase popup (#159)
This commit is contained in:
parent
0b09050410
commit
74e1cab6bc
|
@ -196,7 +196,7 @@ class SeedPhraseInputView(OnboardingView):
|
|||
self._import_button = Button('mainWindow_Import_StatusButton')
|
||||
|
||||
@allure.step('Input seed phrase')
|
||||
def input_seed_phrase(self, seed_phrase: typing.List[str]):
|
||||
def input_seed_phrase(self, seed_phrase: typing.List[str], autocomplete: bool):
|
||||
if len(seed_phrase) == 12:
|
||||
if not self._12_words_tab_button.is_checked:
|
||||
self._12_words_tab_button.click()
|
||||
|
@ -211,6 +211,11 @@ class SeedPhraseInputView(OnboardingView):
|
|||
|
||||
for index, word in enumerate(seed_phrase, start=1):
|
||||
self._seed_phrase_input_text_edit.real_name['objectName'] = f'statusSeedPhraseInputField{index}'
|
||||
if autocomplete:
|
||||
word_to_put = word[:-1]
|
||||
self._seed_phrase_input_text_edit.text = word_to_put
|
||||
driver.type(self._seed_phrase_input_text_edit.object, "<Return>")
|
||||
else:
|
||||
self._seed_phrase_input_text_edit.text = word
|
||||
|
||||
self._import_button.click()
|
||||
|
|
|
@ -23,11 +23,15 @@ def keys_screen(main_window) -> KeysView:
|
|||
|
||||
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703040', 'Import: 12 word seed phrase')
|
||||
@pytest.mark.case(703040)
|
||||
@pytest.mark.parametrize('user_account', [constants.user.user_account_two])
|
||||
def test_import_seed_phrase(aut: AUT, keys_screen, main_window, user_account):
|
||||
@pytest.mark.parametrize('user_account', [constants.user.user_account_one])
|
||||
@pytest.mark.parametrize('autocomplete', [
|
||||
pytest.param(False),
|
||||
pytest.param(True)
|
||||
])
|
||||
def test_import_seed_phrase(aut: AUT, keys_screen, main_window, user_account, autocomplete: bool):
|
||||
with step('Open import seed phrase view and enter seed phrase'):
|
||||
input_view = keys_screen.open_import_seed_phrase_view().open_seed_phrase_input_view()
|
||||
profile_view = input_view.input_seed_phrase(user_account.seed_phrase)
|
||||
profile_view = input_view.input_seed_phrase(user_account.seed_phrase, autocomplete)
|
||||
profile_view.set_display_name(user_account.name)
|
||||
|
||||
with step('Finalize onboarding and open main screen'):
|
||||
|
|
Loading…
Reference in New Issue