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')
|
self._import_button = Button('mainWindow_Import_StatusButton')
|
||||||
|
|
||||||
@allure.step('Input seed phrase')
|
@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 len(seed_phrase) == 12:
|
||||||
if not self._12_words_tab_button.is_checked:
|
if not self._12_words_tab_button.is_checked:
|
||||||
self._12_words_tab_button.click()
|
self._12_words_tab_button.click()
|
||||||
|
@ -211,7 +211,12 @@ class SeedPhraseInputView(OnboardingView):
|
||||||
|
|
||||||
for index, word in enumerate(seed_phrase, start=1):
|
for index, word in enumerate(seed_phrase, start=1):
|
||||||
self._seed_phrase_input_text_edit.real_name['objectName'] = f'statusSeedPhraseInputField{index}'
|
self._seed_phrase_input_text_edit.real_name['objectName'] = f'statusSeedPhraseInputField{index}'
|
||||||
self._seed_phrase_input_text_edit.text = word
|
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()
|
self._import_button.click()
|
||||||
return YourProfileView().wait_until_appears()
|
return YourProfileView().wait_until_appears()
|
||||||
|
|
|
@ -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')
|
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703040', 'Import: 12 word seed phrase')
|
||||||
@pytest.mark.case(703040)
|
@pytest.mark.case(703040)
|
||||||
@pytest.mark.parametrize('user_account', [constants.user.user_account_two])
|
@pytest.mark.parametrize('user_account', [constants.user.user_account_one])
|
||||||
def test_import_seed_phrase(aut: AUT, keys_screen, main_window, user_account):
|
@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'):
|
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()
|
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)
|
profile_view.set_display_name(user_account.name)
|
||||||
|
|
||||||
with step('Finalize onboarding and open main screen'):
|
with step('Finalize onboarding and open main screen'):
|
||||||
|
|
Loading…
Reference in New Issue