Esempio n. 1
0
 def check_if_the_eng_of_NS_is_the_correct_one(user_content):
     logger.debug("    > Check if the engagement of NS is the correct one")
     engName = user_content['engagement_manual_id'] + ": " + user_content[
         'vfName']
     Wait.text_by_name(user_content['engagement_manual_id'],
                       "Engagement - " + engName)
     return engName
Esempio n. 2
0
    def add_ssh_key(is_negative=False):
        logger.debug("About to add an SSH Key in modal window")
        try:  # Add SSH Key from modal window and return key value.
            Wait.text_by_name(Constants.Dashboard.Wizard.AddSSHKey.Title.NAME,
                              Constants.Dashboard.Wizard.AddSSHKey.Title.TEXT)
            # Generate an SSH Public Key.
            sshKey = Helper.generate_sshpub_key()
            if is_negative:
                sshKey = sshKey[8:]
            Enter.text_by_name("key", sshKey)

            # Check that the submit button exists.
            Wait.text_by_css(
                Constants.SubmitButton.CSS,
                Constants.Dashboard.Wizard.AddSSHKey.Title.TEXT)

            Click.css(Constants.SubmitButton.CSS)  # Click on submit button.
            if is_negative:
                Wait.text_by_id(
                    Constants.Toast.ID,
                    Constants.Dashboard.Avatar.Account
                    .SSHKey.UpdateFailed.TEXT)
            else:
                Wait.name_to_dissappear(
                    Constants.Dashboard.Wizard.AddSSHKey.Title.NAME)
                logger.debug("SSH Key added via modal window.")
            return sshKey
        # If failed - count the failure and add the error to list of errors.
        except Exception as e:
            errorMsg = "Failed to add an SSH Key in " +\
                "the modal window. Exception=" + \
                str(e)
            raise Exception(errorMsg)
Esempio n. 3
0
 def invite_team_members(email):
     try:
         logger.debug("Tab Invite Team Members")
         Wait.text_by_name(
             Constants.Dashboard.Wizard.InviteTeamMembers.Title.NAME,
             Constants.Dashboard.Wizard.InviteTeamMembers.Title.TEXT)
         Enter.text_by_name("email", email)
         Wait.text_by_css(
             Constants.SubmitButton.CSS,
             Constants.Dashboard.Wizard.InviteTeamMembers.Button.TEXT)
         Click.css(Constants.SubmitButton.CSS)
         Wait.name_to_dissappear(
             Constants.Dashboard.Wizard.InviteTeamMembers.Title.NAME)
     # If failed - count the failure and add the error to list of errors.
     except Exception as e:
         errorMsg = "FAILED in Tab Invite Team Members. Exception = %s" % e
         raise Exception(errorMsg)
Esempio n. 4
0
 def save_with_no_changes():
     Wait.text_by_id(
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.SAVE_BTN_ID,
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.SAVE_BTN)
     Click.id(
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.SAVE_BTN_ID,
         wait_for_page=True)
     Wait.text_by_name(
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.HEAT,
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.HEAT)
     Wait.text_by_id(
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.
         APPROVE_BTN_TITLE_ID, Constants.Dashboard.LeftPanel.
         EditChecklistTemplate.APPROVE_BTN_TITLE_TEXT)
     Wait.text_by_id(
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.APPROVE_BTN_ID,
         "Yes")
     Click.id(
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.APPROVE_BTN_ID,
         wait_for_page=True)
     Wait.text_by_id(
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.SUCCESS_ID,
         Constants.Dashboard.LeftPanel.EditChecklistTemplate.
         CL_TEMPLATE_SAVED_TXT)
Esempio n. 5
0
 def open_invite_team_member_form(vf_left_nav_id):
     Click.id(vf_left_nav_id)
     Click.id(Constants.Dashboard.Overview.TeamMember.ID)
     Wait.text_by_name(
         Constants.Dashboard.Wizard.InviteTeamMembers.Title.NAME,
         Constants.Dashboard.Wizard.InviteTeamMembers.Title.TEXT)
Esempio n. 6
0
 def click_on_template_name_on_navigation(template_name, text):
     Wait.text_by_name(template_name, text, wait_for_page=True)
     Click.name(template_name, wait_for_page=True)