diff --git a/test/appium/tests/atomic/account_management/test_create_account.py b/test/appium/tests/atomic/account_management/test_create_account.py index c6fc36942e..2d783a18e6 100644 --- a/test/appium/tests/atomic/account_management/test_create_account.py +++ b/test/appium/tests/atomic/account_management/test_create_account.py @@ -88,18 +88,21 @@ class TestCreateAccount(SingleDeviceTestCase): @marks.medium def test_create_account_short_and_mismatch_password(self): sign_in = SignInView(self.driver) - sign_in.create_account_button.click() - sign_in.password_input.set_value('12345') + sign_in.get_started_button.click() + sign_in.generate_key_button.click() + sign_in.next_button.click() + sign_in.next_button.click() + sign_in.create_password_input.set_value('12345') mismatch_error = "Passwords don't match" sign_in.next_button.click() - if sign_in.confirm_password_input.is_element_displayed(): + if sign_in.confirm_your_password_input.is_element_displayed(): self.errors.append('Next button is clickable when password is less then 6 symbols') - sign_in.password_input.set_value('123456') + sign_in.create_password_input.set_value('123456') sign_in.next_button.click() - sign_in.confirm_password_input.set_value('1234567') + sign_in.confirm_your_password_input.set_value('1234567') sign_in.next_button.click() if not sign_in.find_text_part(mismatch_error): diff --git a/test/appium/tests/atomic/chats/test_chats_management.py b/test/appium/tests/atomic/chats/test_chats_management.py index befce96bc0..db7313562e 100644 --- a/test/appium/tests/atomic/chats/test_chats_management.py +++ b/test/appium/tests/atomic/chats/test_chats_management.py @@ -279,12 +279,11 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase): username_1 = 'user_%s' % get_current_time() message_before_block_1, message_before_block_2 = "Before block from %s" % device_1.driver.number, "Before block from %s" % device_2.driver.number message_after_block_2 = "After block from %s" % device_2.driver.number - home_1, home_2 = device_1.create_user(username=username_1), device_2.recover_access(basic_user['passphrase']) + home_1, home_2 = device_1.create_user(), device_2.recover_access(basic_user['passphrase']) profile_1 = home_1.profile_button.click() default_username_1 = profile_1.default_username_text.text home_1 = profile_1.get_back_to_home_view() - # device 1, device 2: join to public chat and send several messages chat_name = device_1.get_public_chat_name() for home in home_1, home_2: diff --git a/test/appium/tests/atomic/chats/test_commands.py b/test/appium/tests/atomic/chats/test_commands.py index cc036412af..0179306332 100644 --- a/test/appium/tests/atomic/chats/test_commands.py +++ b/test/appium/tests/atomic/chats/test_commands.py @@ -380,7 +380,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase): chat.asset_by_name('ETHro').click() chat.send_as_keyevent(amount) send_transaction_view = chat.get_send_transaction_view() - chat.send_message_button.click_until_presence_of_element(send_transaction_view.sign_transaction_button) + chat.send_message_button.click_until_presence_of_element(send_transaction_view.sign_with_password) # if not send_transaction_view.element_by_text(recipient['username']).is_element_displayed(): # self.errors.append('Recipient name is not shown') diff --git a/test/appium/tests/atomic/chats/test_one_to_one.py b/test/appium/tests/atomic/chats/test_one_to_one.py index 9459b99760..d76be2d59c 100644 --- a/test/appium/tests/atomic/chats/test_one_to_one.py +++ b/test/appium/tests/atomic/chats/test_one_to_one.py @@ -118,7 +118,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase): device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) username_1 = 'user_%s' % get_current_time() - device_1_home, device_2_home = device_1.create_user(username=username_1), device_2.create_user() + device_1_home, device_2_home = device_1.create_user(), device_2.create_user() profile_1 = device_1_home.profile_button.click() default_username_1 = profile_1.default_username_text.text device_1_home = profile_1.get_back_to_home_view() diff --git a/test/appium/tests/atomic/transactions/test_wallet.py b/test/appium/tests/atomic/transactions/test_wallet.py index 8bfd02ecf2..639fe22b78 100644 --- a/test/appium/tests/atomic/transactions/test_wallet.py +++ b/test/appium/tests/atomic/transactions/test_wallet.py @@ -115,7 +115,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): send_transaction.sign_with_password.click() send_transaction.enter_password_input.click() send_transaction.enter_password_input.send_keys('wrong_password') - send_transaction.sign_transaction_button.click() + send_transaction.sign_button.click() send_transaction.find_full_text('Wrong password', 20) @marks.testrail_id(1452) @@ -384,7 +384,6 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase): ropsten_txs = self.network_api.get_transactions(address) ropsten_tokens = self.network_api.get_token_transactions(address) expected_txs_list = get_merged_txs_list(ropsten_txs, ropsten_tokens) - signin_view = SignInView(self.driver) home_view = signin_view.recover_access(passphrase=passphrase) wallet_view = home_view.wallet_button.click() diff --git a/test/appium/views/base_view.py b/test/appium/views/base_view.py index e44aee60dc..62d07d99df 100644 --- a/test/appium/views/base_view.py +++ b/test/appium/views/base_view.py @@ -324,9 +324,8 @@ class BaseView(object): def accept_agreements(self): iterations = int() - from views.sign_in_view import CreateAccountButton, PasswordInput - while iterations <= 3 and not (CreateAccountButton(self.driver).is_element_displayed(2) or PasswordInput( - self.driver).is_element_displayed(2)): + while iterations <= 2 and (self.ok_button.is_element_displayed(2) or + self.continue_button.is_element_displayed(2)): for button in self.ok_button, self.continue_button: try: button.wait_for_element(3) diff --git a/test/appium/views/chat_view.py b/test/appium/views/chat_view.py index 4118be9e51..3bce78f167 100644 --- a/test/appium/views/chat_view.py +++ b/test/appium/views/chat_view.py @@ -78,21 +78,18 @@ class ChatMenuButton(BaseButton): class MembersButton(BaseButton): - def __init__(self, driver): super(MembersButton, self).__init__(driver) self.locator = self.Locator.xpath_selector('(//android.view.ViewGroup[@content-desc="action"])[1]') class DeleteChatButton(BaseButton): - def __init__(self, driver): super(DeleteChatButton, self).__init__(driver) self.locator = self.Locator.xpath_selector('//*[@text="Delete chat"]') class ClearHistoryButton(BaseButton): - def __init__(self, driver): super(ClearHistoryButton, self).__init__(driver) self.locator = self.Locator.xpath_selector('//*[@text="Clear history"]') @@ -109,27 +106,24 @@ class GroupInfoButton(BaseButton): class LeaveChatButton(BaseButton): - def __init__(self, driver): super(LeaveChatButton, self).__init__(driver) self.locator = self.Locator.xpath_selector('//*[@text="Leave public chat"]') class ClearButton(BaseButton): - def __init__(self, driver): super(ClearButton, self).__init__(driver) self.locator = self.Locator.xpath_selector('//*[@text="CLEAR"]') -class BlockButton(BaseButton): +class BlockButton(BaseButton): def __init__(self, driver): super(BlockButton, self).__init__(driver) self.locator = self.Locator.xpath_selector('//*[@text="BLOCK"]') class LeaveButton(BaseButton): - def __init__(self, driver): super(LeaveButton, self).__init__(driver) self.locator = self.Locator.xpath_selector('//*[@text="LEAVE"]') @@ -223,11 +217,13 @@ class ProfileSendTransactionButton(BaseButton): super(ProfileSendTransactionButton, self).__init__(driver) self.locator = self.Locator.accessibility_id('send-transaction-button') + class ProfileBlockContactButton(BaseButton): def __init__(self, driver): super(ProfileBlockContactButton, self).__init__(driver) self.locator = self.Locator.accessibility_id('block-contact') + class JoinChatButton(BaseButton): def __init__(self, driver): super(JoinChatButton, self).__init__(driver) @@ -276,7 +272,7 @@ class ChatElementByText(BaseText): "@text='Not sent. Tap for options' or @text='Network mismatch']" self.locator = self.Locator.xpath_selector(parent_locator + text) - return StatusText(self.driver, self.locator.value) + return StatusText(self.driver, self.locator.value).wait_for_element(10) @property def progress_bar(self): diff --git a/test/appium/views/home_view.py b/test/appium/views/home_view.py index b5299b7282..d1ec2caac3 100644 --- a/test/appium/views/home_view.py +++ b/test/appium/views/home_view.py @@ -195,7 +195,7 @@ class HomeView(BaseView): return ChatView(self.driver) def join_public_chat(self, chat_name: str): - self.plus_button.click() + self.plus_button.click_until_presence_of_element(self.join_public_chat_button) self.join_public_chat_button.wait_for_visibility_of_element(5) contacts_view = self.join_public_chat_button.click() contacts_view.chat_name_editbox.click() diff --git a/test/appium/views/sign_in_view.py b/test/appium/views/sign_in_view.py index 4dc97bdbe9..9b50cfc62a 100644 --- a/test/appium/views/sign_in_view.py +++ b/test/appium/views/sign_in_view.py @@ -125,7 +125,7 @@ class OtherAccountsButton(BaseButton): class PrivacyPolicyLink(BaseButton): def __init__(self, driver): super(PrivacyPolicyLink, self).__init__(driver) - self.locator = self.Locator.text_part_selector('Privacy Policy') + self.locator = self.Locator.text_part_selector('privacy policy') def navigate(self): from views.web_views.base_web_view import BaseWebView