e2e fixes
This commit is contained in:
parent
7de2941f26
commit
d1b991f656
|
@ -164,10 +164,12 @@
|
|||
(defn signing-view [tx window-height]
|
||||
(let [bottom-anim-value (anim/create-value (- window-height))
|
||||
alpha-value (anim/create-value 0)
|
||||
clear-timeout (atom nil)
|
||||
current-tx (reagent/atom nil)
|
||||
update? (reagent/atom nil)]
|
||||
(reagent/create-class
|
||||
{:component-will-update (fn [_ [_ tx _]]
|
||||
(when @clear-timeout (js/clearTimeout @clear-timeout))
|
||||
(cond
|
||||
@update?
|
||||
(do (reset! update? false)
|
||||
|
@ -183,7 +185,7 @@
|
|||
(show-panel-anim bottom-anim-value alpha-value))
|
||||
|
||||
:else
|
||||
(do (js/setTimeout #(reset! current-tx nil) 500)
|
||||
(do (reset! clear-timeout (js/setTimeout #(reset! current-tx nil) 500))
|
||||
(hide-panel-anim bottom-anim-value alpha-value (- window-height)))))
|
||||
:reagent-render (fn []
|
||||
(when @current-tx
|
||||
|
|
|
@ -75,6 +75,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5306)
|
||||
@marks.critical
|
||||
@marks.skip
|
||||
def test_send_eth_in_1_1_chat(self):
|
||||
recipient = transaction_recipients['A']
|
||||
sender = transaction_senders['A']
|
||||
|
|
|
@ -22,9 +22,6 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
status_test_dapp.assets_button.click()
|
||||
send_transaction_view = status_test_dapp.request_stt_button.click()
|
||||
wallet_view = send_transaction_view.get_wallet_view()
|
||||
wallet_view.done_button.click()
|
||||
wallet_view.yes_button.click()
|
||||
send_transaction_view.sign_transaction()
|
||||
self.network_api.verify_balance_is_updated(initial_balance, address)
|
||||
|
||||
|
@ -39,10 +36,8 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
status_test_dapp.transactions_button.click()
|
||||
send_transaction_view = status_test_dapp.sign_message_button.click()
|
||||
send_transaction_view.find_full_text('Test message')
|
||||
send_transaction_view.sign_transaction_button.click_until_presence_of_element(
|
||||
send_transaction_view.enter_password_input)
|
||||
send_transaction_view.enter_password_input.send_keys(password)
|
||||
send_transaction_view.sign_transaction_button.click()
|
||||
send_transaction_view.sign_button.click()
|
||||
|
||||
@marks.testrail_id(5333)
|
||||
@marks.critical
|
||||
|
@ -75,7 +70,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
status_test_dapp.transactions_button.click()
|
||||
send_transaction_view = status_test_dapp.sign_typed_message_button.click()
|
||||
send_transaction_view.enter_password_input.send_keys(common_password)
|
||||
send_transaction_view.sign_transaction_button.click()
|
||||
send_transaction_view.sign_button.click()
|
||||
status_test_dapp.find_text_part('0xde3048417e5881acc9ca8466ab0b3e2f9f965a70acabbda2d140e95a28b13d2d'
|
||||
'2d38eba6c0a5bfdc50e5d59e0ed3226c749732fd4a9374b57f34121eaff2a5081c')
|
||||
|
||||
|
@ -148,7 +143,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
send_transaction_view.sign_transaction_button.click_until_presence_of_element(
|
||||
send_transaction_view.enter_password_input)
|
||||
send_transaction_view.enter_password_input.send_keys(unique_password)
|
||||
send_transaction_view.sign_transaction_button.click()
|
||||
send_transaction_view.sign_button.click()
|
||||
send_transaction_view.check_no_values_in_logcat(password=unique_password)
|
||||
|
||||
@marks.testrail_id(5372)
|
||||
|
|
|
@ -34,6 +34,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
recent_recipient = send_transaction.element_by_text(recipient['username'])
|
||||
send_transaction.recent_recipients_button.click_until_presence_of_element(recent_recipient)
|
||||
recent_recipient.click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction()
|
||||
self.network_api.find_transaction_by_unique_amount(sender['address'], transaction_amount)
|
||||
|
||||
|
@ -55,6 +56,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.enter_recipient_address_button.click()
|
||||
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
|
||||
send_transaction.done_button.click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction()
|
||||
self.network_api.find_transaction_by_unique_amount(sender['address'], transaction_amount)
|
||||
|
||||
|
@ -82,6 +84,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.enter_recipient_address_button.click()
|
||||
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
|
||||
send_transaction.done_button.click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction()
|
||||
self.network_api.find_transaction_by_unique_amount(recipient['address'], amount, token=True)
|
||||
|
||||
|
@ -132,6 +135,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.enter_recipient_address_button.click()
|
||||
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
|
||||
send_transaction.done_button.click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction()
|
||||
self.network_api.find_transaction_by_unique_amount(recipient['address'], transaction_amount)
|
||||
transactions_view = wallet_view.transaction_history_button.click()
|
||||
|
@ -178,6 +182,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.enter_recipient_address_button.click()
|
||||
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
|
||||
send_transaction.done_button.click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction(unique_password)
|
||||
send_transaction.check_no_values_in_logcat(password=unique_password)
|
||||
|
||||
|
@ -205,6 +210,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.enter_recipient_address_button.click()
|
||||
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
|
||||
send_transaction.done_button.click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction()
|
||||
self.network_api.find_transaction_by_unique_amount(recipient['address'], amount, token=True, decimals=7)
|
||||
|
||||
|
@ -260,6 +266,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.enter_recipient_address_button.click()
|
||||
send_transaction.enter_recipient_address_input.set_value(basic_user['address'])
|
||||
send_transaction.done_button.click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction()
|
||||
self.network_api.find_transaction_by_unique_amount(sender['address'], valid_amount)
|
||||
|
||||
|
@ -314,6 +321,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5359)
|
||||
@marks.critical
|
||||
@marks.skip
|
||||
def test_modify_transaction_fee_values(self):
|
||||
sender = transaction_senders['U']
|
||||
sign_in_view = SignInView(self.driver)
|
||||
|
@ -362,6 +370,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.gas_price_input.set_value(gas_price)
|
||||
send_transaction.total_fee_input.click()
|
||||
send_transaction.done_button.click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction()
|
||||
self.network_api.find_transaction_by_unique_amount(sender['address'], amount)
|
||||
|
||||
|
@ -432,6 +441,7 @@ class TestTransactionWalletMultipleDevice(MultipleDeviceTestCase):
|
|||
send_transaction.chose_recipient_button.click()
|
||||
send_transaction.recent_recipients_button.click()
|
||||
send_transaction.element_by_text_part(recipient['username']).click()
|
||||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction()
|
||||
|
||||
wallet_1.home_button.click()
|
||||
|
|
|
@ -476,7 +476,7 @@ class ChatView(BaseView):
|
|||
wallet_view.done_button.click()
|
||||
wallet_view.yes_button.click()
|
||||
else:
|
||||
self.send_message_button.click_until_presence_of_element(send_transaction_view.sign_transaction_button)
|
||||
self.send_message_button.click_until_presence_of_element(send_transaction_view.sign_with_password)
|
||||
if kwargs.get('sign_transaction', True):
|
||||
send_transaction_view.sign_transaction(password)
|
||||
chat_elem = self.chat_element_by_text(amount)
|
||||
|
|
|
@ -161,6 +161,20 @@ class ValidationWarnings(object):
|
|||
self.not_enough_eth_for_gas = NotEnoughEthForGas(driver)
|
||||
|
||||
|
||||
class SignWithPasswordButton(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(SignWithPasswordButton, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector('//*[@text="Sign with password"]')
|
||||
|
||||
|
||||
class SignButton(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(SignButton, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector('//*[@text="Sign"]')
|
||||
|
||||
|
||||
class SendTransactionView(BaseView):
|
||||
def __init__(self, driver):
|
||||
super(SendTransactionView, self).__init__(driver)
|
||||
|
@ -182,6 +196,8 @@ class SendTransactionView(BaseView):
|
|||
|
||||
self.cancel_button = CancelButton(self.driver)
|
||||
self.sign_transaction_button = SignTransactionButton(self.driver)
|
||||
self.sign_with_password = SignWithPasswordButton(self.driver)
|
||||
self.sign_button = SignButton(self.driver)
|
||||
self.sign_in_phrase_text = SignInPhraseText(self.driver)
|
||||
self.password_input = PasswordInput(self.driver)
|
||||
self.enter_password_input = EnterPasswordInput(self.driver)
|
||||
|
@ -205,11 +221,10 @@ class SendTransactionView(BaseView):
|
|||
self.yes_button.click()
|
||||
|
||||
def sign_transaction(self, sender_password: str = common_password):
|
||||
self.sign_transaction_button.click_until_presence_of_element(self.enter_password_input)
|
||||
self.sign_with_password.click()
|
||||
self.enter_password_input.send_keys(sender_password)
|
||||
self.sign_transaction_button.click_until_presence_of_element(self.got_it_button)
|
||||
self.progress_bar.wait_for_invisibility_of_element(20)
|
||||
self.got_it_button.click()
|
||||
self.sign_button.click()
|
||||
self.ok_button.click()
|
||||
|
||||
def get_transaction_fee_total(self):
|
||||
return self.transaction_fee_total_value.text.split()[0]
|
||||
|
|
Loading…
Reference in New Issue