collectible e2e
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
2cf4be4b34
commit
95aa500119
|
@ -216,11 +216,9 @@ class TestWalletManagement(SingleDeviceTestCase):
|
||||||
if not wallet_view.element_by_text('1').is_element_displayed():
|
if not wallet_view.element_by_text('1').is_element_displayed():
|
||||||
self.driver.fail('User collectibles amount does not match')
|
self.driver.fail('User collectibles amount does not match')
|
||||||
|
|
||||||
# TODO: redo to open with Opensea
|
|
||||||
@marks.testrail_id(5346)
|
@marks.testrail_id(5346)
|
||||||
@marks.high
|
@marks.high
|
||||||
@marks.skip
|
def test_collectible_from_wallet(self):
|
||||||
def test_collectible_from_wallet_opens_in_browser_view(self):
|
|
||||||
passphrase = wallet_users['F']['passphrase']
|
passphrase = wallet_users['F']['passphrase']
|
||||||
signin_view = SignInView(self.driver)
|
signin_view = SignInView(self.driver)
|
||||||
home_view = signin_view.recover_access(passphrase=passphrase)
|
home_view = signin_view.recover_access(passphrase=passphrase)
|
||||||
|
@ -228,14 +226,20 @@ class TestWalletManagement(SingleDeviceTestCase):
|
||||||
profile.switch_network()
|
profile.switch_network()
|
||||||
wallet_view = profile.wallet_button.click()
|
wallet_view = profile.wallet_button.click()
|
||||||
wallet_view.set_up_wallet()
|
wallet_view.set_up_wallet()
|
||||||
|
wallet_view.scan_tokens()
|
||||||
wallet_view.accounts_status_account.click()
|
wallet_view.accounts_status_account.click()
|
||||||
wallet_view.collectibles_button.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()
|
wallet_view.just_fyi('Check collectibles amount in wallet')
|
||||||
web_view.element_by_text('cryptokitties.co').wait_and_click()
|
wallet_view.cryptokitties_in_collectibles_number.wait_for_visibility_of_element(30)
|
||||||
cryptokitty_link = 'https://www.cryptokitties.co/kitty/1338226'
|
if wallet_view.cryptokitties_in_collectibles_number.text != '1':
|
||||||
if not web_view.element_by_text(cryptokitty_link).is_element_displayed(60):
|
self.errors.append('Wrong number is shown on CK assets: %s' % wallet_view.cryptokitties_in_collectibles_number.text)
|
||||||
self.driver.fail('Cryptokitty detail page not opened')
|
|
||||||
|
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)
|
@marks.testrail_id(6224)
|
||||||
|
|
|
@ -198,10 +198,10 @@ class CollectiblesButton(BaseButton):
|
||||||
self.locator = self.Locator.text_selector('Collectibles')
|
self.locator = self.Locator.text_selector('Collectibles')
|
||||||
|
|
||||||
|
|
||||||
class CryptoKittiesInCollectiblesButton(BaseButton):
|
class NumberInCollectiblesButton(BaseButton):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver, name):
|
||||||
super(CryptoKittiesInCollectiblesButton, self).__init__(driver)
|
super(NumberInCollectiblesButton, self).__init__(driver)
|
||||||
self.locator = self.Locator.text_selector('CryptoKitties')
|
self.locator = self.Locator.xpath_selector('//*[@text="%s"]//following-sibling::android.widget.TextView' % name)
|
||||||
|
|
||||||
|
|
||||||
class ViewInCryptoKittiesButton(BaseButton):
|
class ViewInCryptoKittiesButton(BaseButton):
|
||||||
|
@ -422,7 +422,7 @@ class WalletView(BaseView):
|
||||||
self.multiaccount_more_options = MultiaccountMoreOptions(self.driver)
|
self.multiaccount_more_options = MultiaccountMoreOptions(self.driver)
|
||||||
self.accounts_status_account = AccountElementButton(self.driver, account_name="Status account")
|
self.accounts_status_account = AccountElementButton(self.driver, account_name="Status account")
|
||||||
self.collectibles_button = CollectiblesButton(self.driver)
|
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.view_in_cryptokitties_button = ViewInCryptoKittiesButton(self.driver)
|
||||||
self.set_currency_button = SetCurrencyButton(self.driver)
|
self.set_currency_button = SetCurrencyButton(self.driver)
|
||||||
self.add_account_button = AddAccountButton(self.driver)
|
self.add_account_button = AddAccountButton(self.driver)
|
||||||
|
|
Loading…
Reference in New Issue