Пример #1
0
    def test_c530(self):
        log.info("Send link message in p2p chat")
        menu = Menu(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.FRIEND_NAME)
        chat.set_chat_msg(self.PHONE_NUMBER_MESSAGE)
        chat.tap_send_btn()
        chat.open_context_menu(self.PHONE_NUMBER_MESSAGE)

        log.info("Verify phone number looks like link")
        Verify.true(chat.is_link(), "Message not a link")
        chat.close_context()

        chat.set_chat_msg(self.EMAIL_MESSAGE)
        chat.tap_send_btn()
        chat.open_context_menu(self.EMAIL_MESSAGE)

        log.info("Verify email looks like link")
        Verify.true(chat.is_link(), "Message not a link")
        chat.close_context()

        chat.set_chat_msg(self.URL_MESSAGE)
        chat.tap_send_btn()
        chat.open_context_menu(self.URL_MESSAGE)

        log.info("Verify url looks like link")
        Verify.true(chat.is_link(), "Message not a link")
Пример #2
0
    def test_c1910(self):
        log.info("Open reply screen for replied msg in p2p chat")
        menu = Menu(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.open_replay(self.REPLY_COUNT)

        log.info("Verify reply screen open")
        Verify.true(chat.is_replay_screen(), "Reply screen doesn't display")
Пример #3
0
    def test_c11239(self):
        log.info("Open stickers board")
        menu = Menu(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.FRIEND)
        chat.tap_sticker_btn()

        log.info("Verify sticker board open")
        Verify.true(chat.is_sticker_board_display(), "No sticker board")
Пример #4
0
    def test_c43777(self):
        log.info("Received sticker message from p2p chat")
        menu = Menu(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.FRIEND_NAME)
        incoming_message(self.CHAT_TYPE, self.MIME)

        log.info("Verify sticker message received.")
        Verify.true(chat.is_received_sticker_displayed(), "No received sticker message in list")
Пример #5
0
    def test_c29(self):
        log.info("Send voice message in p2p chat")
        menu = Menu(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.FRIEND_NAME)
        chat.record_voice_msg()
        chat.tap_record_send()

        log.info("Verify voice message sent.")
        Verify.true(chat.is_voice_displayed(), "No sent voice message in list")
Пример #6
0
    def test_c4103(self):
        log.info("Send contact message in p2p chat")
        menu = Menu(self.driver)
        chat_list = ChatListScreen(self.driver)
        contact = ContactScreen(self.driver)
        chat = ChatScreen(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FULL_NAME)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.CONTACT], menu.wenums.CHATS)
        contact.tap_contact(self.FULL_NAME)

        log.info("Verify contact message sent.")
        Verify.true(chat.is_contact_share(self.FULL_NAME), "No contact message in list")
Пример #7
0
    def test_c8181(self):
        log.info("Open custom gallery from chat")
        menu = Menu(self.driver)
        gallery = GalleryScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        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)

        log.info("Verify gallery screen displayed")
        Verify.true(gallery.is_gallery_screen(),
                    "Gallery screen doesn't display")
Пример #8
0
    def test_c27(self):
        log.info("Send text message in p2p chat")
        menu = Menu(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.FRIEND_NAME)
        chat.set_chat_msg(self.TEXT_MESSAGE)
        chat.tap_send_btn()

        log.info("Verify text message sent.")
        Verify.contains(self.TEXT_MESSAGE, chat.get_text_msg(),
                        "No sent message in list")
Пример #9
0
    def test_c36(self):
        log.info("Send media message in p2p chat")
        menu = Menu(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)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.MEDIA], menu.wenums.CHATS)
        menu.tap_first_media()

        log.info("Verify media message sent.")
        Verify.true(chat.is_image_displayed(),
                    "No sent camera shot message in list")
Пример #10
0
    def test_c11223(self):
        log.info("Edit message from p2p chat with airplane mode")
        menu = Menu(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.FRIEND)
        chat.set_chat_msg(self.TEXT_MESSAGE)
        chat.tap_send_btn()
        chat.airplane_mode()
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND)
        chat.open_context_menu(self.TEXT_MESSAGE)
        chat.tap_context_option(self.CONTEXT_OPTION)
        log.info("Edit message '{}' and set: '{}'".format(self.TEXT_MESSAGE, self.EDIT_MESSAGE))
        chat.set_chat_msg(self.EDIT_MESSAGE)
        chat.tap_send_btn()
        chat.airplane_mode()
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND)
        chat.scroll_down_try()

        log.info("Verify edited message display")
        Verify.contains(self.EDIT_MESSAGE, chat.get_text_msg(), "No sent message in list")

        log.info("Verify message status updated")
        Verify.true(chat.get_send_status(self.MESSAGE_TYPE), "Message status not updated")
Пример #11
0
    def test_c32(self):
        log.info("Unblock user: '******'".format(self.FULL_NAME))
        other_profile = OtherProfileScreen(self.driver)
        menu = Menu(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)
        Verify.true(chat.unblock_btn(), "User not blocked")
        chat.tap_unblock_btn()
        other_profile.tap_accept_alert()

        log.info("Verify that user unblocked")
        Verify.true(chat.input_present(), "User still blocked")
Пример #12
0
    def test_c15455(self):
        log.info("Check context menu items on media message in p2p chat")
        menu = Menu(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.FRIEND_NAME)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.MEDIA, menu.wenums.GALLERY], menu.wenums.CHATS)
        menu.tap_first_media()
        chat.open_context_menu_last_bubble()

        log.info("Verify context menu items")
        Verify.equals(context_enums.MEDIA_CONTEXT_MENU_ITEMS, chat.get_context_options(),
                      "Wrong context menu items")
Пример #13
0
    def test_c37(self):
        log.info("Send location message in p2p chat")
        menu = Menu(self.driver)
        chat = ChatScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        location = LocationScreen(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FULL_NAME)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.LOCATION],
                   menu.wenums.CHATS)
        location.tap_send_location()

        log.info("Verify location message sent.")
        Verify.true(chat.is_location_displayed(), "No sent message in list")
Пример #14
0
    def test_c15453(self):
        log.info("Check context menu items on voice message in p2p chat")
        menu = Menu(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.FRIEND_NAME)
        chat.record_voice_msg()
        chat.tap_record_send()
        chat.open_context_menu_last_bubble()

        log.info("Verify context menu items")
        Verify.equals(context_enums.VOICE_CONTEXT_MENU_ITEMS,
                      chat.get_context_options(), "Wrong context menu items")
Пример #15
0
    def test_c11255(self):
        log.info("Check context menu items on sticker message")
        menu = Menu(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.FRIEND)
        chat.tap_sticker_btn()
        chat.send_first_sticker()
        chat.open_sticker_context_menu()

        log.info("Verify sticker message context menu items")
        Verify.equals(context_enums.STICKERS_CONTEXT_MENU_ITEMS,
                      chat.get_context_options(), "Items not identical")
Пример #16
0
    def test_c43772(self):
        log.info("Received text message from p2p chat")
        menu = Menu(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.FRIEND_NAME)
        incoming_message(self.CHAT_TYPE,
                         self.MIME,
                         message_text=self.TEXT_MESSAGE)

        log.info("Verify text message received.")
        Verify.contains(self.TEXT_MESSAGE, chat.get_received_text_msg(),
                        "No received text message in list")
Пример #17
0
    def test_c11243(self):
        log.info("Choose sticker by tap emoji")
        menu = Menu(self.driver)
        chat = ChatScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        keyboard = KeyboardView(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND)
        chat.open_keyboard()
        keyboard.open_emoji_keyboard()
        keyboard.tap_emoji()

        log.info("Verify sticker preview display")
        result = keyboard.is_sticker_preview_display()
        Verify.true(result, "Sticker preview is not displayed")
Пример #18
0
    def test_c8188(self):
        log.info("Sending video from preview")
        menu = Menu(self.driver)
        gallery = GalleryScreen(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.FRIEND)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.MEDIA], menu.wenums.CHATS,
                   menu.wenums.GO_TO_GALLERY)
        gallery.open_preview_video()
        gallery.tap_send_btn()

        log.info("Verify video sent from preview ")
        Verify.true(chat.is_video_displayed(), "Video doesn't sent")
Пример #19
0
    def test_c4106(self):
        log.info("Cancel reply message in p2p chat")
        menu = Menu(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.set_chat_msg(self.TEXT_MESSAGE)
        chat.tap_send_btn()
        chat.open_context_menu(self.TEXT_MESSAGE)
        chat.tap_context_reply()
        chat.tap_cancel_btn()

        log.info("Verify reply canceled")
        Verify.false(chat.is_reply_curtain_present(), "Replay curtain display")
Пример #20
0
    def test_c8182(self):
        log.info("Open first image preview from gallery")
        menu = Menu(self.driver)
        gallery = GalleryScreen(self.driver)
        gallery_preview = PreviewGalleryScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        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.open_preview_image()

        log.info("Verify full image view from gallery displayed")
        Verify.true(gallery_preview.is_full_view_open(),
                    "Full image view from gallery doesn't display")
Пример #21
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")
Пример #22
0
    def test_c4098(self):
        log.info("Send schedule text message in p2p chat")
        menu = Menu(self.driver)
        home = HomeScreen(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.FRIEND_NAME)
        chat.set_chat_msg(self.SCHEDULE_MESSAGE)
        chat.create_scheduled_message()
        chat.tap_save()
        menu.long_press_wheel()

        log.info("Verify schedule text message created")
        Verify.true(home.is_schedule_display(self.SCHEDULE_MESSAGE), "Schedule message doesn't create")
Пример #23
0
    def test_c11250(self):
        log.info("Send reply message by sticker in p2p chat")
        menu = Menu(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.FRIEND)
        chat.set_chat_msg(self.TEXT_MESSAGE)
        chat.tap_send_btn()
        chat.open_context_menu(self.TEXT_MESSAGE)
        chat.tap_context_option(self.REPLY_OPTION)
        chat.tap_sticker_btn()
        chat.send_first_sticker()

        log.info("Verify sticker reply message display")
        Verify.true(chat.is_sticker_reply(), "No sent message in list")
Пример #24
0
    def test_c1978(self):
        log.info("Translate message: '{}'".format(self.MESSAGE))
        menu = Menu(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.FRIEND_NAME)
        chat.set_chat_msg(self.MESSAGE)
        chat.tap_send_btn()
        chat.open_context_menu(self.MESSAGE)
        chat.tap_context_translate()

        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")
Пример #25
0
    def test_c11247(self):
        log.info("Search stickers by keywords")
        menu = Menu(self.driver)
        chat = ChatScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        keyboard = KeyboardView(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND)
        chat.tap_sticker_btn()
        keyboard.tap_sticker_search()
        chat.set_chat_msg(self.SEARCH_WORD)
        keyboard.get_sticker_preview_count()

        log.info("Verify sticker preview display")
        Verify.equals(self.COUNT, keyboard.get_sticker_preview_count(),
                      "Sticker preview is not displayed")
Пример #26
0
    def test_c34(self):
        log.info("Send camera photo message in p2p chat")
        camera = CameraScreen(self.driver)
        menu = Menu(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)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.CAMERA],
                   menu.wenums.CHATS)
        camera.tap_take_photo()
        camera.tap_send_button()

        log.info("Verify camera photo message displayed")
        Verify.true(chat.is_image_displayed(),
                    "No sent camera shot message in list")
Пример #27
0
    def test_c4104(self):
        log.info("Send place message in p2p chat")
        menu = Menu(self.driver)
        chat_list = ChatListScreen(self.driver)
        location = LocationScreen(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FULL_NAME)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.LOCATION],
                   menu.wenums.CHATS)
        location.tap_search()
        location.search_and_open_place(self.PLACE)
        location.tap_send_location()

        log.info("Verify place message sent.")
        Verify.true(location.is_place_displayed(self.PLACE),
                    "No sent place message")
Пример #28
0
    def test_c33(self):
        log.info("Delete message from p2p chat")
        menu = Menu(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.FRIEND_NAME)
        chat.set_chat_msg(self.DELETE_MESSAGE)
        chat.tap_send_btn()
        chat.open_context_menu(self.DELETE_MESSAGE)
        chat.tap_context_delete()
        chat.tap_delete_for_me()

        log.info("Verify message deleted")
        Verify.true(chat.is_message_deleted(self.DELETE_MESSAGE),
                    "Message still displayed")
Пример #29
0
    def test_c11248(self):
        log.info("Search stickers by emoji")
        menu = Menu(self.driver)
        chat = ChatScreen(self.driver)
        chat_list = ChatListScreen(self.driver)
        keyboard = KeyboardView(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND)
        chat.tap_sticker_btn()
        keyboard.tap_sticker_search()
        keyboard.open_emoji_keyboard()
        keyboard.tap_emoji()

        log.info("Verify sticker search display")
        Verify.equals(self.COUNT, keyboard.get_sticker_preview_count(),
                      "No stickers in the search")
Пример #30
0
    def test_c4103(self):
        log.info("Check context menu items on contact message in p2p chat")
        menu = Menu(self.driver)
        chat_list = ChatListScreen(self.driver)
        contact = ContactScreen(self.driver)
        chat = ChatScreen(self.driver)
        menu.go_to(menu.wenums.CHATS, [menu.wenums.ALL])
        chat_list.tap_user(self.FRIEND)
        menu.go_to(menu.wenums.ACTIONS, [menu.wenums.CONTACT],
                   menu.wenums.CHATS)
        contact.tap_contact(self.FRIEND)
        chat.open_context_menu_last_bubble()

        log.info("Verify context menu items")
        Verify.equals(context_enums.CONTACT_CONTEXT_MENU_ITEMS,
                      chat.get_context_options(), "Wrong context menu items")