From 37fe1e2b9e9b67156cc95600fa1a995f4885947e Mon Sep 17 00:00:00 2001 From: Serhy Date: Thu, 10 May 2018 13:29:08 +0300 Subject: [PATCH] Fix seed-phrase test Signed-off-by: yevh-berdnyk --- test/appium/tests/test_profile.py | 4 ++-- test/appium/views/profile_view.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/appium/tests/test_profile.py b/test/appium/tests/test_profile.py index 3b2532ab8a..d21da04312 100644 --- a/test/appium/tests/test_profile.py +++ b/test/appium/tests/test_profile.py @@ -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() diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index 23990c9262..42a44744ef 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -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':