Fix seed-phrase test

Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
Serhy 2018-05-10 13:29:08 +03:00 committed by yevh-berdnyk
parent 942c703bd8
commit 37fe1e2b9e
No known key found for this signature in database
GPG Key ID: E9B425FDFC4DEA9C
2 changed files with 5 additions and 5 deletions

View File

@ -90,10 +90,10 @@ class TestProfileView(SingleDeviceTestCase):
profile_view.ok_continue_button.click()
seed_phrase = profile_view.get_seed_phrase()
profile_view.next_button.click()
word_number = profile_view.seed_phrase_word_number.text
word_number = profile_view.seed_phrase_word_number.number
profile_view.seed_phrase_word_input.set_value(seed_phrase[word_number])
profile_view.next_button.click()
word_number_1 = profile_view.seed_phrase_word_number.text
word_number_1 = profile_view.seed_phrase_word_number.number
profile_view.seed_phrase_word_input.set_value(seed_phrase[word_number_1])
profile_view.done_button.click()
profile_view.yes_button.click()

View File

@ -187,9 +187,9 @@ class SeedPhraseWordNumberText(BaseText):
self.locator = self.Locator.xpath_selector("//*[contains(@text,'#')]")
@property
def text(self):
def number(self):
time.sleep(1)
return self.find_element().text.split('#')[1]
return int(self.find_element().text.split('#')[1])
class SeedPhraseWordInput(BaseEditBox):
@ -280,7 +280,7 @@ class ProfileView(BaseView):
def get_seed_phrase(self):
text = [i.text for i in self.seed_phrase_table.find_elements()]
return dict(zip(text[::2], text[1::2]))
return dict(zip(map(int, text[::2]), text[1::2]))
def edit_profile_picture(self, file_name: str):
if AbstractTestCase().environment == 'sauce':