align e2e with 8210

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2019-05-20 14:16:15 +02:00
parent 4f8399a8fd
commit d49a8dd5e5
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
2 changed files with 15 additions and 4 deletions

View File

@ -29,14 +29,14 @@ class TestChatManagement(SingleDeviceTestCase):
@marks.testrail_id(5319)
@marks.critical
def test_swipe_to_delete_1_1_chat(self):
def test_long_press_to_delete_1_1_chat(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat = home.add_contact(basic_user['public_key'])
chat.chat_message_input.send_keys('test message')
chat.send_message_button.click()
chat.get_back_to_home_view()
home.get_chat_with_user(basic_user['username']).swipe_and_delete()
home.delete_chat_long_press(basic_user['username'])
self.driver.close_app()
self.driver.launch_app()
sign_in.accept_agreements()
@ -46,7 +46,7 @@ class TestChatManagement(SingleDeviceTestCase):
@marks.testrail_id(5343)
@marks.critical
def test_swipe_to_delete_public_chat(self):
def test_long_press_to_delete_public_chat(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat_name = home.get_public_chat_name()
@ -55,7 +55,7 @@ class TestChatManagement(SingleDeviceTestCase):
chat.chat_message_input.send_keys(message)
chat.send_message_button.click()
chat.get_back_to_home_view()
home.get_chat_with_user('#' + chat_name).swipe_and_delete()
home.delete_chat_long_press('#' + chat_name)
profile = home.profile_button.click()
profile.logout()
sign_in.sign_in()

View File

@ -15,6 +15,11 @@ class PlusButton(BaseButton):
super(PlusButton, self).__init__(driver)
self.locator = self.Locator.accessibility_id("new-chat-button")
class DeleteChatButton(BaseButton):
def __init__(self, driver):
super(DeleteChatButton, self).__init__(driver)
self.locator = self.Locator.accessibility_id("delete-chat-button")
class StartNewChatButton(BaseButton):
def __init__(self, driver):
@ -145,6 +150,7 @@ class HomeView(BaseView):
self.new_group_chat_button = NewGroupChatButton(self.driver)
self.join_public_chat_button = JoinPublicChatButton(self.driver)
self.invite_friends_button = InviteFriendsButton(self.driver)
self.delete_chat_button = DeleteChatButton(self.driver)
def wait_for_syncing_complete(self):
self.driver.info('Waiting for syncing complete:')
@ -208,3 +214,8 @@ class HomeView(BaseView):
else:
status_test_dapp.deny_button.click()
return status_test_dapp
def delete_chat_long_press(self, username):
self.get_chat_with_user(username).long_press_element()
self.delete_chat_button.click()
self.delete_button.click()