def check_card_user_in_search_contact(self, driver, user):
     path_fg = Navigate.check_user_contact.USER_IN_SEARCH
     service_log.put("Start checking user card in search contact by user_id='%s'" % user["id"])
     Navigate.get_element_navigate(driver, path_fg, mode=None, e_msg="Не найдена карточка пользователя в поисковй выдаче")
     self.get_user_card_photo_in_cont(driver, path_fg, Navigate.check_user_contact.FU_USER_PHOTO_IN_SEARCH,
                                      user["avatar_id"])
     HelpUserCardCheckMethods.get_user_card_name(driver, path_fg + Navigate.check_user_contact.FU_USER_NAME,
                                                 user["display_name"])
     HelpUserCardCheckMethods.get_user_card_on_off_line(driver, path_fg + Navigate.check_user_contact.FU_USER_STATUS,
                                                        user)
     service_log.put("Success checking user card in search contact by user_id='%s'" % user["id"])
 def check_active_card_user_in_contacts(self, driver, user):
     path_fg = Navigate.check_user_contact.ACTIVE_USER_CARD_BY_ID % user["id"]
     service_log.put("Start checking user card by user_id='%s'" % user["id"])
     self.assertIsNotNone(Navigate.get_element_navigate(driver, path_fg))
     self.assertIsNotNone(self.get_user_card_photo_in_cont(driver, path_fg, Navigate.check_user_contact.FU_USER_PHOTO,
                                                           user["avatar_id"]))
     self.assertIsNotNone(HelpUserCardCheckMethods.get_user_card_name(driver, path_fg + Navigate.check_user_contact.
                                                                      FU_USER_NAME, user["display_name"]))
     self.assertIsNotNone(HelpUserCardCheckMethods.get_user_card_on_off_line(driver, path_fg + Navigate.
                                                                             check_user_contact.FU_USER_STATUS, user))
     service_log.put("Success checking user card by user_id='%s'" % user["id"])
 def check_can_not_add_yourself(self, driver, user):
     path_fg = Navigate.check_user_contact.USER_IN_SEARCH
     service_log.put("Start checking user card in search contact by user_id='%s'" % user["id"])
     Navigate.get_element_navigate(driver, path_fg, mode=None, e_msg="Не найдена карточка пользователя в поисковй выдаче")
     self.get_user_card_photo_in_cont(driver, path_fg, Navigate.check_user_contact.FU_USER_PHOTO_IN_SEARCH,
                                      user["avatar_id"])
     HelpUserCardCheckMethods.get_user_card_name(driver, path_fg + Navigate.check_user_contact.FU_USER_NAME,
                                                 user["display_name"])
     Navigate.get_element_navigate(driver, path_fg + Navigate.check_user_contact.ITS_YOU, mode=None)
     f = False
     try:
         Navigate.get_element_navigate(driver, Navigate.click_user_contact.BTN_ADD_CONTACT, mode=None, sleep=0.1)
         f = True
     except Exception:
         pass
     self.assertFalse(f, "Появилась кнопка добавить пользователя")
 def check_active_user_info(self, driver, link_db, user, role):
     path_fg = Navigate.check_user_contact.USER_INFO
     service_log.put("Start checking user card in active contact by user_id='%s'" % user["id"])
     Navigate.get_element_navigate(driver, path_fg, mode=None, e_msg="Не найден блок инфо пользователя у активного "
                                                                     "контакта")
     self.get_user_card_photo_in_cont(driver, path_fg, Navigate.check_user_contact.FU_USER_PHOTO_IN_SEARCH,
                                      user["avatar_id"])
     HelpUserCardCheckMethods.get_user_card_name(driver, path_fg + Navigate.check_user_contact.UI_USER_NAME,
                                                 user["display_name"])
     HelpUserCardCheckMethods.get_user_card_web_status(driver, path_fg + Navigate.check_user_contact.UI_USER_STATUS,
                                                       user)
     Navigate.get_element_navigate(driver, Navigate.click_user_contact.SEND_MSG % user["id"])
     Navigate.get_element_navigate(driver, Navigate.click_user_contact.BTN_DELETE)
     service_log.put("Success checking user card in active contact by user_id='%s'" % user["id"])
     mode = lambda sf, d, ldb, r, u: HelpUserContactsCheckMethods.check_user_store(sf, d, ldb, u) if r is 'seller' else None
     mode(self, driver, link_db, role, user)