resolve ENS in wallet

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2019-10-16 13:59:21 +02:00
parent 500d2cc787
commit 1f24722db0
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
3 changed files with 45 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import string
from tests import marks, camera_access_error_text, common_password from tests import marks, camera_access_error_text, common_password
from tests.base_test_case import SingleDeviceTestCase from tests.base_test_case import SingleDeviceTestCase
from tests.users import wallet_users, transaction_senders, basic_user from tests.users import wallet_users, transaction_senders, basic_user, ens_user, ens_user_other_domain
from views.sign_in_view import SignInView from views.sign_in_view import SignInView
@ -309,3 +309,36 @@ class TestWalletManagement(SingleDeviceTestCase):
self.driver.fail('Account was not added') self.driver.fail('Account was not added')
if not account_button.color_matches('multi_account_color.png'): if not account_button.color_matches('multi_account_color.png'):
self.driver.fail('Account color does not match expected') self.driver.fail('Account color does not match expected')
@marks.testrail_id(5406)
@marks.critical
def test_ens_username_recipient(self):
sign_in = SignInView(self.driver)
sign_in.create_user()
sign_in.just_fyi('switching to mainnet')
profile = sign_in.profile_button.click()
profile.switch_network('Mainnet with upstream RPC')
wallet = profile.wallet_button.click()
wallet.just_fyi('checking that "stateofus.eth" name will be resolved as recipient')
wallet.set_up_wallet()
wallet.accounts_status_account.click()
send_transaction = wallet.send_transaction_button.click()
send_transaction.chose_recipient_button.click()
send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value('%s.stateofus.eth' % ens_user['ens'])
send_transaction.done_button.click()
if send_transaction.enter_recipient_address_text.text != ens_user['address']:
self.errors.append('ENS address on stateofus.eth is not resolved as recipient')
wallet.just_fyi('checking that ".eth" name will be resolved as recipient')
send_transaction.chose_recipient_button.click()
send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value(ens_user_other_domain['ens'])
send_transaction.done_button.click()
if send_transaction.enter_recipient_address_text.text != ens_user_other_domain['address']:
self.errors.append('ENS address on another domain is not resolved as recipient')
self.verify_no_errors()

View File

@ -12,6 +12,11 @@ ens_user['username'] = "Outstanding Actual Eyas"
ens_user['public_key'] = "0x04318d20a2ca5fd0022579005ed24802e07d4ec610bede808dd13d3318af439e16d55be1a59af007a11120b" \ ens_user['public_key'] = "0x04318d20a2ca5fd0022579005ed24802e07d4ec610bede808dd13d3318af439e16d55be1a59af007a11120b" \
"d1c205861e5f53fe7b000a25e2b0d4eee7f0c5ebf7e" "d1c205861e5f53fe7b000a25e2b0d4eee7f0c5ebf7e"
ens_user['ens'] = 'autotester' ens_user['ens'] = 'autotester'
ens_user['address'] = '0x31419baa0242dFd2BB485b3e41A78210A1c2332A'
ens_user_other_domain = dict()
ens_user_other_domain['ens'] = 'tanyatest1.eth'
ens_user_other_domain['address'] = '0xcf2272205cc0cf96Cfbb9Dd740BD681D1E86901E'
wallet_users = dict() wallet_users = dict()

View File

@ -83,6 +83,11 @@ class EnterRecipientAddressInput(BaseEditBox):
super(EnterRecipientAddressInput, self).__init__(driver) super(EnterRecipientAddressInput, self).__init__(driver)
self.locator = self.Locator.xpath_selector("//*[@text='Enter recipient address']") self.locator = self.Locator.xpath_selector("//*[@text='Enter recipient address']")
class EnterRecipientAddressInputText(BaseText):
def __init__(self, driver):
super(EnterRecipientAddressInputText, self).__init__(driver)
self.locator = self.Locator.accessibility_id("recipient-address-text")
class RecentRecipientsButton(BaseButton): class RecentRecipientsButton(BaseButton):
def __init__(self, driver): def __init__(self, driver):
@ -201,6 +206,7 @@ class SendTransactionView(BaseView):
self.scan_qr_code_button = ScanQRCodeButton(self.driver) self.scan_qr_code_button = ScanQRCodeButton(self.driver)
self.enter_recipient_address_input = EnterRecipientAddressInput(self.driver) self.enter_recipient_address_input = EnterRecipientAddressInput(self.driver)
self.first_recipient_button = FirstRecipient(self.driver) self.first_recipient_button = FirstRecipient(self.driver)
self.enter_recipient_address_text = EnterRecipientAddressInputText(self.driver)
self.recent_recipients_button = RecentRecipientsButton(self.driver) self.recent_recipients_button = RecentRecipientsButton(self.driver)
self.amount_edit_box = AmountEditBox(self.driver) self.amount_edit_box = AmountEditBox(self.driver)