small fixes

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2020-06-09 16:44:44 +02:00
parent 197ce2eb60
commit 0603f84ab8
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
4 changed files with 4 additions and 22 deletions

View File

@ -121,9 +121,6 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
send_message = chat_1_sender_message.sign_and_send.click()
send_message.next_button.click()
send_message.sign_transaction()
if chat_1_sender_message.transaction_status.text != 'Pending':
self.errors.append('Wrong state is shown for outgoing transaction: "Pending" is expected, in fact'
' %s ' % chat_1_sender_message.transaction_status.text)
updated_timestamp_sender = chat_1_sender_message.timestamp_message.text
if updated_timestamp_sender == timestamp_sender:
self.errors.append("Timestamp of message is not updated after signing transaction")

View File

@ -298,20 +298,6 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
self.errors.append('Device 1: URL was not opened from 1-1 chat')
self.errors.verify_no_errors()
@marks.testrail_id(5374)
@marks.high
def test_message_marked_as_sent_in_1_1_chat(self):
self.create_drivers(1)
sign_in_view = SignInView(self.drivers[0])
home_view = sign_in_view.create_user()
chat_view = home_view.add_contact(basic_user['public_key'])
message = 'test message'
chat_view.chat_message_input.send_keys(message)
chat_view.send_message_button.click()
if chat_view.chat_element_by_text(message).status.text != 'Sent':
self.errors.append("'Sent' status is not shown under the sent text message")
self.errors.verify_no_errors()
@marks.testrail_id(5362)
@marks.medium
def test_unread_messages_counter_1_1_chat(self):

View File

@ -164,13 +164,13 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
chat_1.chat_message_input.send_keys(emoji.emojize(emoji_name))
chat_1.send_message_button.click()
chat_1.chat_element_by_text(emoji_unicode).long_press_element()
chat_1.element_by_text_part(emoji_unicode).long_press_element()
chat_1.element_by_text('Copy').click()
chat_1.chat_message_input.paste_text_from_clipboard()
if chat_1.chat_message_input.text != emoji_unicode:
self.errors.append('Emoji message was not copied')
chat_element_2 = chat_2.chat_element_by_text(emoji_unicode)
chat_element_2 = chat_2.element_by_text_part(emoji_unicode)
if not chat_element_2.is_element_displayed(sec=10):
self.errors.append('Message with emoji was not received in public chat by the recipient')

View File

@ -311,8 +311,7 @@ class ChatElementByText(BaseText):
class StatusText(BaseText):
def __init__(self, driver, parent_locator: str):
super(StatusText, self).__init__(driver)
text = "//android.widget.TextView[@text='Seen' or @text='Sent' or " \
"@text='Not sent. Tap for options' or @text='Network mismatch']"
text = "//android.widget.TextView[@text='Not sent. Tap for options']"
self.locator = self.Locator.xpath_selector(parent_locator + text)
return StatusText(self.driver, self.locator.value).wait_for_element(10)
@ -670,7 +669,7 @@ class ChatView(BaseView):
self.send_message_button.click()
def quote_message(self, message = str):
self.chat_element_by_text(message).long_press_element()
self.element_by_text_part(message).long_press_element()
self.reply_message_button.click()
def view_profile_long_press(self, message = str):