new test added: user can see own assets after account recovering

Signed-off-by: Oleksii Lymarenko <alexey.lymarenko@gmail.com>
This commit is contained in:
Oleksii Lymarenko 2018-11-09 14:36:21 +02:00
parent 624130e440
commit 9b198e4352
No known key found for this signature in database
GPG Key ID: 2007E841ECE4A02C
5 changed files with 34 additions and 3 deletions

View File

@ -253,8 +253,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
home_view = signin_view.create_user()
network_name = 'Mainnet with upstream RPC'
profile = home_view.profile_button.click()
signin_view = profile.switch_network(network_name)
home_view = signin_view.sign_in()
profile.switch_network(network_name)
profile = home_view.profile_button.click()
if not profile.current_active_network == network_name.upper():
self.driver.fail('Oops! Wrong network selected!')

View File

@ -197,3 +197,18 @@ class TestWalletManagement(SingleDeviceTestCase):
pytest.fail('Failed transactions are not filtered')
details.back_button.click()
self.verify_no_errors()
@marks.testrail_id(5381)
@marks.high
@marks.skip
def test_user_can_see_all_own_assets_after_account_recovering(self):
passphrase = wallet_users['D']['passphrase']
signin_view = SignInView(self.driver)
home_view = signin_view.recover_access(passphrase=passphrase)
profile = home_view.profile_button.click()
profile.switch_network('Rinkeby with upstream RPC')
profile = home_view.profile_button.click()
wallet_view = profile.wallet_button.click()
wallet_view.set_up_wallet()
if wallet_view.collectible_amount_by_name('kdo') != '1':
self.driver.fail('User collectibles amount does not match!')

View File

@ -34,6 +34,12 @@ wallet_users['D']['username'] = "Quickwitted United Orca"
wallet_users['D']['address'] = "80b663e82657caf5657ce79b11aeaeda02c6cd92"
wallet_users['D']['public_key'] = "0x048d9ee2acb99b0c9fef98665f8287d99fc365c5e827fc2541ffdce4cb87a9480bbea8" \
"324968b9bb1ae6c2eca37cf0ab4aba9d85755e3a532431b9edc189f23c7c"
wallet_users['E'] = dict()
wallet_users['E']['passpharse'] = "record sphere illegal section blame swing wreck estate celery same excite summer"
wallet_users['E']['username'] = "Homely Untimely Grasshopper"
wallet_users['E']['address'] = "0x3e2e4077753d3c229a9ae332b9ca46958945e2f6"
wallet_users['E']['public_key'] = "0x04a30d58c2c65c654a521455dabc139a9c26be7ca565f152a8182376150c1e12fe362c017a21b0e" \
"58676b84a945e34030c7150ae8d03758e94bf017f930d6189b2"
transaction_senders = dict()

View File

@ -477,7 +477,8 @@ class ProfileView(BaseView):
network_button.click()
self.connect_button.click()
from views.sign_in_view import SignInView
return SignInView(self.driver)
signin_view = SignInView(self.driver)
signin_view.sign_in()
def add_custom_network(self):
self.advanced_button.click()

View File

@ -147,6 +147,12 @@ class AssetTextElement(BaseText):
self.locator = self.Locator.accessibility_id('%s-asset-value-text' % asset_name.lower())
class CollectibleTextElement(BaseText):
def __init__(self, driver, collectible_name):
super().__init__(driver)
self.locator = self.Locator.accessibility_id('%s-collectible-value-text' % collectible_name.lower())
class AssetCheckBox(BaseButton):
def __init__(self, driver, asset_name):
super(AssetCheckBox, self).__init__(driver)
@ -322,3 +328,7 @@ class WalletView(BaseView):
send_transaction_view.recent_recipients_button.click_until_presence_of_element(recent_recipient)
recent_recipient.click()
self.send_request_button.click()
def collectible_amount_by_name(self, name):
elm = CollectibleTextElement(self.driver, name)
return elm.text