mirror of
https://github.com/status-im/status-react.git
synced 2025-01-14 04:55:13 +00:00
eaf9d8dce4
Revert "added checkout step to Jenkinsfile" This reverts commit 22cd1fd0214e42767ae45d6ec8376109a52605ed. checkout to jenkinsfile
48 lines
1.6 KiB
Python
48 lines
1.6 KiB
Python
import pytest
|
|
from tests.basetestcase import MultiplyDeviceTestCase
|
|
from tests.preconditions import set_password_as_new_user
|
|
from views.home import HomeView
|
|
from views.base_view import ElementByName
|
|
|
|
|
|
@pytest.mark.sanity
|
|
class TestChats(MultiplyDeviceTestCase):
|
|
|
|
def test_one_to_one_chat(self):
|
|
|
|
device_1, device_2 = HomeView(self.driver_1), HomeView(self.driver_2)
|
|
set_password_as_new_user(device_1, device_2)
|
|
device_1.back_button.click()
|
|
|
|
chats_d1 = device_1.get_chats()
|
|
chats_d1.profile_button.click()
|
|
profile_d1 = chats_d1.profile_icon.click()
|
|
key = profile_d1.public_key_text.text
|
|
device_2.back_button.click()
|
|
|
|
chats_d2 = device_2.get_chats()
|
|
chats_d2.plus_button.click()
|
|
chats_d2.add_new_contact.click()
|
|
chats_d2.public_key_edit_box.send_keys(key)
|
|
chats_d2.confirm()
|
|
chats_d2.confirm_public_key_button.click()
|
|
|
|
message_1 = 'SOMETHING'
|
|
message_2 = 'another SOMETHING'
|
|
user_d1_name = chats_d2.user_name_text.text
|
|
|
|
chats_d2.chat_message_input.send_keys(message_1)
|
|
chats_d2.send_message_button.click()
|
|
|
|
chats_d1.back_button.click()
|
|
chats_d1.find_text(message_1)
|
|
|
|
one_to_one_chat_d2 = ElementByName(self.driver_2, user_d1_name)
|
|
one_to_one_chat_d2.click()
|
|
chats_d2.chat_message_input.send_keys(message_2)
|
|
chats_d2.send_message_button.click()
|
|
|
|
one_to_one_chat_d1 = ElementByName(self.driver_1, message_2)
|
|
one_to_one_chat_d1.click()
|
|
chats_d1.find_text(message_2)
|