示例#1
0
    def test_c15395(self):
        log.info(
            "Select '{}' images and send it to the group chat as files".format(
                str(self.SELECT_NUMBER)))
        menu = Menu(self.driver)
        gallery = GalleryScreen(self.driver)
        chat = ChatScreen(self.driver)
        profile = OtherProfileScreen(self.driver)
        storage = StorageScreen(self.driver)
        group_list = GroupListScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_group_chat(self.GROUP_NAME)
        chat.tap_open_profile()
        profile.open_storage()
        exist_images_in_chat = storage.get_sent_files_count()
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_group_chat(self.GROUP_NAME)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.MEDIA], menu.wenums.CHATS,
                   menu.wenums.GO_TO_GALLERY)
        gallery.tap_filter_photo()
        gallery.multiselect(self.SELECT_NUMBER)
        gallery.open_curtain()
        gallery.tap_send_as_file()
        chat.tap_open_profile()
        profile.open_storage()

        log.info("Verify '{}' files sent to the chat".format(
            str(self.SELECT_NUMBER)))
        actual = storage.get_sent_files_count(exist_images_in_chat)
        Verify.equals(self.SELECT_NUMBER, actual,
                      "Not all files sent to the chat")
示例#2
0
    def test_c8186(self):
        log.info("Select '{}' images and send it to the private chat".format(
            str(self.SELECT_NUMBER)))
        menu = Menu(self.driver)
        gallery = GalleryScreen(self.driver)
        chat = ChatScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        profile = OtherProfileScreen(self.driver)
        storage = StorageScreen(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND)
        chat.tap_open_profile()
        profile.open_storage()
        exist_images_in_chat = storage.get_count_images()
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.MEDIA], menu.wenums.CHATS,
                   menu.wenums.GO_TO_GALLERY)
        gallery.tap_filter_photo()
        gallery.multiselect(self.SELECT_NUMBER)
        gallery.tap_send_btn()
        chat.tap_open_profile()
        profile.open_storage()

        log.info("Verify '{}' images sent to the chat".format(
            str(self.SELECT_NUMBER)))
        actual = storage.get_count_images(exist_images_in_chat)
        Verify.equals(self.SELECT_NUMBER, actual,
                      "Not all images sent to the chat")
示例#3
0
    def test_c26923(self):
        log.info("Try leave group if user admin")
        menu = Menu(self.driver)
        group_list = GroupListScreen(self.driver)
        chat = ChatScreen(self.driver)
        options = GroupOptionScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_first_group()
        chat.tap_open_profile()
        options.delete_and_leave()

        log.info("Verify alert '{}' displayed".format(self.ALERT))
        Verify.true(options.error_verify(self.ALERT), "Alert doesn't displayed")
示例#4
0
    def test_c31(self):
        log.info("Block user: '******'".format(self.FULL_NAME))
        menu = Menu(self.driver)
        other_profile = OtherProfileScreen(self.driver)
        chat = ChatScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FULL_NAME)
        chat.tap_open_profile()
        other_profile.tap_block_user()
        other_profile.tap_accept_alert()
        other_profile.tap_send_message()

        log.info("Verify that user blocked")
        Verify.true(chat.unblock_btn(), "User not blocked")
示例#5
0
    def test_c2905(self):
        log.info("Clear group chat history")
        menu = Menu(self.driver)
        group_list = GroupListScreen(self.driver)
        chat = ChatScreen(self.driver)
        options = GroupOptionScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_first_group()
        chat.set_chat_msg(self.MESSAGE)
        chat.tap_send_btn()
        chat.tap_open_profile()
        options.clear_history()
        options.back_to_chat()

        log.info("Verify group chat history cleared")
        Verify.true(chat.is_history_removed(), "System message does't displayed or text message present")
示例#6
0
    def test_c2907(self):
        log.info("Update alias and check new alias on group options screen")
        menu = Menu(self.driver)
        group_list = GroupListScreen(self.driver)
        chat = ChatScreen(self.driver)
        options = GroupOptionScreen(self.driver)
        alias = AliasScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_first_group()
        chat.tap_open_profile()
        options.open_alias()
        alias.set_alias(self.ALIAS)

        log.info("Verify updated alias displayed on group options screen")
        Verify.true(options.verify_element(self.ALIAS),
                    "Alias doesn't update on screen")
示例#7
0
    def test_c2906(self):
        log.info("Edit group name")
        menu = Menu(self.driver)
        group_list = GroupListScreen(self.driver)
        chat = ChatScreen(self.driver)
        group = GroupScreen(self.driver)
        options = GroupOptionScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_first_group()
        chat.tap_open_profile()
        options.open_group_name()
        group.set_group_name(self.GROUP_NAME)
        group.tap_save()

        log.info("Verify group name updated")
        Verify.true(options.verify_element(self.GROUP_NAME),
                    "Group name doesn't updated")
示例#8
0
    def test_c2908(self):
        log.info("Go to other user profile from participant screen")
        menu = Menu(self.driver)
        group_list = GroupListScreen(self.driver)
        chat = ChatScreen(self.driver)
        participants = ParticipantsScreen(self.driver)
        profile = OtherProfileScreen(self.driver)
        options = GroupOptionScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_first_group()
        chat.tap_open_profile()
        options.open_group_participants()
        participants.open_participant()

        log.info("Verify other user profile displayed")
        Verify.true(profile.is_profile_displayed(),
                    "Other user profile doesn't displayed")
示例#9
0
    def test_c2903(self):
        log.info("Check updated alias displayed on admins screen")
        menu = Menu(self.driver)
        group_list = GroupListScreen(self.driver)
        chat = ChatScreen(self.driver)
        options = GroupOptionScreen(self.driver)
        alias = AliasScreen(self.driver)
        participants = ParticipantsScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_first_group()
        chat.tap_open_profile()
        options.open_alias()
        alias.set_alias(self.ALIAS)
        options.open_group_admins()

        log.info("Verify updated alias displayed on group admins screen")
        Verify.true(participants.is_participant_updated(self.ALIAS),
                    "Alias doesn't update on screen")
示例#10
0
    def test_c2385(self):
        log.info("Ser '{}' language for aoutgoing messages".format(
            self.LANGUAGE))
        menu = Menu(self.driver)
        chat = ChatScreen(self.driver)
        other_profile = OtherProfileScreen(self.driver)
        language = LanguageSettingsScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND_NAME)
        chat.tap_open_profile()
        other_profile.open_language_settings()
        language.is_language_screen()
        language.open_on_sending()
        language.tap_search_result(self.LANGUAGE)
        language.tap_back()
        other_profile.tap_send_message()

        log.info("Verify language curtain displayed")
        Verify.true(chat.is_curtain_display(),
                    "Language curtain is not displayed")
示例#11
0
    def test_c2386(self):
        log.info("Ser '{}' language for aoutgoing messages".format(
            self.LANGUAGE))
        menu = Menu(self.driver)
        chat = ChatScreen(self.driver)
        other_profile = OtherProfileScreen(self.driver)
        language = LanguageSettingsScreen(self.driver)
        group_list = GroupListScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_group_chat(self.GROUP_NAME)
        chat.tap_open_profile()
        other_profile.open_language_settings()
        language.is_language_screen()
        language.open_on_sending()
        language.tap_search_result(self.LANGUAGE)
        # TODO: Make scroll in group settings
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_group_chat(self.GROUP_NAME)

        log.info("Verify language curtain displayed")
        Verify.true(chat.is_curtain_display(),
                    "Language curtain is not displayed")
示例#12
0
    def test_c2472(self):
        log.info("Auto translate of aoutgoing message in P2P")
        menu = Menu(self.driver)
        chat = ChatScreen(self.driver)
        other_profile = OtherProfileScreen(self.driver)
        language = LanguageSettingsScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND_NAME)
        chat.tap_open_profile()
        other_profile.open_language_settings()
        language.is_language_screen()
        language.set_autotranslate_on_sending()
        language.tap_back()
        other_profile.tap_send_message()
        chat.set_chat_msg(self.MESSAGE)
        chat.tap_send_btn()

        log.info("Verify message translated")
        expected = [self.MESSAGE, self.TRANSLATED_MESSAGE]
        actual = chat.get_translated_msg()
        Verify.equals(expected, actual, "No translated messages on screen")
示例#13
0
    def test_c2473(self):
        log.info("Auto translate of aoutgoing message in Group chat")
        menu = Menu(self.driver)
        chat = ChatScreen(self.driver)
        other_profile = OtherProfileScreen(self.driver)
        language = LanguageSettingsScreen(self.driver)
        group_list = GroupListScreen(self.driver)
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_group_chat(self.GROUP_NAME)
        chat.tap_open_profile()
        other_profile.open_language_settings()
        language.is_language_screen()
        language.set_autotranslate_on_sending()
        # TODO: Make scroll in group settings
        menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL])
        group_list.open_group_chat(self.GROUP_NAME)
        chat.set_chat_msg(self.MESSAGE)
        chat.tap_send_btn()

        log.info("Verify message translated")
        expected = [self.MESSAGE, self.TRANSLATED_MESSAGE]
        actual = chat.get_translated_msg()
        Verify.equals(expected, actual, "No translated messages on screen")