mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-12 17:54:32 +00:00
fix e2e + disable e2e deep links
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
53883e4be1
commit
2f446a73bb
@ -314,7 +314,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
||||
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.click_system_back_button()
|
||||
home.plus_button.click()
|
||||
home.chats_menu_invite_friends_button.click()
|
||||
home.share_via_messenger()
|
||||
|
@ -16,7 +16,7 @@ class TestChatManagement(SingleDeviceTestCase):
|
||||
home = sign_in.create_user()
|
||||
chat = home.add_contact(basic_user['public_key'])
|
||||
|
||||
one_to_one, public, group = basic_user['username'], '#public', 'group'
|
||||
one_to_one, public, group = basic_user['username'], '#public-clear-options', 'group'
|
||||
message = 'test message'
|
||||
chat.get_back_to_home_view()
|
||||
|
||||
@ -56,7 +56,7 @@ class TestChatManagement(SingleDeviceTestCase):
|
||||
home = sign_in.create_user()
|
||||
chat = home.add_contact(basic_user['public_key'])
|
||||
|
||||
one_to_one, public, group = basic_user['username'], '#public', 'group'
|
||||
one_to_one, public, group = basic_user['username'], '#public-clear-long-press', 'group'
|
||||
message = 'test message'
|
||||
chat.get_back_to_home_view()
|
||||
|
||||
@ -95,7 +95,7 @@ class TestChatManagement(SingleDeviceTestCase):
|
||||
home = sign_in.create_user()
|
||||
chat = home.add_contact(basic_user['public_key'])
|
||||
|
||||
one_to_one, public, group = basic_user['username'], '#public', 'group'
|
||||
one_to_one, public, group = basic_user['username'], '#public-delete-long-press', 'group'
|
||||
chat.get_back_to_home_view()
|
||||
|
||||
home.create_group_chat([basic_user['username']], group)
|
||||
@ -147,7 +147,7 @@ class TestChatManagement(SingleDeviceTestCase):
|
||||
home = sign_in.create_user()
|
||||
chat = home.add_contact(basic_user['public_key'])
|
||||
|
||||
one_to_one, public, group = basic_user['username'], '#public', 'group'
|
||||
one_to_one, public, group = basic_user['username'], '#public-delete-options', 'group'
|
||||
chat.get_back_to_home_view()
|
||||
|
||||
home.create_group_chat([basic_user['username']], group)
|
||||
@ -363,16 +363,15 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
|
||||
# TODO: next line is added temporary to avoid navigation issue #7437 - should be deleted after fix
|
||||
home_1.profile_button.click()
|
||||
if profile_1.element_by_text(username).is_element_displayed():
|
||||
profile_1.driver.fail('List of contacts in profile contains removed user')
|
||||
self.errors.append('List of contacts in profile contains removed user')
|
||||
profile_1.home_button.click()
|
||||
if not chat_1.add_to_contacts.is_element_displayed():
|
||||
self.errors.append('"Add to contacts" button is not shown in 1-1 after removing user from contacts')
|
||||
home_1.get_back_to_home_view()
|
||||
home_1.plus_button.click()
|
||||
home_1.start_new_chat_button.click()
|
||||
if home_1.element_by_text(username).is_element_displayed():
|
||||
home_1.driver.fail('List of contacts below "Start new chat" contains removed user')
|
||||
|
||||
if home_1.get_username_below_start_new_chat_button(username).is_element_displayed():
|
||||
self.errors.append('List of contacts below "Start new chat" contains removed user')
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5786)
|
||||
|
@ -140,6 +140,7 @@ class TestBrowsing(SingleDeviceTestCase):
|
||||
home = sign_in.create_user()
|
||||
daap_view = home.dapp_tab_button.click()
|
||||
browsing_view = daap_view.open_url('dap.ps')
|
||||
browsing_view.wait_for_element_starts_with_text('View all', 30)
|
||||
browsing_view.element_by_text_part('View all', 'button').click()
|
||||
if browsing_view.element_by_text_part('View all').is_element_displayed(20):
|
||||
self.driver.fail("Failed to access Categories using ''View all'")
|
||||
|
@ -10,6 +10,8 @@ class TestDeepLinks(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(5396)
|
||||
@marks.high
|
||||
@marks.skip
|
||||
# TODO: skipped because universal links won't work in emulators regardless of OS version
|
||||
def test_open_public_chat_using_deep_link(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
sign_in_view.create_user()
|
||||
|
@ -676,7 +676,7 @@ class BaseView(object):
|
||||
|
||||
def open_universal_web_link(self, deep_link):
|
||||
start_web_browser(self.driver)
|
||||
self.search_in_google_edit_box.send_keys(deep_link)
|
||||
self.search_in_google_edit_box.set_value(deep_link)
|
||||
self.confirm()
|
||||
self.open_in_status_button.click()
|
||||
|
||||
|
@ -69,6 +69,12 @@ class ChatsMenuInviteFriendsButton(BaseButton):
|
||||
super(ChatsMenuInviteFriendsButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('chats-menu-invite-friends-button')
|
||||
|
||||
class UserNameBelowNewChatButton(BaseButton):
|
||||
def __init__(self, driver, username_part):
|
||||
super(UserNameBelowNewChatButton, self).__init__(driver)
|
||||
self.username = username_part
|
||||
self.locator = self.Locator.xpath_selector(
|
||||
"//*[@content-desc='enter-contact-code-input']/../..//*[starts-with(@text,'%s')]" % self.username)
|
||||
|
||||
class ChatElement(BaseButton):
|
||||
def __init__(self, driver, username_part):
|
||||
@ -179,6 +185,11 @@ class HomeView(BaseView):
|
||||
def get_chat(self, username):
|
||||
return ChatElement(self.driver, username[:25])
|
||||
|
||||
def get_username_below_start_new_chat_button(self, username_part):
|
||||
return UserNameBelowNewChatButton(self.driver, username_part)
|
||||
|
||||
|
||||
|
||||
def add_contact(self, public_key, add_in_contacts=True):
|
||||
self.plus_button.click_until_presence_of_element(self.start_new_chat_button)
|
||||
contacts_view = self.start_new_chat_button.click()
|
||||
|
Loading…
x
Reference in New Issue
Block a user