Fix invite friends test

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Serhy 2019-11-20 18:27:29 +02:00
parent 5ecc7590d9
commit 84325fc528
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
6 changed files with 20 additions and 7 deletions

View File

@ -45,7 +45,7 @@
[list-item/list-item
{:theme :action
:title :t/invite-friends
:accessibility-label :invite-friends-button
:accessibility-label :chats-menu-invite-friends-button
:icon :main-icons/share
:on-press #(do
(re-frame/dispatch [:bottom-sheet/hide-sheet])

View File

@ -290,10 +290,15 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
def test_invite_friends(self):
sign_in_view = SignInView(self.driver)
home = sign_in_view.create_user()
home.plus_button.click()
home.invite_friends_button.click()
home.share_via_messenger()
home.find_text_part("Get Status at http://status.im")
home.click_system_back_button(2)
home.plus_button.click()
home.chats_menu_invite_friends_button.click()
home.share_via_messenger()
home.find_text_part("Get Status at http://status.im")
@marks.testrail_id(5431)
@marks.medium

View File

@ -55,7 +55,7 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(5384)
@marks.critical
def test_open_transaction_on_etherscan(self):
user = wallet_users['A']
user = wallet_users['D']
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.recover_access(user['passphrase'])
wallet_view = home_view.wallet_button.click()
@ -73,7 +73,7 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(5427)
@marks.medium
def test_copy_transaction_hash(self):
user = wallet_users['A']
user = wallet_users['D']
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.recover_access(user['passphrase'])
wallet_view = home_view.wallet_button.click()

View File

@ -545,7 +545,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
message_input.paste_text_from_clipboard()
chat.send_message_button.click()
chat.chat_element_by_text(message_text[:-2] + ' ').wait_for_visibility_of_element(2)
chat.chat_element_by_text(message_text[:-2]).wait_for_visibility_of_element(2)
@marks.testrail_id(5328)
@marks.critical

View File

@ -396,9 +396,10 @@ class BaseView(object):
self.driver.info('=========================================================================')
self.driver.info(string)
def click_system_back_button(self):
def click_system_back_button(self, times=1):
self.driver.info('Click system back button')
self.driver.press_keycode(4)
for _ in range(times):
self.driver.press_keycode(4)
def cut_text(self):
self.driver.info('Cut text')

View File

@ -60,6 +60,12 @@ class InviteFriendsButton(BaseButton):
self.locator = self.Locator.accessibility_id('invite-friends-button')
class ChatsMenuInviteFriendsButton(BaseButton):
def __init__(self, driver):
super(ChatsMenuInviteFriendsButton, self).__init__(driver)
self.locator = self.Locator.accessibility_id('chats-menu-invite-friends-button')
class ChatElement(BaseButton):
def __init__(self, driver, username_part):
super(ChatElement, self).__init__(driver)
@ -145,6 +151,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.chats_menu_invite_friends_button = ChatsMenuInviteFriendsButton(self.driver)
self.delete_chat_button = DeleteChatButton(self.driver)
def wait_for_syncing_complete(self):