@@ -574,8 +574,9 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
574574 def test_set_profile_picture (self ):
575575 self .create_drivers (2 )
576576 home_1 , home_2 = SignInView (self .drivers [0 ]).create_user (), SignInView (self .drivers [1 ]).create_user ()
577- profile_1 = home_1 .profile_button .click ()
578- public_key_1 = profile_1 .get_public_key_and_username ()
577+ profile_1 , profile_2 = home_1 .profile_button .click (), home_2 .profile_button .click ()
578+ public_key_1 , public_key_2 = profile_1 .get_public_key_and_username (), profile_2 .get_public_key_and_username ()
579+ profile_2 .home_button .click ()
579580
580581 profile_1 .just_fyi ("Set user Profile image from Gallery" )
581582 profile_1 .edit_profile_picture (file_name = 'sauce_logo.png' )
@@ -585,14 +586,18 @@ def test_set_profile_picture(self):
585586 if not profile_1 .profile_picture .is_element_image_similar_to_template ('sauce_logo_profile.png' ):
586587 self .drivers [0 ].fail ('Profile picture was not updated' )
587588
589+ profile_1 .just_fyi ("Add user2 to contacts" )
590+ profile_1 .home_button .click ()
591+ home_1 .add_contact (public_key_2 )
592+ home_1 .home_button .click ()
593+
588594 profile_1 .just_fyi ("Check user profile updated in chat" )
589- home = profile_1 .home_button .click ()
590595 message = "Text message"
591- public_chat_name = home .get_random_chat_name ()
596+ public_chat_name = home_1 .get_random_chat_name ()
592597 home_2 .add_contact (public_key = public_key_1 )
593598 home_2 .home_button .click ()
594599 public_chat_2 = home_2 .join_public_chat (public_chat_name )
595- public_chat_1 = home .join_public_chat (public_chat_name )
600+ public_chat_1 = home_1 .join_public_chat (public_chat_name )
596601 public_chat_1 .chat_message_input .send_keys (message )
597602 public_chat_1 .send_message_button .click ()
598603 if not public_chat_2 .chat_element_by_text (message ).member_photo .is_element_image_similar_to_template ('sauce_logo.png' ):
@@ -613,8 +618,13 @@ def test_set_profile_picture(self):
613618 def test_show_profile_picture_of_setting (self ):
614619 self .create_drivers (2 )
615620 home_1 , home_2 = SignInView (self .drivers [0 ]).create_user (), SignInView (self .drivers [1 ]).create_user ()
616- profile_1 = home_1 .profile_button .click ()
621+ profile_1 , profile_2 = home_1 . profile_button . click (), home_2 .profile_button .click ()
617622 public_key_1 , default_username_1 = profile_1 .get_public_key_and_username (return_username = True )
623+ public_key_2 = profile_2 .get_public_key_and_username ()
624+
625+ [profile .home_button .click () for profile in (profile_1 , profile_2 )]
626+ home_1 .add_contact (public_key_2 )
627+ home_1 .profile_button .click ()
618628
619629 profile_1 .just_fyi ("Set user Profile image from Gallery" )
620630 profile_1 .edit_profile_picture (file_name = 'sauce_logo.png' )
@@ -654,11 +664,11 @@ def test_show_profile_picture_of_setting(self):
654664 if not home_2 .get_chat (default_username_1 ).chat_image .is_element_image_similar_to_template ('sauce_logo.png' ):
655665 self .errors .append ('User profile picture was not updated on Chats view' )
656666
657- profile_1 .just_fyi ('Check profile image updated in user profile view in Group chat views 4 ' )
658- group_chat_message = 'Trololo'
667+ profile_1 .just_fyi ('Check profile image updated in user profile view in Group chat views' )
668+ group_chat_name , group_chat_message = 'new_group_chat' , 'Trololo'
659669 group_chat_2 = home_2 .create_group_chat (user_names_to_add = [default_username_1 ])
660670 group_chat_2 .send_message ('Message' )
661- group_chat_1 = home_1 .get_chat ('new_group_chat' ).click ()
671+ group_chat_1 = home_1 .get_chat (group_chat_name ).click ()
662672 group_chat_1 .join_chat_button .click ()
663673 group_chat_1 .send_message (group_chat_message )
664674 if not group_chat_2 .chat_element_by_text (group_chat_message ).member_photo .is_element_image_similar_to_template ('sauce_logo.png' ):
@@ -691,9 +701,9 @@ def test_show_profile_picture_of_setting(self):
691701
692702 profile_2 .just_fyi ('Enable to see profile image from "Everyone" setting' )
693703 home_2 .profile_button .click ()
694- profile_2 .appearance_button .click ()
695- profile_2 .show_profile_pictures_of .click ()
696- profile_2 .element_by_text ( 'Everyone' ).click ()
704+ profile_2 .privacy_and_security_button .click ()
705+ profile_2 .show_profile_pictures_of .scroll_and_click ()
706+ profile_2 .element_by_translation_id ( "everyone" ).click ()
697707 group_chat_1 .send_message (group_chat_message )
698708 profile_2 .home_button .click (desired_view = 'home' )
699709 if not home_2 .get_chat (default_username_1 ).chat_image .is_element_image_similar_to_template ('sauce_logo.png' ):
@@ -715,13 +725,14 @@ def test_custom_bootnodes(self):
715725 profile_1 .bootnodes_button .click ()
716726 profile_1 .add_bootnode_button .click ()
717727 profile_1 .specify_name_input .set_value ('test' )
718- profile_1 .bootnode_address_input .set_value ('invalid_bootnode_address' )
719- if not profile_1 .element_by_text_part ('Invalid format' ).is_element_displayed ():
720- self .errors .append ('Validation message about invalid format of bootnode is not shown' )
721- profile_1 .save_button .click ()
722- if profile_1 .add_bootnode_button .is_element_displayed ():
723- self .errors .append ('User was navigated to another screen when tapped on disabled "Save" button' )
724- profile_1 .bootnode_address_input .clear ()
728+ # TODO: blocked as validation is missing for bootnodes
729+ # profile_1.bootnode_address_input.set_value('invalid_bootnode_address')
730+ # if not profile_1.element_by_text_part('Invalid format').is_element_displayed():
731+ # self.errors.append('Validation message about invalid format of bootnode is not shown')
732+ # profile_1.save_button.click()
733+ # if profile_1.add_bootnode_button.is_element_displayed():
734+ # self.errors.append('User was navigated to another screen when tapped on disabled "Save" button')
735+ # profile_1.bootnode_address_input.clear()
725736 profile_1 .bootnode_address_input .set_value (bootnode_address )
726737 profile_1 .save_button .click ()
727738 profile_1 .enable_bootnodes .click ()
0 commit comments