False failures fix
Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
parent
f0980ab7f7
commit
e6ad72039f
|
@ -1,4 +1,5 @@
|
|||
import pytest
|
||||
import time
|
||||
|
||||
from tests import marks, group_chat_users, basic_user, camera_access_error_text
|
||||
from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase
|
||||
|
@ -158,7 +159,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
|
|||
home_1, home_2 = device_1.create_user(), device_2.create_user()
|
||||
chat_name = 'testaddcontact'
|
||||
chat_1, chat_2 = home_1.join_public_chat(chat_name), home_2.join_public_chat(chat_name)
|
||||
message = 'test message'
|
||||
message = 'test message' + str(round(time.time()))
|
||||
|
||||
chat_2.chat_message_input.send_keys(message)
|
||||
chat_2.send_message_button.click()
|
||||
|
|
|
@ -429,7 +429,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
|
|||
error_text = send_transaction.element_by_text('Insufficient funds')
|
||||
if not error_text.is_element_displayed():
|
||||
self.errors.append("'Insufficient funds' error is now shown when sending 1 ETH from chat with balance 0")
|
||||
send_transaction.back_button.click()
|
||||
send_transaction.cross_icon.click()
|
||||
chat_view.commands_button.click()
|
||||
chat_view.send_command.click()
|
||||
chat_view.asset_by_name('STT').click()
|
||||
|
@ -463,7 +463,7 @@ class TestCommandsSingleDevices(SingleDeviceTestCase):
|
|||
self.errors.append(
|
||||
"'Insufficient funds' error is now shown when sending %s ETH from chat with balance %s" % (
|
||||
round(eth_value + 1), eth_value))
|
||||
send_transaction.back_button.click()
|
||||
send_transaction.cross_icon.click()
|
||||
chat_view.commands_button.click()
|
||||
chat_view.send_command.click()
|
||||
chat_view.asset_by_name('STT').scroll_to_element()
|
||||
|
|
|
@ -70,44 +70,6 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
|
|||
chat_1 = chat_element.click()
|
||||
chat_1.chat_element_by_text(message_2).wait_for_visibility_of_element(180)
|
||||
|
||||
@marks.smoke_1
|
||||
@marks.testrail_id(3701)
|
||||
def test_resend_message_offline(self):
|
||||
self.create_drivers(2, offline_mode=True)
|
||||
sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
|
||||
username_1 = 'user_%s' % get_current_time()
|
||||
home_1, home_2 = sign_in_1.create_user(username_1), sign_in_2.create_user()
|
||||
public_key_2 = home_2.get_public_key()
|
||||
home_2.home_button.click()
|
||||
|
||||
home_1.driver.set_network_connection(1) # airplane mode on primary device
|
||||
|
||||
chat_1 = home_1.add_contact(public_key_2)
|
||||
message = 'test message'
|
||||
chat_1.chat_message_input.send_keys(message)
|
||||
chat_1.send_message_button.click()
|
||||
progress_time = chat_1.chat_element_by_text(message).progress_bar.measure_time_while_element_is_shown()
|
||||
if not 5 < progress_time < 30:
|
||||
self.errors.append('Progress indicator is shown during %s seconds' % progress_time)
|
||||
|
||||
home_1.driver.set_network_connection(2) # turning on WiFi connection
|
||||
chat_1.element_by_text('Connecting to peers...').wait_for_invisibility_of_element(30)
|
||||
chat_1.element_by_text('Not sent. Tap for options').click()
|
||||
if not chat_1.element_by_text('Delete message').is_element_displayed():
|
||||
self.errors.append("'Delete message' button is not shown for not sent message")
|
||||
|
||||
chat_element = chat_1.chat_element_by_text(message)
|
||||
chat_1.element_by_text('Resend').click()
|
||||
chat_element.status.wait_for_visibility_of_element()
|
||||
if chat_element.status.text != 'Sent':
|
||||
self.errors.append("Message status is not 'Sent' after resending the message")
|
||||
|
||||
chat_2 = home_2.get_chat_with_user(username_1).click()
|
||||
if not chat_2.chat_element_by_text(message).is_element_displayed(10):
|
||||
self.errors.append("Message with text '%s' is not received" % message)
|
||||
|
||||
self.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(3710)
|
||||
@marks.smoke_1
|
||||
def test_messaging_in_different_networks(self):
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
@ -120,8 +120,7 @@ class HomeView(BaseView):
|
|||
|
||||
def add_contact(self, public_key):
|
||||
start_new_chat = self.plus_button.click()
|
||||
start_new_chat.start_new_chat_button.click()
|
||||
start_new_chat.public_key_edit_box.wait_for_visibility_of_element()
|
||||
start_new_chat.start_new_chat_button.click_until_presence_of_element(start_new_chat.public_key_edit_box)
|
||||
start_new_chat.public_key_edit_box.set_value(public_key)
|
||||
one_to_one_chat = self.get_chat_view()
|
||||
start_new_chat.confirm_until_presence_of_element(one_to_one_chat.chat_message_input)
|
||||
|
|
|
@ -108,7 +108,7 @@ class SignInView(BaseView):
|
|||
self.confirm_password_input.set_value(password)
|
||||
self.next_button.click()
|
||||
|
||||
self.element_by_text_part('Display name').wait_for_element(30)
|
||||
self.element_by_text_part('Display name').wait_for_element(60)
|
||||
username = username if username else 'user_%s' % get_current_time()
|
||||
self.name_input.set_value(username)
|
||||
self.confirm()
|
||||
|
|
|
@ -28,7 +28,7 @@ class BackToHomeButton(BaseButton):
|
|||
class BrowserPreviousPageButton(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(BrowserPreviousPageButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('previou-page-button')
|
||||
self.locator = self.Locator.accessibility_id('previous-page-button')
|
||||
|
||||
|
||||
class BrowserNextPageButton(BaseButton):
|
||||
|
|
Loading…
Reference in New Issue