e2e tests updated according to new wallet onboarding

Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
yevh-berdnyk 2018-05-11 22:15:39 +03:00
parent 6eea090ef8
commit 0d2849d955
No known key found for this signature in database
GPG Key ID: E9B425FDFC4DEA9C
3 changed files with 15 additions and 1 deletions

View File

@ -23,6 +23,7 @@ class TestProfileView(SingleDeviceTestCase):
self.errors.append("QR code value '%s' doesn't match public key '%s'" % (key_value_from_qr, key_value)) self.errors.append("QR code value '%s' doesn't match public key '%s'" % (key_value_from_qr, key_value))
profile_view.cross_icon.click() profile_view.cross_icon.click()
wallet_view = profile_view.wallet_button.click() wallet_view = profile_view.wallet_button.click()
wallet_view.set_up_wallet()
wallet_view.request_button.click() wallet_view.request_button.click()
wallet_view.qr_code_image.wait_for_element() wallet_view.qr_code_image.wait_for_element()
key_value = wallet_view.address_text.text key_value = wallet_view.address_text.text

View File

@ -1,4 +1,3 @@
import pytest
import time import time
from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase
from tests import transaction_users, api_requests, get_current_time, transaction_users_wallet, marks from tests import transaction_users, api_requests, get_current_time, transaction_users_wallet, marks
@ -31,6 +30,7 @@ class TestTransaction(SingleDeviceTestCase):
send_transaction_view.back_button.click() send_transaction_view.back_button.click()
api_requests.verify_balance_is_updated(initial_balance_recipient, recipient['address']) api_requests.verify_balance_is_updated(initial_balance_recipient, recipient['address'])
wallet_view = home_view.wallet_button.click() wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
transactions_view = wallet_view.transactions_button.click() transactions_view = wallet_view.transactions_button.click()
transactions_view.transactions_table.find_transaction(amount=transaction_amount) transactions_view.transactions_table.find_transaction(amount=transaction_amount)

View File

@ -110,6 +110,12 @@ class AddressText(BaseButton):
self.locator = self.Locator.accessibility_id('address-text') self.locator = self.Locator.accessibility_id('address-text')
class SetUpButton(BaseButton):
def __init__(self, driver):
super(SetUpButton, self).__init__(driver)
self.locator = self.Locator.text_selector("LETS GET SET UP")
class WalletView(BaseView): class WalletView(BaseView):
def __init__(self, driver): def __init__(self, driver):
super(WalletView, self).__init__(driver) super(WalletView, self).__init__(driver)
@ -132,6 +138,8 @@ class WalletView(BaseView):
self.qr_code_image = QRCodeImage(self.driver) self.qr_code_image = QRCodeImage(self.driver)
self.address_text = AddressText(self.driver) self.address_text = AddressText(self.driver)
self.set_up_button = SetUpButton(self.driver)
def get_usd_total_value(self): def get_usd_total_value(self):
return float(self.usd_total_value.text) return float(self.usd_total_value.text)
@ -147,3 +155,8 @@ class WalletView(BaseView):
errors.append('Difference between current (%s) and expected (%s) USD balance > 2%%!!' % (usd, expected_usd)) errors.append('Difference between current (%s) and expected (%s) USD balance > 2%%!!' % (usd, expected_usd))
else: else:
info('Current USD balance %s is ok' % usd) info('Current USD balance %s is ok' % usd)
def set_up_wallet(self):
self.set_up_button.click()
self.done_button.click()
self.yes_button.click()