Updated share public key accessibility ids
Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
parent
0caab1f7ce
commit
37c3f30d75
|
@ -30,7 +30,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
sign_in_view = SignInView(self.driver)
|
||||
sign_in_view.create_user()
|
||||
profile_view = sign_in_view.profile_button.click()
|
||||
profile_view.share_my_contact_key_button.click()
|
||||
profile_view.share_my_profile_button.click()
|
||||
public_key = profile_view.public_key_text.text
|
||||
profile_view.share_button.click()
|
||||
profile_view.share_via_messenger()
|
||||
|
@ -54,7 +54,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
sign_in_view = SignInView(self.driver)
|
||||
sign_in_view.create_user()
|
||||
profile_view = sign_in_view.profile_button.click()
|
||||
profile_view.share_my_contact_key_button.click()
|
||||
profile_view.share_my_profile_button.click()
|
||||
public_key = profile_view.public_key_text.text
|
||||
profile_view.public_key_text.long_press_element()
|
||||
profile_view.copy_text()
|
||||
|
|
|
@ -176,7 +176,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
|
|||
username = chat_element.username.text
|
||||
chat_element.member_photo.click()
|
||||
for element in [chat_1.contact_profile_picture, chat_1.add_to_contacts, chat_1.profile_send_message,
|
||||
chat_1.profile_send_transaction, chat_1.public_key_text,
|
||||
chat_1.profile_send_transaction, chat_1.profile_address_text,
|
||||
chat_1.element_by_text(username, 'text')]:
|
||||
if not element.is_element_displayed():
|
||||
self.errors.append('%s is not visible' % 'user name' if 'Base' in element.name else element.name)
|
||||
|
|
|
@ -133,8 +133,8 @@ class ProfileButton(TabButton):
|
|||
return ProfileView(self.driver)
|
||||
|
||||
def click(self):
|
||||
from views.profile_view import ShareMyContactKeyButton
|
||||
self.click_until_presence_of_element(ShareMyContactKeyButton(self.driver))
|
||||
from views.profile_view import ShareMyProfileButton
|
||||
self.click_until_presence_of_element(ShareMyProfileButton(self.driver))
|
||||
return self.navigate()
|
||||
|
||||
|
||||
|
@ -481,7 +481,7 @@ class BaseView(object):
|
|||
|
||||
def get_public_key(self):
|
||||
profile_view = self.profile_button.click()
|
||||
profile_view.share_my_contact_key_button.click()
|
||||
profile_view.share_my_profile_button.click()
|
||||
profile_view.public_key_text.wait_for_visibility_of_element()
|
||||
public_key = profile_view.public_key_text.text
|
||||
profile_view.cross_icon.click()
|
||||
|
|
|
@ -5,7 +5,7 @@ from selenium.common.exceptions import TimeoutException, NoSuchElementException
|
|||
from tests import common_password
|
||||
from views.base_element import BaseButton, BaseEditBox, BaseText
|
||||
from views.base_view import BaseView, ProgressBar
|
||||
from views.profile_view import ProfilePictureElement, PublicKeyText
|
||||
from views.profile_view import ProfilePictureElement, ProfileAddressText
|
||||
|
||||
|
||||
class ChatMessageInput(BaseEditBox):
|
||||
|
@ -279,7 +279,7 @@ class ChatView(BaseView):
|
|||
self.contact_profile_picture = ProfilePictureElement(self.driver)
|
||||
self.profile_send_message = ProfileSendMessageButton(self.driver)
|
||||
self.profile_send_transaction = ProfileSendTransactionButton(self.driver)
|
||||
self.public_key_text = PublicKeyText(self.driver)
|
||||
self.profile_address_text = ProfileAddressText(self.driver)
|
||||
|
||||
def wait_for_syncing_complete(self):
|
||||
self.driver.info('Waiting for syncing complete:')
|
||||
|
|
|
@ -10,6 +10,12 @@ class PublicKeyText(BaseText):
|
|||
super(PublicKeyText, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('address-text')
|
||||
|
||||
|
||||
class ProfileAddressText(BaseText):
|
||||
def __init__(self, driver):
|
||||
super(ProfileAddressText, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('profile-public-key')
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
text = self.scroll_to_element().text
|
||||
|
@ -17,13 +23,6 @@ class PublicKeyText(BaseText):
|
|||
return text
|
||||
|
||||
|
||||
class ProfileAddressText(BaseText):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(ProfileAddressText, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('profile-address')
|
||||
|
||||
|
||||
class OptionsButton(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
|
@ -109,11 +108,11 @@ class UserNameText(BaseText):
|
|||
'//android.widget.ImageView[@content-desc="chat-icon"]/../../android.widget.TextView')
|
||||
|
||||
|
||||
class ShareMyContactKeyButton(BaseButton):
|
||||
class ShareMyProfileButton(BaseButton):
|
||||
|
||||
def __init__(self, driver):
|
||||
super(ShareMyContactKeyButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('share-my-contact-code-button')
|
||||
super(ShareMyProfileButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('share-my-profile-button')
|
||||
|
||||
|
||||
class EditButton(BaseButton):
|
||||
|
@ -154,7 +153,7 @@ class ShareButton(BaseButton):
|
|||
|
||||
def __init__(self, driver):
|
||||
super(ShareButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('share-code-button')
|
||||
self.locator = self.Locator.accessibility_id('share-my-contact-code-button')
|
||||
|
||||
|
||||
class AdvancedButton(BaseButton):
|
||||
|
@ -419,7 +418,7 @@ class ProfileView(BaseView):
|
|||
self.main_currency_button = MainCurrencyButton(self.driver)
|
||||
|
||||
self.username_text = UserNameText(self.driver)
|
||||
self.share_my_contact_key_button = ShareMyContactKeyButton(self.driver)
|
||||
self.share_my_profile_button = ShareMyProfileButton(self.driver)
|
||||
self.edit_button = EditButton(self.driver)
|
||||
self.profile_picture = ProfilePictureElement(self.driver)
|
||||
self.edit_picture_button = EditPictureButton(self.driver)
|
||||
|
@ -480,10 +479,6 @@ class ProfileView(BaseView):
|
|||
self.connect_button.click()
|
||||
return self.get_sign_in_view()
|
||||
|
||||
def get_address(self):
|
||||
profile_view = self.profile_button.click()
|
||||
return profile_view.profile_address_text.text
|
||||
|
||||
def get_recovery_phrase(self):
|
||||
text = [i.text for i in self.recovery_phrase_table.find_elements()]
|
||||
return dict(zip(map(int, text[::2]), text[1::2]))
|
||||
|
|
Loading…
Reference in New Issue