Skip to content

Commit

Permalink
more checks
Browse files Browse the repository at this point in the history
  • Loading branch information
churik committed Apr 23, 2020
1 parent af9d91f commit 67563d8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
5 changes: 5 additions & 0 deletions test/appium/tests/atomic/account_management/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ def test_can_add_existing_ens(self):
self.errors.append('No ENS name is shown in own profile after adding')
if not dapp_view.element_by_text('%s.stateofus.eth' % ens_user['ens']).is_element_displayed():
self.errors.append('No ENS name is shown in own profile after adding')
profile.share_my_profile_button.click()
if profile.ens_name_in_share_chat_key_text.text != '%s.stateofus.eth' % ens_user['ens']:
self.errors.append('No ENS name is shown on tapping on share icon in Profile')
profile.close_share_popup()

self.errors.verify_no_errors()

@marks.testrail_id(5475)
Expand Down
7 changes: 7 additions & 0 deletions test/appium/tests/atomic/chats/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ def test_network_mismatch_for_send_request_in_1_1_chat(self):
request_transaction.request_transaction_button.click()
chat_2_request_message = chat_2.chat_element_by_text('↓ Incoming transaction')

chat_2_request_message.long_press_element()
if chat_2.reply_message_button.is_element_displayed():
self.errors.append('Reply is available on long-tap on Incoming transaction message!')

chat_1 = home_1.get_chat(device_2_username).click()
chat_1_sender_message = chat_1.chat_element_by_text('↑ Outgoing transaction')
chat_1_sender_message.long_press_element()
if chat_1.reply_message_button.is_element_displayed():
self.errors.append('Reply is available on long-tap on Outgoing transaction message!')
send_message = chat_1_sender_message.sign_and_send.click()
send_message.next_button.click()
send_message.sign_transaction()
Expand Down
5 changes: 5 additions & 0 deletions test/appium/tests/atomic/transactions/test_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ def test_send_eth_from_wallet_to_address(self):
send_transaction.confirm()
send_transaction.chose_recipient_button.click()
send_transaction.enter_recipient_address_button.click()
send_transaction.enter_recipient_address_input.set_value('0xDE709F2102306220921060314715629080E2fB77')
send_transaction.done_button.click()
if not send_transaction.element_by_text_part('Invalid address').is_element_displayed():
self.errors.append('Invalid EIP55 address is resolved correctly')
send_transaction.ok_button.click()
send_transaction.enter_recipient_address_input.set_value(recipient['address'])
send_transaction.done_button.click()
send_transaction.sign_transaction_button.click()
Expand Down
7 changes: 5 additions & 2 deletions test/appium/views/base_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,11 @@ def navigate(self):
return ProfileView(self.driver)

def click(self):
self.driver.info('Tap on %s' % self.name)
self.find_element().click()
from views.profile_view import PrivacyAndSecurityButton
try:
self.click_until_presence_of_element(PrivacyAndSecurityButton(self.driver))
except NoSuchElementException:
pass
return self.navigate()


Expand Down
9 changes: 8 additions & 1 deletion test/appium/views/profile_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ def __init__(self, driver):
self.locator = self.Locator.accessibility_id('share-my-contact-code-button')


class ENSUsernameInShareChatKeyPopup(BaseText):

def __init__(self, driver):
super(ENSUsernameInShareChatKeyPopup, self).__init__(driver)
self.locator = self.Locator.accessibility_id('ens-username')


class AdvancedButton(BaseButton):

def __init__(self, driver):
Expand Down Expand Up @@ -546,7 +553,6 @@ def __init__(self, driver):
"//*[@content-desc='chat-icon']/../android.widget.TextView[2]")



class ProfileView(BaseView):

def __init__(self, driver):
Expand Down Expand Up @@ -635,6 +641,7 @@ def __init__(self, driver):
# ENS
self.username_in_ens_chat_settings_text = ENSUsernameInChatSettings(self.driver)
self.ens_usernames_button = ENSusernames(self.driver)
self.ens_name_in_share_chat_key_text = ENSUsernameInShareChatKeyPopup(self.driver)

# Mobile Data
self.use_mobile_data = UseMobileDataToggle(self.driver)
Expand Down

0 comments on commit 67563d8

Please sign in to comment.