From e55f8c95e253125aaac870f4d407a50c9667a433 Mon Sep 17 00:00:00 2001 From: Serhy Date: Tue, 19 Feb 2019 20:07:59 +0200 Subject: [PATCH] Not expect messages after join gh Signed-off-by: Serhy --- test/appium/tests/atomic/chats/test_group_chat.py | 4 ++-- .../tests/atomic/transactions/test_daaps_transactions.py | 3 ++- test/appium/views/profile_view.py | 3 ++- test/appium/views/send_transaction_view.py | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/appium/tests/atomic/chats/test_group_chat.py b/test/appium/tests/atomic/chats/test_group_chat.py index ca9572cf90..75844f159b 100644 --- a/test/appium/tests/atomic/chats/test_group_chat.py +++ b/test/appium/tests/atomic/chats/test_group_chat.py @@ -166,7 +166,7 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase): # device 2: open the chat and check messages device_2_chat = device_2_home.get_chat_with_user(chat_name).click() device_2_chat.join_chat_button.click() - if not device_2_chat.chat_element_by_text(message_for_device_2).is_element_displayed(): - self.errors.append('Message that was sent after device 2 has joined is not visible') + if device_2_chat.chat_element_by_text(message_for_device_2).is_element_displayed(): + self.errors.append('Message that was sent after device 2 has joined is visible') self.verify_no_errors() diff --git a/test/appium/tests/atomic/transactions/test_daaps_transactions.py b/test/appium/tests/atomic/transactions/test_daaps_transactions.py index 5b6728d658..3a7e35fbb4 100644 --- a/test/appium/tests/atomic/transactions/test_daaps_transactions.py +++ b/test/appium/tests/atomic/transactions/test_daaps_transactions.py @@ -5,6 +5,7 @@ from tests.base_test_case import SingleDeviceTestCase from tests.users import transaction_senders, transaction_recipients, basic_user from views.send_transaction_view import SendTransactionView from views.sign_in_view import SignInView +from decimal import Decimal class TestTransactionDApp(SingleDeviceTestCase): @@ -335,7 +336,7 @@ class TestTransactionDApp(SingleDeviceTestCase): # Because tx gas price may change we calculate eth value according to current gas fee value send_transaction_view.advanced_button.click() transaction_fee_total = send_transaction_view.get_transaction_fee_total() - eth_available_for_tx = str(0.1 - transaction_fee_total) + eth_available_for_tx = str(Decimal('0.1') - Decimal(transaction_fee_total)) wei = '0.000000000000000001' eth_value_plus_one_wei = ''.join([eth_available_for_tx, wei[len(eth_available_for_tx):]]) send_transaction_view.amount_edit_box.set_value(eth_value_plus_one_wei) diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index 66b37a6823..36149ec667 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -494,9 +494,10 @@ class ProfileView(BaseView): self.network_settings_button.scroll_to_element() self.network_settings_button.click() self.plus_button.click_until_presence_of_element(self.ropsten_chain_button) - self.ropsten_chain_button.click() self.custom_network_url.send_keys('https://ropsten.infura.io/v3/f315575765b14720b32382a61a89341a') self.specify_name_input.send_keys('custom_ropsten') + self.ropsten_chain_button.click() + self.ropsten_chain_button.click() self.save_button.click() self.element_by_text_part('custom_ropsten').click_until_presence_of_element(self.connect_button) self.connect_button.click() diff --git a/test/appium/views/send_transaction_view.py b/test/appium/views/send_transaction_view.py index e14745ea76..2cb08160b0 100644 --- a/test/appium/views/send_transaction_view.py +++ b/test/appium/views/send_transaction_view.py @@ -212,5 +212,5 @@ class SendTransactionView(BaseView): self.got_it_button.click() def get_transaction_fee_total(self): - return float(self.transaction_fee_total_value.text.split()[0]) + return self.transaction_fee_total_value.text.split()[0]