Skip to content

Commit

Permalink
e2e: fixes 01.02
Browse files Browse the repository at this point in the history
  • Loading branch information
yevh-berdnyk committed Feb 1, 2024
1 parent 675897c commit 3f9cd3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions test/appium/tests/critical/chats/test_1_1_public_chats.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from tests import marks, run_in_parallel, transl
from tests.base_test_case import MultipleSharedDeviceTestCase, create_shared_drivers
from views.base_element import Button
from views.sign_in_view import SignInView


Expand Down Expand Up @@ -161,13 +162,15 @@ def test_1_1_chat_emoji_send_reply_and_open_link(self):

self.home_2.just_fyi("Check 'Open in Status' option")
# url_to_open = 'http://status.app'
url_to_open = 'https://www.ethereum.org/en/run-a-node/'
url_to_open = 'https://github.com/status-im/status-mobile'
self.chat_1.send_message(url_to_open)
chat_element = self.chat_2.chat_element_by_text(url_to_open)
if chat_element.is_element_displayed(120):
chat_element.click_on_link_inside_message_body()
web_view = self.chat_2.open_in_status_button.click()
if not web_view.element_by_text("Take full control. Run your own node.").is_element_displayed(60):
text_element = web_view.element_by_text("a free (libre) open source, mobile OS for Ethereum")
sign_in_button = Button(self.chat_2.driver, xpath="//android.view.View[@content-desc='Sign in']")
if not text_element.is_element_displayed(30) or not sign_in_button.is_element_displayed(30):
self.errors.append('URL was not opened from 1-1 chat')
else:
self.errors.append("Message with URL was not received")
Expand Down
8 changes: 4 additions & 4 deletions test/appium/tests/critical/chats/test_public_chat_browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,6 @@ def test_community_hashtag_links_to_community_channels(self):
self.errors.verify_no_errors()

@marks.testrail_id(703629)
@marks.xfail(
reason="Can't join a community if admin goes offline, https://github.com/status-im/status-mobile/issues/17678")
def test_community_join_when_node_owner_offline(self):
for home in self.homes:
home.navigate_back_to_home_view()
Expand Down Expand Up @@ -1143,7 +1141,8 @@ def test_community_join_when_node_owner_offline(self):
else:
self.errors.append("Community channel is not displayed for user before join")
self.community_2.toast_content_element.wait_for_invisibility_of_element(30)
self.community_2.close_community_view_button.click()
self.community_2.close_community_view_button.click_until_absense_of_element(
self.community_2.close_community_view_button)
self.home_2.pending_communities_tab.click()
if self.home_2.get_chat(community_name, community=True).is_element_displayed():
self.home_2.get_chat(community_name, community=True).click()
Expand All @@ -1166,7 +1165,8 @@ def test_community_join_when_node_owner_offline(self):
# ToDo: add verification when toast is fixed
if not self.community_2.community_status_joined.is_element_displayed():
self.errors.append("Joined status is not displayed")
self.community_2.close_community_view_button.click()
self.community_2.close_community_view_button.click_until_absense_of_element(
self.community_2.close_community_view_button)
self.home_2.joined_communities_tab.click()
chat_element = self.home_2.get_chat(community_name, community=True)
if chat_element.is_element_displayed(30):
Expand Down

0 comments on commit 3f9cd3a

Please sign in to comment.