def add_feedback(): Wait.css("textarea[name=\"description\"]", wait_for_page=True) description = Helper.rand_string("randomString") Enter.text_by_css("textarea[name=\"description\"]", description) Click.id(Constants.Dashboard.Feedback.FeedbackModal.SAVE_BTN_ID, wait_for_page=True) Wait.text_by_id(Constants.Toast.ID, "Feedback was sent successfully.", wait_for_page=True) return description
def test_current_status(self): user_content = API.VirtualFunction.create_engagement( wait_for_gitlab=False) vfName = user_content['vfName'] Frontend.User.login(user_content['email'], Constants.Default.Password.TEXT) # new Frontend.Overview.click_on_vf(user_content) Frontend.User.go_to_account() Wait.id(user_content['email']) actualFullName = Get.value_by_name("fullname") Helper.internal_assert(user_content['full_name'], actualFullName) Click.id(Constants.Dashboard.Statuses.ID) Frontend.Overview.click_on_vf(user_content) Helper.internal_assert( "Current Status", Get.by_css(Constants.Dashboard.Overview.Status.Header.ID)) Wait.text_by_id(Constants.Dashboard.Overview.Status.Description.ID, "No status update has been provided yet.") Click.id(Constants.Dashboard.Avatar.ID) Click.link_text("Logout") engLeadEmail = DB.User.select_el_email(vfName) Frontend.User.relogin(engLeadEmail, Constants.Default.Password.TEXT) Frontend.Overview.click_on_vf(user_content) Click.css(Constants.Dashboard.Overview.Status.Add.CSS) Helper.internal_assert("Add Status", Get.by_css("h3.modal-title.ng-binding")) Helper.internal_assert( "Use the form below to add the current status of the engagement.", Get.by_css("span.ng-binding")) Click.css("textarea[name=\"description\"]") Enter.text_by_css("textarea[name=\"description\"]", "Add new Status", wait_for_page=True) Helper.internal_assert( "Add status", Get.by_id(Constants.Dashboard.DetailedView.VFC.Save_button.ID)) Click.id(Constants.Dashboard.DetailedView.VFC.Save_button.ID, wait_for_page=True) Helper.assertTrue("Last updated" in Get.by_id("status-update-details")) Wait.text_by_id(Constants.Dashboard.Overview.Status.Description.ID, "Add new Status") Wait.css(Constants.Dashboard.Overview.Status.Edit.CSS) Wait.modal_to_dissappear() Click.css(Constants.Dashboard.Overview.Status.Edit.CSS) Helper.internal_assert("Current Status", Get.by_css("h3.modal-title.ng-binding")) Click.css("textarea[name=\"description\"]") Enter.text_by_css("textarea[name=\"description\"]", "Update Status") Click.id(Constants.Dashboard.DetailedView.VFC.Save_button.ID) Wait.modal_to_dissappear() Wait.text_by_id(Constants.Dashboard.Overview.Status.Description.ID, "Update Status") Frontend.User.logout() Frontend.User.relogin(user_content['email'], Constants.Default.Password.TEXT) Frontend.Overview.click_on_vf(user_content) Helper.internal_assert( "Current Status", Get.by_css(Constants.Dashboard.Overview.Status.Header.ID)) Wait.text_by_id(Constants.Dashboard.Overview.Status.Description.ID, "Update Status")