def test_c1794(self): log.info("Send link message in group chat") chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) menu = Menu(self.driver) menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL]) group_list.open_group_chat(self.GROUP_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")
def test_c19133(self): log.info("Open stickers board") menu = Menu(self.driver) chat = ChatScreen(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_sticker_btn() log.info("Verify sticker board open") Verify.true(chat.is_sticker_board_display(), "No sticker board")
def test_c1911(self): log.info("Open replied screen from first replied msg in group chat") menu = Menu(self.driver) chat = ChatScreen(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.open_replay(self.REPLY_COUNT) log.info("Verify replied screen open") Verify.true(chat.is_replay_screen(), "Replied screen doesn't display")
def test_c11251(self): log.info("Send sticker message in group chat") menu = Menu(self.driver) chat = ChatScreen(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_sticker_btn() chat.send_first_sticker() log.info("Verify sticker message display") Verify.true(chat.is_sticker_displayed(), "No sent message in list")
def test_c15389(self): log.info("Open custom gallery from group chat") gallery = GalleryScreen(self.driver) group_list = GroupListScreen(self.driver) menu = Menu(self.driver) 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) log.info("Verify gallery screen displayed") Verify.true(gallery.is_gallery_screen(), "Gallery screen doesn't display")
def test_c1788(self): log.info("Send voice message in group chat") chat = ChatScreen(self.driver) menu = Menu(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.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")
def test_c1792(self): log.info("Send media message in group chat") chat = ChatScreen(self.driver) menu = Menu(self.driver) group_list = GroupListScreen(self.driver) 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.tap_first_media() log.info("Verify media message sent.") Verify.true(chat.is_image_displayed(), "No sent camera shot message in list")
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")
def test_c1786(self): log.info("Send text message in group chat") chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) menu = Menu(self.driver) menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL]) group_list.open_group_chat(self.GROUP_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")
def test_c15484(self): log.info("Check context menu items on sticker message") menu = Menu(self.driver) chat = ChatScreen(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_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")
def test_c1793(self): log.info("Send location message in group chat") chat = ChatScreen(self.driver) menu = Menu(self.driver) location = LocationScreen(self.driver) group_list = GroupListScreen(self.driver) 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.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")
def test_c15480(self): log.info("Check context menu items on text message") chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) menu = Menu(self.driver) menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL]) group_list.open_group_chat(self.GROUP_NAME) chat.set_chat_msg(self.TEXT_MESSAGE) chat.tap_send_btn() chat.open_context_menu(self.TEXT_MESSAGE) log.info("Verify all context menu items present") Verify.equals(context_enums.BASE_CONTEXT_MENU_ITEMS, chat.get_context_options(), "Wrong context menu items")
def test_c15483(self): log.info("Check context menu items on voice message") menu = Menu(self.driver) chat = ChatScreen(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.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")
def test_c15396(self): log.info("Sending video from preview") menu = Menu(self.driver) gallery = GalleryScreen(self.driver) chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) 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.open_preview_video() gallery.tap_send_btn() log.info("Verify video sent from preview ") Verify.true(chat.is_video_displayed(), "Video doesn't sent")
def test_c1789(self): log.info("Delete message from group chat") chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) menu = Menu(self.driver) menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL]) group_list.open_group_chat(self.GROUP_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")
def test_c15390(self): log.info("Open first image preview from gallery in group chat") gallery = GalleryScreen(self.driver) gallery_preview = PreviewGalleryScreen(self.driver) group_list = GroupListScreen(self.driver) menu = Menu(self.driver) 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.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")
def test_c15391(self): log.info("Open first image preview from gallery in group chat") gallery = GalleryScreen(self.driver) gallery_preview = PreviewGalleryScreen(self.driver) group_list = GroupListScreen(self.driver) menu = Menu(self.driver) 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.open_preview_image() gallery_preview.open_curtain() log.info("Verify send as file button display") Verify.true(gallery_preview.is_send_as_file_btn_display(), "Send as file button doesn't display")
def test_c15485(self): log.info("Check context menu items on media message") menu = Menu(self.driver) chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) 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.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")
def test_c19137(self): log.info("Search stickers by keywords") menu = Menu(self.driver) chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) keyboard = KeyboardView(self.driver) menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL]) group_list.open_group_chat(self.GROUP_NAME) chat.tap_sticker_btn() keyboard.tap_sticker_search() chat.set_chat_msg(self.SEARCH_WORD) log.info("Verify sticker preview display") Verify.equals(self.COUNT, keyboard.get_sticker_preview_count(), "Sticker preview is not displayed")
def test_c1790(self): log.info("Send camera photo message in group chat") menu = Menu(self.driver) group_list = GroupListScreen(self.driver) camera = CameraScreen(self.driver) 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.CAMERA], menu.wenums.CHATS) camera.tap_take_photo() camera.tap_send_button() log.info("Verify camera photo message displayed") Verify.true(camera.is_image_displayed(), "No sent camera shot message in list")
def test_c19136(self): log.info("Choose sticker by tap emoji") menu = Menu(self.driver) chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) keyboard = KeyboardView(self.driver) menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL]) group_list.open_group_chat(self.GROUP_NAME) 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")
def test_c1791(self): log.info("Send video message in group chat") chat = ChatScreen(self.driver) menu = Menu(self.driver) camera = CameraScreen(self.driver) group_list = GroupListScreen(self.driver) 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.CAMERA], menu.wenums.CHATS) camera.tap_video_camera() camera.record_video() camera.tap_send_button() log.info("Verify video message sent.") Verify.true(chat.is_video_displayed(), "No sent video message in list")
def test_c19138(self): log.info("Search stickers by emoji") menu = Menu(self.driver) chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) keyboard = KeyboardView(self.driver) menu.go_to(menu.wenums.GROUPS, [menu.wenums.ALL]) group_list.open_group_chat(self.GROUP_NAME) 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")
def test_c1979(self): log.info("Translate message: '{}'".format(self.MESSAGE)) chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) menu = Menu(self.driver) 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() 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")
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")
def test_c15393(self): log.info("Send photo without compressing (as a file)") menu = Menu(self.driver) gallery = GalleryScreen(self.driver) chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) 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.open_preview_image() gallery.open_curtain() gallery.tap_send_as_file() log.info("Verify media message sent without compressing (as a file)") Verify.true(chat.is_file_message_displayed(), "No sent file message in list")
def test_c15481(self): log.info("Check context menu items on translated message") menu = Menu(self.driver) chat = ChatScreen(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.set_chat_msg(self.MESSAGE) chat.tap_send_btn() chat.open_context_menu(self.MESSAGE) chat.tap_context_translate() chat.open_translation_context_menu() log.info("Verify context menu items") Verify.equals(context_enums.TRANSLATED_CONTEXT_MENU_ITEMS,chat.get_context_options(), "Wrong context menu items")
def test_c4099(self): log.info("Send schedule text message in group chat") menu = Menu(self.driver) home = HomeScreen(self.driver) chat = ChatScreen(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.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")
def test_c15488(self): log.info("Check context menu items on contact message") menu = Menu(self.driver) contact = ContactScreen(self.driver) chat = ChatScreen(self.driver) group_list = GroupListScreen(self.driver) 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.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")
def test_c11252(self): log.info("Send sticker message as reply in group chat") menu = Menu(self.driver) chat = ChatScreen(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.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 reply sticker message display") Verify.true(chat.is_sticker_reply(), "No sent message in list")