def test_c11221(self): log.info( "Send photo without compressing (as a file) with airplane mode") menu = Menu(self.driver) gallery = GalleryScreen(self.driver) chat = ChatScreen(self.driver) chat_list = ChatListScreen(self.driver) chat.airplane_mode() 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() 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") 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 message status updated") Verify.true(chat.get_send_status(self.MESSAGE_TYPE), "Message status not updated")
def test_c11220(self): log.info("Send contact message in p2p chat with airplane mode") menu = Menu(self.driver) chat_list = ChatListScreen(self.driver) contact = ContactScreen(self.driver) chat = ChatScreen(self.driver) chat.airplane_mode() 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) log.info("Verify contact message sent.") Verify.true(chat.is_contact_share(self.FRIEND), "No contact message in list") 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 message status updated") Verify.true(chat.get_send_status(self.MESSAGE_TYPE), "Message status not updated")
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_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")
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")
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")
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_c536(self): log.info("Send location message") menu = Menu(self.driver) chat = ChatScreen(self.driver) location = LocationScreen(self.driver) menu.go_to(menu.wenums.MYSELF) 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_c15470(self): log.info("Check context menu items on media message") menu = Menu(self.driver) chat = ChatScreen(self.driver) menu.go_to(menu.wenums.MYSELF) 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_c25397(self): log.info("Sending video from preview") menu = Menu(self.driver) gallery = GalleryScreen(self.driver) chat = ChatScreen(self.driver) menu.go_to(menu.wenums.MYSELF) 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_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")
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_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_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")
def test_c25769(self): log.info("Choose sticker by tap emoji") menu = Menu(self.driver) chat = ChatScreen(self.driver) keyboard = KeyboardView(self.driver) menu.go_to(menu.wenums.MYSELF) 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_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")
def test_c533(self): log.info("Send video message in myself") menu = Menu(self.driver) chat = ChatScreen(self.driver) camera = CameraScreen(self.driver) menu.go_to(menu.wenums.MYSELF) 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_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")
def test_c537(self): log.info("Send message in myself") menu = Menu(self.driver) chat = ChatScreen(self.driver) camera = CameraScreen(self.driver) menu.go_to(menu.wenums.MYSELF) 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 sent.") Verify.true(chat.is_image_displayed(), "No sent camera shot message in list")
def test_c25771(self): log.info("Search stickers by emoji") menu = Menu(self.driver) chat = ChatScreen(self.driver) keyboard = KeyboardView(self.driver) menu.go_to(menu.wenums.MYSELF) 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_c21534(self): log.info("Send media message in channel") menu = Menu(self.driver) chat = ChatScreen(self.driver) channels = ChannelsListScreen(self.driver) menu.go_to(menu.wenums.CHANNELS, [menu.wenums.MY_CHANNELS]) channels.open_channel(self.CHANNEL_NAME) menu.go_to(menu.wenums.ACTIONS, [menu.wenums.MEDIA, menu.wenums.GALLERY], 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_c15473(self): log.info("Check context menu items on contact message") menu = Menu(self.driver) contact = ContactScreen(self.driver) chat = ChatScreen(self.driver) menu.go_to(menu.wenums.MYSELF) 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_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_c15469(self): log.info("Check context menu items on sticker message") menu = Menu(self.driver) chat = ChatScreen(self.driver) menu.go_to(menu.wenums.MYSELF) 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_c15472(self): log.info("Check context menu items on location message") menu = Menu(self.driver) chat = ChatScreen(self.driver) location = LocationScreen(self.driver) menu.go_to(menu.wenums.MYSELF) menu.go_to(menu.wenums.ACTIONS, [menu.wenums.LOCATION, menu.wenums.SEND_LOCATION], menu.wenums.CHATS) location.tap_send_location() chat.open_context_menu_last_bubble() log.info("Verify context menu items") Verify.equals(context_enums.LOCATION_CONTEXT_MENU_ITEMS, chat.get_context_options(), "Wrong context menu items")
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")
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_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")
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_c21535(self): log.info("Send location message in channel") menu = Menu(self.driver) location = LocationScreen(self.driver) chat = ChatScreen(self.driver) channels = ChannelsListScreen(self.driver) menu.go_to(menu.wenums.CHANNELS, [menu.wenums.MY_CHANNELS]) channels.open_channel(self.CHANNEL_NAME) menu.go_to(menu.wenums.ACTIONS, [menu.wenums.LOCATION, menu.wenums.SEND_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")