Test to check cryptokitty in wallet collectibles

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Serhy 2019-10-03 21:33:36 +03:00
parent 72867473d0
commit 58c64608d0
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
5 changed files with 56 additions and 1 deletions

View File

@ -226,6 +226,24 @@ class TestWalletManagement(SingleDeviceTestCase):
if not wallet_view.element_by_text('1').is_element_displayed():
self.driver.fail('User collectibles amount does not match')
@marks.testrail_id(5346)
@marks.high
def test_collectible_from_wallet_opens_in_browser_view(self):
passphrase = wallet_users['F']['passphrase']
signin_view = SignInView(self.driver)
home_view = signin_view.recover_access(passphrase=passphrase)
profile = home_view.profile_button.click()
profile.switch_network('Mainnet with upstream RPC')
wallet_view = profile.wallet_button.click()
wallet_view.set_up_wallet()
wallet_view.collectibles_button.click()
wallet_view.cryptokitties_in_collectibles_button.click()
web_view = wallet_view.view_in_cryptokitties_button.click()
web_view.element_by_text('cryptokitties.co').click()
cryptokitty_link = 'https://www.cryptokitties.co/kitty/1338226'
if not web_view.element_by_text(cryptokitty_link).is_element_displayed():
self.driver.fail('Cryptokitty detail page not opened')
@marks.testrail_id(6208)
@marks.high
def test_add_custom_token(self):

View File

@ -69,7 +69,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
home_1.airplane_mode_button.click() # airplane mode on primary device
chat_2.element_by_text('Connecting to peers...').wait_for_invisibility_of_element(60)
chat_2.connection_status.wait_for_invisibility_of_element(30)
chat_2.connection_status.wait_for_invisibility_of_element(60)
message_2 = 'one more message'
chat_2.chat_message_input.send_keys(message_2)
chat_2.send_message_button.click()

View File

@ -49,6 +49,14 @@ wallet_users['E']['address'] = "0x3e2e4077753d3c229a9ae332b9ca46958945e2f6"
wallet_users['E']['public_key'] = "0x044cf0620ec3ea0aba9fb0e19cb42a6fbd6b4e74f234f0da82580564817b238cc6434745d31" \
"fa1649927ba48adfa7c95991fd51940bc00a71e80b095db5b107f1b"
wallet_users['F'] = dict()
wallet_users['F']['passphrase'] = "jazz human replace save wreck merry evolve oval black expose clutch sword"
wallet_users['F']['username'] = "Dual Sour Galapagostortoise"
wallet_users['F']['address'] = "0x8A4339aE98df2B2e51E37631C8B4F853048D4556"
wallet_users['F']['public_key'] = "0x049d0b39d95b20114fac79c3173a36c60a126c060dce52bba4128ab9a3885f0f058f2af9c92099" \
"315eb564412b718d8bfe697a4425e4bc603063abd4f5c45f8e57"
# Users used in chats. E.g. as members of a group chat
chat_users = dict()

View File

@ -3,6 +3,7 @@ from views.base_view import BaseView
from views.home_view import ChatElement
class OpenDAppButton(BaseButton):
def __init__(self, driver):
super(OpenDAppButton, self).__init__(driver)
@ -30,26 +31,31 @@ class BrowserEntry(ChatElement):
super(BrowserEntry, self).__init__(driver, name)
self.locator = self.Locator.xpath_selector('//*[@text="%s"]/..' % name)
class EnsName(BaseEditBox):
def __init__(self, driver):
super(EnsName, self).__init__(driver)
self.locator = self.Locator.xpath_selector('//android.widget.EditText')
class EnsCheckName(BaseButton):
def __init__(self, driver):
super(EnsCheckName, self).__init__(driver)
self.locator = self.Locator.xpath_selector('//android.widget.EditText//following-sibling::android.view.ViewGroup[1]')
class RemoveDappButton(BaseButton):
def __init__(self, driver):
super(RemoveDappButton, self).__init__(driver)
self.locator = self.Locator.accessibility_id('remove-dapp-from-list')
class ClearAllDappButton(BaseButton):
def __init__(self, driver):
super(ClearAllDappButton, self).__init__(driver)
self.locator = self.Locator.accessibility_id('clear-all-dapps')
class DappsView(BaseView):
def __init__(self, driver):

View File

@ -171,6 +171,27 @@ 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 ViewInCryptoKittiesButton(BaseButton):
def __init__(self, driver):
super(ViewInCryptoKittiesButton, self).__init__(driver)
self.locator = self.Locator.accessibility_id('open-collectible-button')
def navigate(self):
from views.web_views.base_web_view import BaseWebView
return BaseWebView(self.driver)
def click(self):
self.wait_for_element(30).click()
self.driver.info('Tap on View in CryptoKitties')
return self.navigate()
class BackupRecoveryPhrase(BaseButton):
def __init__(self, driver):
super(BackupRecoveryPhrase, self).__init__(driver)
@ -330,6 +351,8 @@ 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.view_in_cryptokitties_button = ViewInCryptoKittiesButton(self.driver)
self.set_currency_button = SetCurrencyButton(self.driver)
self.add_account_button = AddAccountButton(self.driver)
self.add_an_account_button = AddAnAccountButton(self.driver)