Small fix for new user profile

Signed-off-by: yenda <eric@status.im>
This commit is contained in:
Churikova Tetiana 2019-09-19 11:25:16 +02:00 committed by yenda
parent 8ccc858d41
commit f7c7a10258
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
2 changed files with 9 additions and 3 deletions

View File

@ -223,8 +223,8 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
if not element.scroll_to_element():
self.errors.append('%s is not visible' % element.name)
chat_1.add_to_contacts.click()
if not chat_1.element_by_text('In contacts').is_element_displayed():
self.errors.append("'Add to contacts' is not changed to 'In contacts'")
if not chat_1.remove_from_contacts.is_element_displayed():
self.errors.append("'Add to contacts' is not changed to 'Remove from contacts'")
chat_1.get_back_to_home_view()
home_1.plus_button.click()

View File

@ -19,6 +19,11 @@ class AddToContacts(BaseButton):
super(AddToContacts, self).__init__(driver)
self.locator = self.Locator.accessibility_id('add-to-contacts-button')
class RemoveFromContactsButton(BaseButton):
def __init__(self, driver):
super(RemoveFromContactsButton, self).__init__(driver)
self.locator = self.Locator.accessibility_id('in-contacts-button')
class AddGroupChatMembersButton(BaseButton):
def __init__(self, driver):
@ -120,7 +125,7 @@ class ClearButton(BaseButton):
class BlockButton(BaseButton):
def __init__(self, driver):
super(BlockButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector('//*[@text="BLOCK"]')
self.locator = self.Locator.accessibility_id('block-contact')
class LeaveButton(BaseButton):
@ -365,6 +370,7 @@ class ChatView(BaseView):
self.chat_message_input = ChatMessageInput(self.driver)
self.add_to_contacts = AddToContacts(self.driver)
self.remove_from_contacts = RemoveFromContactsButton(self.driver)
self.user_name_text = UserNameText(self.driver)
self.no_messages_in_chat = NoMessagesInChatText(self.driver)
self.empty_public_chat_message = EmptyPublicChatMessage(self.driver)