e2e: eip-1559
This commit is contained in:
parent
f5f47ae636
commit
f940f8dfc8
|
@ -6,10 +6,10 @@ from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase
|
|||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
@marks.transaction
|
||||
class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
||||
@marks.testrail_id(6253)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_send_eth_in_1_1_chat_transaction_push(self):
|
||||
sender = transaction_senders['A']
|
||||
self.create_drivers(2)
|
||||
|
@ -96,6 +96,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6263)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_request_and_receive_stt_in_1_1_chat_offline(self):
|
||||
sender = transaction_senders['L']
|
||||
self.create_drivers(2)
|
||||
|
@ -157,6 +158,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6265)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_decline_transactions_in_1_1_chat_push_notification_changing_state(self):
|
||||
sender = transaction_senders['B']
|
||||
self.create_drivers(2)
|
||||
|
@ -208,6 +210,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6257)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_network_mismatch_for_send_request_in_1_1_chat(self):
|
||||
sender = transaction_senders['D']
|
||||
self.create_drivers(2)
|
||||
|
@ -254,11 +257,12 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
|||
self.errors.append("Transaction is shown as confirmed on mainnet, but was sent on ropsten!")
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.transaction
|
||||
|
||||
class TestCommandsSingleDevices(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(6279)
|
||||
@marks.high
|
||||
@marks.transaction
|
||||
def test_send_eth_to_ens_in_chat(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
sender = transaction_senders['E']
|
||||
|
|
|
@ -5,11 +5,11 @@ from tests.users import transaction_senders, transaction_recipients, ens_user_ro
|
|||
from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase
|
||||
from views.sign_in_view import SignInView
|
||||
|
||||
@marks.transaction
|
||||
class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(6293)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_send_eth_in_1_1_chat(self):
|
||||
sender = transaction_senders['E']
|
||||
self.create_drivers(2)
|
||||
|
@ -83,6 +83,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6294)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_keycard_request_and_receive_stt_in_1_1_chat_offline_opened_from_push(self):
|
||||
sender = transaction_senders['D']
|
||||
self.create_drivers(2)
|
||||
|
@ -153,11 +154,12 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
|
|||
self.errors.verify_no_errors()
|
||||
|
||||
|
||||
@marks.transaction
|
||||
|
||||
class TestCommandsSingleDevices(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(6295)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_keycard_send_eth_to_ens(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
sender = transaction_senders['E']
|
||||
|
|
|
@ -4,11 +4,12 @@ from tests.users import transaction_senders
|
|||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
@marks.transaction
|
||||
|
||||
class TestTransactionDApp(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(5309)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_request_stt_from_daap(self):
|
||||
sender = transaction_senders['K']
|
||||
home = SignInView(self.driver).recover_access(sender['passphrase'], unique_password)
|
||||
|
@ -37,6 +38,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5342)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_sign_message_and_2tx_in_batch_and_transactions_filters_from_daap(self):
|
||||
password = 'password_for_daap'
|
||||
home = SignInView(self.driver).recover_access(passphrase=transaction_senders['W']['passphrase'],
|
||||
|
@ -87,7 +89,8 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5784)
|
||||
@marks.medium
|
||||
def test_sign_typed_message_deply_simple_contract_request_pub_key_from_dapp(self):
|
||||
@marks.transaction
|
||||
def test_sign_typed_message_deploy_simple_contract_request_pub_key_from_dapp(self):
|
||||
user = transaction_senders['W']
|
||||
home = SignInView(self.driver).recover_access(passphrase=user['passphrase'])
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ from tests.users import transaction_senders
|
|||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
@marks.transaction
|
||||
class TestTransactionDApp(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(6249)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_request_stt_from_daap(self):
|
||||
sender = transaction_senders['K']
|
||||
sign_in_view = SignInView(self.driver)
|
||||
|
@ -36,6 +36,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6251)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_sign_message_and_transactions_from_daap(self):
|
||||
home = SignInView(self.driver).recover_access(passphrase=transaction_senders['Z']['passphrase'],
|
||||
keycard=True)
|
||||
|
@ -79,6 +80,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6310)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_keycard_sign_typed_message_deploy_simple_contract(self):
|
||||
sender = transaction_senders['W']
|
||||
home = SignInView(self.driver).recover_access(sender['passphrase'], keycard=True)
|
||||
|
|
|
@ -5,17 +5,18 @@ from tests.users import transaction_senders, basic_user, wallet_users
|
|||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
@marks.transaction
|
||||
class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(6289)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_send_eth_from_wallet_to_address(self):
|
||||
recipient = basic_user
|
||||
sender = transaction_senders['P']
|
||||
sign_in_view = SignInView(self.driver)
|
||||
home_view = sign_in_view.recover_access(sender['passphrase'], keycard=True)
|
||||
wallet_view = home_view.wallet_button.click()
|
||||
wallet_view.wait_balance_is_changed()
|
||||
wallet_view.accounts_status_account.click()
|
||||
transaction_amount = wallet_view.get_unique_amount()
|
||||
wallet_view.send_transaction(amount=transaction_amount,
|
||||
|
@ -31,6 +32,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
@marks.testrail_id(6290)
|
||||
@marks.high
|
||||
@marks.flaky
|
||||
@marks.transaction
|
||||
def test_keycard_fetching_balance_after_offline(self):
|
||||
sender = transaction_senders['F']
|
||||
sign_in = SignInView(self.driver)
|
||||
|
@ -42,7 +44,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
sign_in.just_fyi('Go back to online and check that balance is updated')
|
||||
sign_in.set_network_to_cellular_only()
|
||||
home.continue_syncing_button.wait_and_click()
|
||||
home.connection_offline_icon.wait_for_invisibility_of_element(100)
|
||||
home.connection_offline_icon.wait_for_invisibility_of_element(300)
|
||||
wallet = home.wallet_button.click()
|
||||
wallet.wait_balance_is_changed('ETH')
|
||||
wallet.wait_balance_is_changed('STT')
|
||||
|
@ -65,6 +67,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6291)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_can_see_all_transactions_in_history(self):
|
||||
address = wallet_users['D']['address']
|
||||
passphrase = wallet_users['D']['passphrase']
|
||||
|
@ -98,7 +101,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
@marks.testrail_id(6292)
|
||||
@marks.transaction
|
||||
@marks.medium
|
||||
def test_keycard_send_funds_between_accounts_in_multiaccount_instance(self):
|
||||
def test_keycard_send_funds_between_accounts_set_max_in_multiaccount_instance(self):
|
||||
sign_in_view = SignInView(self.driver).create_user(keycard=True)
|
||||
wallet = sign_in_view.wallet_button.click()
|
||||
status_account_address = wallet.get_wallet_address()[2:]
|
||||
|
|
|
@ -9,11 +9,11 @@ from views.send_transaction_view import SendTransactionView
|
|||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
@marks.transaction
|
||||
class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(5308)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_send_eth_from_wallet_to_address_incorrect_password(self):
|
||||
recipient = basic_user
|
||||
sender = transaction_senders['P']
|
||||
|
@ -53,6 +53,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
@marks.testrail_id(6237)
|
||||
@marks.high
|
||||
@marks.flaky
|
||||
@marks.transaction
|
||||
def test_fetching_balance_after_offline(self):
|
||||
sender = wallet_users['E']
|
||||
sign_in = SignInView(self.driver)
|
||||
|
@ -65,7 +66,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
sign_in.just_fyi('Go back to online and check that balance is updated')
|
||||
sign_in.set_network_to_cellular_only()
|
||||
home.continue_syncing_button.wait_and_click()
|
||||
home.connection_offline_icon.wait_for_invisibility_of_element(100)
|
||||
home.connection_offline_icon.wait_for_invisibility_of_element(300)
|
||||
wallet = home.wallet_button.click()
|
||||
wallet.wait_balance_is_changed('ETH')
|
||||
wallet.scan_tokens('STT')
|
||||
|
@ -90,6 +91,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5461)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_send_eth_from_wallet_incorrect_address(self):
|
||||
recipient = basic_user
|
||||
sender = wallet_users['B']
|
||||
|
@ -112,6 +114,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5350)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_send_token_with_7_decimals(self):
|
||||
sender = transaction_senders['S']
|
||||
recipient = basic_user
|
||||
|
@ -131,6 +134,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5412)
|
||||
@marks.high
|
||||
@marks.transaction
|
||||
def test_insufficient_funds_wallet_positive_balance(self):
|
||||
sender = wallet_users['E']
|
||||
sign_in_view = SignInView(self.driver)
|
||||
|
@ -161,6 +165,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5314)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_can_see_balance_and_all_transactions_history_on_cellular(self):
|
||||
address = wallet_users['D']['address']
|
||||
passphrase = wallet_users['D']['passphrase']
|
||||
|
@ -202,6 +207,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5429)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_set_currency(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
user_currency = 'Euro (EUR)'
|
||||
|
@ -213,6 +219,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(5407)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_offline_can_login_cant_send_transaction(self):
|
||||
home = SignInView(self.driver).create_user()
|
||||
wallet = home.wallet_button.click()
|
||||
|
@ -299,6 +306,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6235)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_can_change_account_settings(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
sign_in_view.create_user()
|
||||
|
@ -331,6 +339,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6282)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_can_scan_eip_681_links(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
sign_in_view.recover_access(transaction_senders['C']['passphrase'])
|
||||
|
@ -358,16 +367,16 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
'address': '0x58d8…F2ff',
|
||||
},
|
||||
},
|
||||
'gas_settings': {
|
||||
'url': 'ethereum:0x3d597789ea16054a084ac84ce87f50df9198f415@3?value=1e16&gasPrice=1000000000&gasLimit=100000',
|
||||
'data': {
|
||||
'amount': '0.01',
|
||||
'asset': 'ETHro',
|
||||
'address': '0x3D59…F415',
|
||||
'gas_limit': '100000',
|
||||
'gas_price': '1',
|
||||
},
|
||||
},
|
||||
# 'gas_settings': {
|
||||
# 'url': 'ethereum:0x3d597789ea16054a084ac84ce87f50df9198f415@3?value=1e16&gasPrice=1000000000&gasLimit=100000',
|
||||
# 'data': {
|
||||
# 'amount': '0.01',
|
||||
# 'asset': 'ETHro',
|
||||
# 'address': '0x3D59…F415',
|
||||
# 'gas_limit': '100000',
|
||||
# 'gas_price': '1',
|
||||
# },
|
||||
# },
|
||||
'payment_link': {
|
||||
'url': 'ethereum:pay-0xc55cf4b03948d7ebc8b9e8bad92643703811d162@3/transfer?address=0x3d597789ea16054a084ac84ce87f50df9198f415&uint256=1e1',
|
||||
'data': {
|
||||
|
@ -444,6 +453,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6208)
|
||||
@marks.high
|
||||
@marks.transaction
|
||||
def test_send_transaction_with_custom_token(self):
|
||||
contract_address = '0x101848D5C5bBca18E6b4431eEdF6B95E9ADF82FA'
|
||||
name = 'Weenus 💪'
|
||||
|
@ -687,6 +697,7 @@ class TestTransactionWalletMultipleDevice(MultipleDeviceTestCase):
|
|||
|
||||
@marks.testrail_id(6330)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_can_send_all_tokens_via_max_option(self):
|
||||
sender = transaction_senders['V']
|
||||
receiver = transaction_recipients['K']
|
||||
|
|
|
@ -89,12 +89,15 @@ class SendTransactionView(BaseView):
|
|||
self.validation_error_element = Text(self.driver, xpath="//*[@content-desc='custom-gas-fee']/../android.view.ViewGroup//*[@content-desc='icon']")
|
||||
|
||||
self.network_fee_button = Button(self.driver, accessibility_id="custom-gas-fee")
|
||||
|
||||
### Old tx interface
|
||||
self.transaction_fee_button = Button(self.driver, accessibility_id="transaction-fee-button")
|
||||
self.transaction_fee_total_value = Text(self.driver, translation_id="wallet-transaction-total-fee", suffix="//following::android.widget.TextView[1]")
|
||||
self.gas_limit_input = EditBox(self.driver, prefix="(", translation_id="gas-limit", suffix="/..//android.widget.EditText)[1]")
|
||||
self.gas_price_input = GasPriceInput(self.driver)
|
||||
self.total_fee_input = EditBox(self.driver, translation_id="wallet-transaction-total-fee", suffix="/following-sibling::android.widget.TextView")
|
||||
self.update_fee_button = UpdateFeeButton(self.driver)
|
||||
#####
|
||||
|
||||
|
||||
self.sign_transaction_button = Button(self.driver, accessibility_id="send-transaction-bottom-sheet")
|
||||
|
@ -133,16 +136,13 @@ class SendTransactionView(BaseView):
|
|||
self.enter_recipient_address_input.click()
|
||||
self.done_button.click_until_absense_of_element(self.done_button)
|
||||
|
||||
def sign_transaction(self, sender_password: str = common_password, keycard=False, default_gas_price=False):
|
||||
def sign_transaction(self, sender_password: str = common_password, keycard=False, default_gas_price=True):
|
||||
self.driver.info("**Signing transaction (keycard:%s, default gas price:%s)**" % (str(keycard), str(default_gas_price)))
|
||||
if self.sign_in_phrase.is_element_displayed(30):
|
||||
self.set_up_wallet_when_sending_tx()
|
||||
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(int(float(default_gas_price))+30))
|
||||
self.update_fee_button.click()
|
||||
# to be updated with new fast/slow/normal fee
|
||||
if keycard:
|
||||
keycard_view = self.sign_with_keycard_button.click()
|
||||
keycard_view.enter_default_pin()
|
||||
|
@ -156,12 +156,6 @@ class SendTransactionView(BaseView):
|
|||
self.driver.info("**Transaction is signed!**")
|
||||
self.ok_button.click()
|
||||
|
||||
def get_transaction_fee_total(self):
|
||||
self.driver.info("**Getting transaction fee**")
|
||||
self.network_fee_button.click_until_presence_of_element(self.gas_limit_input)
|
||||
fee_value = self.transaction_fee_total_value.text.split()[0]
|
||||
self.update_fee_button.click()
|
||||
return fee_value
|
||||
|
||||
@staticmethod
|
||||
def get_formatted_recipient_address(address):
|
||||
|
|
Loading…
Reference in New Issue