Customise gas price in some tests

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Serhy 2020-05-15 14:51:05 +03:00
parent dc303fecc9
commit b8c3518c96
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
5 changed files with 14 additions and 7 deletions

View File

@ -199,7 +199,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
'in fact %s ' % chat_2_sender_message.transaction_status.text)
send_message = chat_2_sender_message.sign_and_send.click()
send_message.next_button.click()
send_message.sign_transaction()
send_message.sign_transaction(default_gas_price=False)
home_2.just_fyi('Check that transaction message is updated with new status after offline')
chat_2.toggle_airplane_mode()
@ -287,7 +287,8 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
from views.send_transaction_view import SendTransactionView
send_transaction = SendTransactionView(self.driver)
send_transaction.sign_transaction()
send_transaction.ok_got_it_button.click()
send_transaction.sign_transaction(default_gas_price=False)
chat_sender_message = chat.chat_element_by_text('↑ Outgoing transaction')
self.network_api.wait_for_confirmation_of_transaction(sender['address'], amount, confirmations=15)
if chat_sender_message.transaction_status.text != 'Confirmed':

View File

@ -186,7 +186,7 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(6275)
@marks.medium
def test_public_chat_messaging(self):
def test_public_chat_messages_received_while_different_tab_opened(self):
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1, home_2 = device_1.create_user(), device_2.create_user()

View File

@ -60,7 +60,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
self.driver.fail(values_in_logcat)
@marks.testrail_id(5333)
@marks.critical
@marks.low
def test_deploy_contract_from_daap(self):
sender = transaction_senders['L']
sign_in_view = SignInView(self.driver)
@ -71,7 +71,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
status_test_dapp.wait_for_d_aap_to_load()
status_test_dapp.transactions_button.click()
send_transaction_view = status_test_dapp.deploy_contract_button.click()
send_transaction_view.sign_transaction()
send_transaction_view.sign_transaction(default_gas_price=False)
for text in 'Contract deployed at: ', 'Call contract get function', \
'Call contract set function', 'Call function 2 times in a row':
if not status_test_dapp.element_by_text(text).is_element_displayed(180):

View File

@ -72,7 +72,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
status_test_dapp.wait_for_d_aap_to_load()
status_test_dapp.transactions_button.click()
send_transaction_view = status_test_dapp.deploy_contract_button.click()
send_transaction_view.sign_transaction(keycard=True)
send_transaction_view.sign_transaction(keycard=True, default_gas_price=False)
for text in 'Contract deployed at: ', 'Call contract get function', \
'Call contract set function', 'Call function 2 times in a row':
if not status_test_dapp.element_by_text(text).is_element_displayed(180):

View File

@ -317,7 +317,13 @@ class SendTransactionView(BaseView):
wallet_view = WalletView(self.driver)
wallet_view.ok_got_it_button.click()
def sign_transaction(self, sender_password: str = common_password, keycard=False):
def sign_transaction(self, sender_password: str = common_password, keycard=False, default_gas_price=True):
if not default_gas_price:
self.network_fee_button.click()
default_gas_price = self.gas_price_input.text
self.gas_price_input.clear()
self.gas_price_input.set_value(str(float(default_gas_price)+30))
self.update_fee_button.click()
if keycard:
keycard_view = self.sign_with_keycard_button.click()
keycard_view.enter_default_pin()