mirror of
https://github.com/status-im/status-react.git
synced 2025-01-22 16:59:40 +00:00
fetch_message and e2e fix
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
632bbf3bc1
commit
6c76cc866c
@ -164,6 +164,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
||||
sign_in_view.sign_in()
|
||||
profile_view = sign_in_view.profile_button.click()
|
||||
profile_view.advanced_button.click()
|
||||
profile_view.network_settings_button.scroll_to_element(10, 'up')
|
||||
profile_view.find_text_part('custom_ropsten')
|
||||
|
||||
@marks.logcat
|
||||
@ -258,8 +259,9 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
||||
profile = home_view.profile_button.click()
|
||||
profile.switch_network(network_name)
|
||||
profile = home_view.profile_button.click()
|
||||
profile.network_settings_button.scroll_to_element()
|
||||
if not profile.current_active_network == network_name:
|
||||
self.driver.fail('Oops! Wrong network selected!')
|
||||
self.driver.fail('Oops! Wrong network selected!')
|
||||
|
||||
@marks.testrail_id(5453)
|
||||
@marks.medium
|
||||
|
@ -4,6 +4,7 @@ from support.utilities import generate_timestamp
|
||||
from tests import marks
|
||||
from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase
|
||||
from views.sign_in_view import SignInView
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
|
||||
@marks.chat
|
||||
@ -179,3 +180,22 @@ class TestPublicChatSingleDevice(SingleDeviceTestCase):
|
||||
home = chat.get_back_to_home_view()
|
||||
if not home.chat_name_text.text == tag_message:
|
||||
self.driver.fail('Could not find the public chat in user chat list.')
|
||||
|
||||
@marks.testrail_id(6205)
|
||||
@marks.high
|
||||
def test_fetch_more_history_in_empty_chat(self):
|
||||
signin = SignInView(self.driver)
|
||||
yesterday = (datetime.today() - timedelta(days=1)).strftime("%b %-d, %Y")
|
||||
before_yesterday = (datetime.today() - timedelta(days=2)).strftime("%b %-d, %Y")
|
||||
quiet_time_yesterday, quiet_time_before_yesterday = '24 hours', '2 days'
|
||||
home_view = signin.create_user()
|
||||
chat = home_view.join_public_chat('montagne-angerufen-two')
|
||||
for message in (yesterday, quiet_time_yesterday):
|
||||
if not chat.element_by_text_part(message).is_element_displayed():
|
||||
self.driver.fail('"%s" is not shown' % message)
|
||||
chat.element_starts_with_text("↓ Fetch more messages").click()
|
||||
chat.wait_for_element_starts_with_text("↓ Fetch more messages", 30)
|
||||
for message in (before_yesterday, quiet_time_before_yesterday):
|
||||
if not chat.element_by_text_part(message).is_element_displayed():
|
||||
self.driver.fail('"%s" is not shown' % message)
|
||||
self.verify_no_errors()
|
@ -533,7 +533,7 @@ class ProfileView(BaseView):
|
||||
def switch_network(self, network):
|
||||
self.advanced_button.click()
|
||||
self.debug_mode_toggle.click()
|
||||
self.network_settings_button.scroll_to_element()
|
||||
self.network_settings_button.scroll_to_element(10, 'up')
|
||||
self.network_settings_button.click()
|
||||
network_button = NetworkSettingsButton.NetworkButton(self.driver, network)
|
||||
network_button.click()
|
||||
@ -649,5 +649,5 @@ class ProfileView(BaseView):
|
||||
@property
|
||||
def current_active_network(self):
|
||||
self.advanced_button.click()
|
||||
self.active_network_name.scroll_to_element()
|
||||
self.active_network_name.scroll_to_element(10, 'up')
|
||||
return self.active_network_name.text
|
||||
|
Loading…
x
Reference in New Issue
Block a user