e2e: tests fixes
This commit is contained in:
parent
bec51b7d0e
commit
734abc221c
|
@ -92,8 +92,6 @@ class TestActivityCenterContactRequestMultipleDevicePR(MultipleSharedDeviceTestC
|
|||
@marks.testrail_id(702851)
|
||||
def test_activity_center_contact_request_accept_swipe_mark_all_as_read(self):
|
||||
self.device_2.just_fyi('Creating a new user on Device2')
|
||||
# self.home_2.navigate_back_to_home_view()
|
||||
# self.home_2.profile_button.click()
|
||||
self.home_2.reopen_app(sign_in=False)
|
||||
new_username = "new user"
|
||||
self.device_2.create_user(username=new_username, first_user=False)
|
||||
|
@ -153,10 +151,22 @@ class TestActivityCenterContactRequestMultipleDevicePR(MultipleSharedDeviceTestC
|
|||
self.username_2, self.profile_link_2, decoded_username))
|
||||
public_key_2 = self.profile_link_2.split("#")[-1]
|
||||
|
||||
self.home_1.just_fyi("Device 1 creates a new user")
|
||||
self.profile_1.driver.reset()
|
||||
new_username_1 = "test user 123"
|
||||
self.device_1.create_user(username=new_username_1)
|
||||
|
||||
def _device_1_creates_user():
|
||||
self.home_1.just_fyi("Device 1 creates a new user")
|
||||
self.profile_1.driver.reset()
|
||||
self.device_1.create_user(username=new_username_1)
|
||||
|
||||
def _device_2_sign_in():
|
||||
self.home_2.just_fyi("Device 2 sign in, user name is " + self.username_2)
|
||||
self.home_2.reopen_app(sign_in=False)
|
||||
self.device_2.show_profiles_button.wait_and_click()
|
||||
self.device_2.get_user(username=self.username_2).click()
|
||||
self.device_2.sign_in()
|
||||
|
||||
self.loop.run_until_complete(run_in_parallel(((_device_1_creates_user, {}),
|
||||
(_device_2_sign_in, {}))))
|
||||
|
||||
self.device_1.just_fyi('Device1 sends a contact request to Device2 using his profile link')
|
||||
self.home_1.chats_tab.click()
|
||||
|
|
|
@ -282,7 +282,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
|||
messages = ['hello', '¿Cómo estás tu año?', 'ё, доброго вечерочка', '® æ ç ♥']
|
||||
for message in messages:
|
||||
self.chat_2.send_message(message)
|
||||
if not self.chat_1.chat_element_by_text(message).is_element_displayed(10):
|
||||
if not self.chat_1.chat_element_by_text(message).is_element_displayed(30):
|
||||
self.errors.append("Message with text '%s' was not received" % message)
|
||||
|
||||
self.chat_2.just_fyi("Checking updated member photo, timestamp and username on message")
|
||||
|
@ -348,9 +348,9 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
|
|||
chat_2.send_message(emoji.emojize(emoji_message))
|
||||
|
||||
self.device_1.just_fyi("Device 1 checks PN with emoji")
|
||||
if not self.device_1.element_by_text_part(emoji_unicode).is_element_displayed(60):
|
||||
if not self.device_1.element_by_text_part(emoji_unicode).is_element_displayed(120):
|
||||
self.device_1.click_system_back_button()
|
||||
self.device_2.driver.activate_app(app_package)
|
||||
self.device_1.driver.activate_app(app_package)
|
||||
self.device_1.driver.fail("Push notification with emoji was not received")
|
||||
chat_1 = self.device_1.click_upon_push_notification_by_text(emoji_unicode)
|
||||
|
||||
|
|
|
@ -682,6 +682,8 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
|||
profile_1 = self.home_1.get_profile_view()
|
||||
self.home_1.navigate_back_to_home_view()
|
||||
self.chat_1.profile_button.click()
|
||||
profile_1.logout_button.scroll_to_element()
|
||||
profile_1.profile_legacy_button.click()
|
||||
profile_1.contacts_button.wait_and_click()
|
||||
profile_1.blocked_users_button.wait_and_click()
|
||||
profile_1.element_by_text(self.username_2).click()
|
||||
|
@ -773,8 +775,8 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
|||
self.community_1.get_channel(self.channel_name).click()
|
||||
self.channel_1.just_fyi("Receiver is checking if initial messages were delivered")
|
||||
for message in message_to_edit, message_to_delete:
|
||||
if not self.channel_2.chat_element_by_text(message).is_element_displayed(30):
|
||||
self.channel_2.driver.fail("Message '%s' was not received")
|
||||
if not self.channel_1.chat_element_by_text(message).is_element_displayed(30):
|
||||
self.channel_1.driver.fail("Message '%s' was not received")
|
||||
|
||||
self.channel_2.just_fyi("Turning on airplane mode and editing/deleting messages")
|
||||
self.channel_2.driver.set_network_connection(ConnectionType.AIRPLANE_MODE)
|
||||
|
|
|
@ -1083,7 +1083,7 @@ class ChatView(BaseView):
|
|||
self.driver.info("Adding one more '%s' reaction or removing an added one" % emoji)
|
||||
key = emojis[emoji]
|
||||
element = Button(self.driver, accessibility_id='emoji-reaction-%s' % key)
|
||||
element.click()
|
||||
element.wait_and_click()
|
||||
|
||||
def view_profile_long_press(self, message=str):
|
||||
self.chat_element_by_text(message).long_press_element()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
seed = 'staff actress trash route grab crime leaf uniform dizzy reform issue keep'
|
||||
display_name = 'End to end'
|
||||
communities = {
|
||||
'admin_open': 'Open-comm-adm',
|
||||
'admin_open': 'open community',
|
||||
'member_open': 'e2e_open',
|
||||
'admin_closed': 'closed community',
|
||||
'member_closed': 'test_comm_enc',
|
||||
|
@ -10,5 +10,5 @@ communities = {
|
|||
|
||||
# contacts = ['Test_contact', 'MyCustomNickname'] # enable back when https://github.com/status-im/status-mobile/issues/15500 is fixed
|
||||
|
||||
contacts = ['zQ3...pJN5P', 'zQ3...UxXqE']
|
||||
contacts = ['zQ3...dWXh5', 'zQ3...Vacac']
|
||||
blocked_user = 'Clear Flat Milkweedbug'
|
||||
|
|
|
@ -285,20 +285,11 @@ class SignInView(BaseView):
|
|||
self.driver.info("## Multiaccount is recovered successfully!", device=False)
|
||||
return self.get_home_view()
|
||||
|
||||
def sign_in(self, password=common_password, keycard=False, position=1):
|
||||
self.driver.info("## Sign in (password:%s, keycard:%s)" % (password, str(keycard)), device=False)
|
||||
|
||||
if keycard:
|
||||
from views.keycard_view import KeycardView
|
||||
keycard_view = KeycardView(self.driver)
|
||||
keycard_view.one_button.wait_for_visibility_of_element(10)
|
||||
keycard_view.enter_default_pin()
|
||||
if keycard_view.connect_selected_card_button.is_element_displayed():
|
||||
keycard_view.connect_selected_card_button.click()
|
||||
else:
|
||||
self.password_input.wait_for_visibility_of_element(10)
|
||||
self.password_input.send_keys(password)
|
||||
self.login_button.click()
|
||||
def sign_in(self, password=common_password):
|
||||
self.driver.info("## Sign in (password: %s)" % password, device=False)
|
||||
self.password_input.wait_for_visibility_of_element(10)
|
||||
self.password_input.send_keys(password)
|
||||
self.login_button.click()
|
||||
self.driver.info("## Signed in successfully!", device=False)
|
||||
return self.get_home_view()
|
||||
|
||||
|
|
Loading…
Reference in New Issue