def select_avatar(driver): dashboard = DashboardPage(driver) avatar = dashboard.change_avatar() avatar.all_avatars[0].click() avatar.wait_until_crop_form_appears() avatar.apply_crop_click() avatar.wait_until_popup_becomes_invisible()
def test_change_avatar(driver, user_log_in_log_out): # Test avatar changing dashboard = DashboardPage(driver) avatar = dashboard.change_avatar() avatar.all_avatars[0].click() avatar.wait_until_crop_form_appears() avatar.apply_crop_click() avatar.wait_until_popup_becomes_invisible() assert avatar.inform_message_box.text == "AVATAR HAS BEEN CHANGED" avatar.close_inform_message_box()