collectible e2e

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2020-10-23 15:52:58 +02:00
parent 2cf4be4b34
commit 95aa500119
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
2 changed files with 18 additions and 14 deletions

View File

@ -216,11 +216,9 @@ class TestWalletManagement(SingleDeviceTestCase):
if not wallet_view.element_by_text('1').is_element_displayed():
self.driver.fail('User collectibles amount does not match')
# TODO: redo to open with Opensea
@marks.testrail_id(5346)
@marks.high
@marks.skip
def test_collectible_from_wallet_opens_in_browser_view(self):
def test_collectible_from_wallet(self):
passphrase = wallet_users['F']['passphrase']
signin_view = SignInView(self.driver)
home_view = signin_view.recover_access(passphrase=passphrase)
@ -228,14 +226,20 @@ class TestWalletManagement(SingleDeviceTestCase):
profile.switch_network()
wallet_view = profile.wallet_button.click()
wallet_view.set_up_wallet()
wallet_view.scan_tokens()
wallet_view.accounts_status_account.click()
wallet_view.collectibles_button.click()
wallet_view.cryptokitties_in_collectibles_button.wait_and_click(60)
web_view = wallet_view.view_in_cryptokitties_button.click()
web_view.element_by_text('cryptokitties.co').wait_and_click()
cryptokitty_link = 'https://www.cryptokitties.co/kitty/1338226'
if not web_view.element_by_text(cryptokitty_link).is_element_displayed(60):
self.driver.fail('Cryptokitty detail page not opened')
wallet_view.just_fyi('Check collectibles amount in wallet')
wallet_view.cryptokitties_in_collectibles_number.wait_for_visibility_of_element(30)
if wallet_view.cryptokitties_in_collectibles_number.text != '1':
self.errors.append('Wrong number is shown on CK assets: %s' % wallet_view.cryptokitties_in_collectibles_number.text)
wallet_view.just_fyi('Check "Open in OpenSea"')
wallet_view.element_by_text('Check on opensea').click()
if not wallet_view.allow_button.is_element_displayed(20):
self.errors.append('OpenSea app is not opened when navigating from wallet')
self.errors.verify_no_errors()
@marks.testrail_id(6224)

View File

@ -198,10 +198,10 @@ class CollectiblesButton(BaseButton):
self.locator = self.Locator.text_selector('Collectibles')
class CryptoKittiesInCollectiblesButton(BaseButton):
def __init__(self, driver):
super(CryptoKittiesInCollectiblesButton, self).__init__(driver)
self.locator = self.Locator.text_selector('CryptoKitties')
class NumberInCollectiblesButton(BaseButton):
def __init__(self, driver, name):
super(NumberInCollectiblesButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector('//*[@text="%s"]//following-sibling::android.widget.TextView' % name)
class ViewInCryptoKittiesButton(BaseButton):
@ -422,7 +422,7 @@ class WalletView(BaseView):
self.multiaccount_more_options = MultiaccountMoreOptions(self.driver)
self.accounts_status_account = AccountElementButton(self.driver, account_name="Status account")
self.collectibles_button = CollectiblesButton(self.driver)
self.cryptokitties_in_collectibles_button = CryptoKittiesInCollectiblesButton(self.driver)
self.cryptokitties_in_collectibles_number = NumberInCollectiblesButton(self.driver, 'CryptoKitties')
self.view_in_cryptokitties_button = ViewInCryptoKittiesButton(self.driver)
self.set_currency_button = SetCurrencyButton(self.driver)
self.add_account_button = AddAccountButton(self.driver)