Ejemplo n.º 1
0
class Test_004_UpdateUser_select_x:
    baseURL = ReadConfig.get_CM_UI_Users()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.updateuser
    def test_UpdateUser_select_x_004(self,setup):
        self.logger.info("****************  Test_004 :: Test UpdateUser when user  Click 'Edit' button and select close( * ) button ****************")
        self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164254?projectId=50")
        print(
            "****************  Test_004 :: Test UpdateUser when user  Click 'Edit' button and select close( * ) button ****************")
        print(
            "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164254?projectId=50")
        self.driver=setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()

        self.user = users(self.driver)
        self.user.select_users_Link()

        self.user.select_edit_button()

        self.user.select_close_x()
        try:
            self.user.select_edit_button()
        except Exception:
            self.user.capture_screenshot()
            self.user.select_edit_button()
        self.driver.quit()
def test_createUser_invalid_password_combination_065():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "**************** In Description: TestCase_065: Test CreateUser when user sends  -  invalid password combination ****************"
    )
    print(
        "In Description :TestCase_065: Test CreateUser when user sends  -  invalid password combination "
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    user = username_field_validations()
    userName = user.username_regex()

    file_body = readFiles()
    body = file_body.create_user_body()
    body['password'] = "******"
    body['confirmPassword'] = '******'
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)
def test_updateUser_lastName_empty_011():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info(
        "****************  Test_011: Test updateUser when user sends  - Lastname empty ****************"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )
    print(
        "****************  Test_011: Test updateUser when user sends  - Lastname empty ****************"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )

    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)

    file = open("./tests_admin/testCases/update_user_api.json", 'r')
    body = json.loads(file.read())
    body['userName'] = userName
    body['lastName'] = ""

    com.update_user_negative(body, userName)

    com.verify_updated_user_from_sm_with_api(userName)
Ejemplo n.º 4
0
def test_createUser_userName_with_whiteSpaces_025():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_025:Test CreateUser when user sends userName values as white spaces "
    )
    print(
        "In Description :Test_025:Test CreateUser when user sends userName values as white spaces"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    # Body
    user = username_field_validations()
    userName = user.username_whitespace()
    file_body = readFiles()
    body = file_body.create_user_body()
    body['userName'] = userName

    com.create_user_negative(body, userName)
    com.verify_users_from_sm_with_api(userName)
Ejemplo n.º 5
0
class Test_004_CM_row_per_page:
    baseURL = ReadConfig.get_CM_UI_Users()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.createuser
    def test_cm_row_per_page_004(self, setup):
        self.logger.info(
            "****************  Test_004:: Test Rows per page ****************")
        self.logger.info("")
        print(
            "****************  Test_004:: Test Rows per page   ****************"
        )
        print("Jama link is ::")
        self.driver = setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()
        self.cm_user = cm_userlist(self.driver)
        self.cm_user.select_CM_users_Link()
        self.cm_user.verify_CM_users_header()
        time.sleep(2)
        self.cm_user.check_default_rows_per_page()
        time.sleep(2)
        self.cm_user.select_rows_per_page('25')
class Test_005_dashboardViewer_LoadedOption:
    baseURL = ReadConfig.get_CM_UI_Users()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.dashboardviewer
    def test_005_dashboardViewer_LoadedOption(self, setup):
        self.logger.info(
            "****************  Test_005:: Test Loaded Option of Site Summary. ****************"
        )
        self.logger.info("")
        print(
            "****************  Test_005:: Test Loaded Option of Site Summary.  ****************"
        )
        print("Jama link is ::")
        self.driver = setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()
        time.sleep(10)

        self.dashboard = dashboard_viewer(self.driver)
        self.dashboard.select_viewer()
        time.sleep(2)
        self.dashboard.verify_dashboard_header()
        self.dashboard.click_dayOption_dropdown()
        self.dashboard.verify_dayOption_dropdown()
        time.sleep(2)
        self.dashboard.select_dayOption_dropdown('30 days')
        self.dashboard.table_verifyColumn('Loaded', '3')
        self.driver.quit()
Ejemplo n.º 7
0
def test_updateUser_email_RegEx_023():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info(
        "****************  Test_023: Test updateUser when user sends  -  Email with RegEx ****************"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )
    print(
        "****************  Test_023: Test updateUser when user sends  -  Email with RegEx ****************"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )

    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)
    list = {
        "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/", "/", "?",
        "]", "[", "|"
    }
    for i in list:
        j = i + "@abc.com"
        print("Updating email with ::", j)
        file = open("./tests_admin/testCases/update_user_api.json", 'r')
        body = json.loads(file.read())
        body['userName'] = userName
        body['emailAddress'] = j

        com.update_user_negative(body, userName)

        com.verify_updated_user_from_sm_with_api(userName)
Ejemplo n.º 8
0
def test_createRole_001():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "Creating role from SM GDSystem UI and verify the role in CM UI")

    com.create_role_in_sm_ui()
def test_updateUser_password_confirmPassword_different_036():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info(
        "****************  Test_036: Test updateUser when user sends  -  password and ConfirmPassword doesn't match ****************"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )
    print(
        "****************  Test_036: Test updateUser when user sends  -  password and ConfirmPassword doesn't match ****************"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )

    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)

    file = open("./tests_admin/testCases/update_user_api.json", 'r')
    body = json.loads(file.read())
    body['userName'] = userName
    body['password'] = '******'
    body['confirmPassword'] = '******'

    com.update_user_negative(body, userName)

    com.verify_updated_user_from_sm_with_api(userName)
Ejemplo n.º 10
0
def test_createUser_firstName_apartFrom_RegEx_033():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info("****************  Test_033: Test CreateUser when user sends  -  firstName apart From RegEx ****************")
    print("In Description :Test_033: Test CreateUser when user sends  -  firstName apart From RegEx")
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")
    print("Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50")
    # URL
    url = ReadConfig.sm()

    # Additional headers.
    headers = com.headers()

    # Body
    x = Xeger(limit=15)
    name = com.userName_RegEx()
    userName = x.xeger(name)
    list = {".", "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/", "/", "?", "]", "[", "|"}
    for i in list:
        file = open("./tests_admin/testCases/create_user_api.json", 'r')
        print("Sending firstname ::"+i)
        body = json.loads(file.read())
        body['firstName'] = i
        body['userName'] = userName

        com.create_user_negative(body, userName)

        com.verify_users_from_sm_with_api(userName)
class Test_042:
    baseURL = ReadConfig.get_CM_UI_Roles()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.createrole
    def test_042(self, setup):
        self.logger.info(
            "****************  Test_042 : Test CreateRole when user Click ADD button and verify checkbox status (by entering choices mnually) ****************"
        )
        print(
            "In Description : Test_042 : Test CreateRole when user Click ADD button and checkbox status (by entering choices mnually) "
        )
        self.logger.info(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164224?projectId=50"
        )
        print(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164224?projectId=50"
        )

        self.driver = setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()
        self.RolesList = roles(self.driver)
        self.RolesList.select_roles()
        time.sleep(2)
        self.RolesList.verify_AdminCentral_RolesList_header()
        self.RolesList.select_add_role_button()
        self.RolesList.verify_checkbox_status('Select All')
        self.driver.close()
Ejemplo n.º 12
0
def test_updateUser_userName_editedBy_null_003():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info(
        "****************  Test_003: Test updateUser when user sends EditedBy values as empty"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )
    print(
        "****************  Test_003: Test updateUser when user sends EditedBy values as empty"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )

    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)
    print("editedBy value is updating as NULL")

    file = open("./tests_admin/testCases/update_user_api.json", 'r')
    body = json.loads(file.read())
    body['userName'] = userName
    body['editedBy'] = ''

    com.update_user_negative(body, userName)

    com.verify_updated_user_from_sm_with_api(userName)
Ejemplo n.º 13
0
def test_updateUser_firstName_apartFrom_RegEx_010():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info("****************  Test_010: Test updateUser when user sends  -  firstName apart From RegEx ****************")
    logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50")
    print("****************  Test_010: Test updateUser when user sends  -  firstName apart From RegEx ****************")
    print("Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50")

    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)

    list = {".", "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/", "/", "?", "]", "[", "|"}
    for i in list:
        print("Trying to update FirstName as ::",  i)

        file = open("./tests_admin/testCases/update_user_api.json", 'r')
        body = json.loads(file.read())
        body['userName'] = userName
        body['firstName'] = i

        com.update_user_negative(body, userName)

        com.verify_updated_user_from_sm_with_api(userName)
class Test_044_UpdateUser_PhoneNumber_Empty:
    baseURL = ReadConfig.get_CM_UI_Users()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.updateuser
    def test_updateUser_phoneNumber_empty_044(self,setup):
        self.logger.info("****************  Test_044:: Test UpdateUser when user sends 'PhoneNumber' as empty ****************")
        self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164254?projectId=50")
        print(
            "****************  Test_044:: Test UpdateUser when user sends 'PhoneNumber' as empty ****************")
        print(
            "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164254?projectId=50")
        self.driver=setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()

        self.user = users(self.driver)
        self.user.select_users_Link()

        self.user.select_edit_button()
        self.driver.find_element_by_id("telephoneNumber").send_keys("")
        self.user.select_save_button()
        try:
            self.user.firstName_RegEx()
        except Exception:
            self.user.capture_screenshot()
            self.user.select_edit_button()
        self.driver.quit()
def test_updateRole_defaultRoles_008():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "****************  Test_008: Test updateRole when user sends  - Request to update DefaultRoles(Default roles should not get update)****************"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164302?projectId=50"
    )
    print(
        "****************  Test_008: Test updateRole when user sends  - Request to update DefaultRoles(Default roles should not get update)****************"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164302?projectId=50"
    )
    # Body
    list = ['Administrator', 'Operator', 'Fieldservice']
    roleName = random.choice(list)
    print("\n Updating Role ::", roleName)

    file = open("./tests_admin/testCases/update_role_api.json", 'r')
    body = json.loads(file.read())
    body['userRoleName'] = roleName

    com.update_role_negative(body, roleName)

    com.verify_updated_role_from_sm_with_api(roleName)
def test_updateUser_password_RegEx_041():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info("****************  Test_041: Test updateUser when user sends  -  password with RegEx ****************")
    logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50")
    print("****************  Test_041: Test updateUser when user sends  -  password with RegEx ****************")
    print("Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50")
    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)
    x = Xeger(limit=10)
    password = com.password_RegEx()
    Password=x.xeger(password)
    print("Updating password as::", Password)

    file = open("./tests_admin/testCases/update_user_api.json", 'r')
    body = json.loads(file.read())
    body['userName'] = userName
    body['password'] = password
    body['confirmPassword'] = password

    com.update_user_positive(body, userName)

    com.verify_updated_user_from_sm_with_api(userName)
def test_updateRole_006():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "****************  Test_006: Test updateRole when user sends  -  editedBy empty Request ****************"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164302?projectId=50"
    )
    print(
        "****************  Test_006: Test updateRole when user sends  -  editedBy empty Request ****************"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164302?projectId=50"
    )
    # Body
    list = com.getRolesList()
    roleName = random.choice(list)
    print("\n Updating Role - editedBy as null::", roleName)

    file = open("./tests_admin/testCases/update_role_api.json", 'r')
    body = json.loads(file.read())
    body['editedBy'] = ''
    body['userRoleName'] = roleName

    com.update_role_negative(body, roleName)

    com.verify_updated_role_from_sm_with_api(roleName)
class Test_026_UpdateUser_LastName_RegEx:
    baseURL = ReadConfig.get_CM_UI_Users()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.updateuser
    def test_updateUser_lastname_RegEx_026(self,setup):
        self.logger.info("****************  Test_026 Test UpdateUser when user sends 'LastName' values with RegularEx ^[a-zA-Z0-9]+$  ****************")
        self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164254?projectId=50")
        print(
            "****************  Test_026 Test UpdateUser when user sends 'LastName' values with RegularEx ^[a-zA-Z0-9]+$  ****************")
        print(
            "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164254?projectId=50")
        self.driver=setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()

        self.user = users(self.driver)
        self.user.select_users_Link()

        self.user.select_edit_button()

        self.user.lastName_RegEx()

        self.user.select_save_button()
        try:
            self.user.select_edit_button()
        except Exception:
            self.user.capture_screenshot()
            self.user.select_edit_button()
        self.driver.quit()
class Test_071_adduser_popup:
    baseURL = ReadConfig.get_CM_UI_Users()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.createuser
    def test_addUser_popup_071(self, setup):
        self.logger.info(
            "****************  Test_071:: Test addUser screen popup text ****************"
        )
        self.logger.info(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164248?projectId=50"
        )
        print(
            "****************  Test_071:: Test addUser screen popup text  ****************"
        )
        print(
            "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164248?projectId=50"
        )
        self.driver = setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()

        self.user = users(self.driver)
        self.user.select_users_Link()

        self.user.select_add_button()

        self.user.verify_addUser_popup_text()

        self.driver.quit()
def test_updateUser_telephone_endWithSpace_033():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info(
        "****************  Test_033: Test updateUser when user sends  -  telephone end with space ****************"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )
    print(
        "****************  Test_033: Test updateUser when user sends  -  telephone end with space ****************"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )

    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)
    x = Xeger(limit=20)
    telephone = com.telephone_RegEx()
    telephoneNumber = x.xeger(telephone) + " "

    file = open("./tests_admin/testCases/update_user_api.json", 'r')
    body = json.loads(file.read())
    body['userName'] = userName
    body['telephoneNumber'] = telephoneNumber

    com.update_user_negative(body, userName)

    com.verify_updated_user_from_sm_with_api(userName)
Ejemplo n.º 21
0
def test_updateUser_userName_editedBy_with_whiteSpaces_004():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info("****************  Test_004: Test updateUser when user sends EditedBy values with whiteSpaces  ****************")
    logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50")
    print("****************  Test_004: Test updateUser when user sends EditedBy values with whiteSpaces  ****************")
    print("Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50")

    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)
    print("EditedBy value is updating with whiteSpaces")

    file = open("./tests_admin/testCases/update_user_api.json", 'r')
    body = json.loads(file.read())
    body['userName'] = userName
    body['editedBy'] = '   '

    body = {
        "editedBy": "    ", "userName": userName, "firstName": "vijay", "middleInitial": "m", "lastName": "mandava",
        "emailAddress": "*****@*****.**", "telephoneNumber": "603-555-1212", "extension": "5309", "password": "******",
        "confirmPassword": "******", "userRoleName": "FieldService", "deactivated": 'false',
        "hidden": 'false', "isADUser": '******'
    }

    com.update_user_negative(body, userName)

    com.verify_updated_user_from_sm_with_api(userName)

    # com.verify_updated_user_from_sm_UI(userName)
Ejemplo n.º 22
0
class Test_032_Select_and_deselect_random_options:
    baseURL = ReadConfig.get_CM_UI_Roles()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.createrole
    def test_Select_and_deselect_random_options_032(self,setup):
        self.logger.info("****************  Test_032 : select and deselect the random options and close ****************")
        print(
            "In Description : TestCase_032 : select and deselect the random options and close ")
        self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164224?projectId=50")
        print("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164224?projectId=50")
        self.driver=setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()
        self.RolesList = roles(self.driver)
        self.RolesList.select_roles()
        time.sleep(3)
        self.RolesList.verify_AdminCentral_RolesList_header()
        self.RolesList.select_add_role_button()
        self.RolesList.select_system_from_dropdown()
        self.RolesList.send_Random_RoleName()
        self.RolesList.select_Random_roles_checkboxes()
        self.RolesList.select_Random_roles_checkboxes()
        # self.RolesList.select_save_button()
        try:
            self.RolesList.select_add_role_button()
        except Exception:
            self.RolesList.capture_screenshot()
            self.RolesList.select_add_role_button()
        self.driver.quit()
class Test_040_AddRole_Popup_Text:
    baseURL = ReadConfig.get_CM_UI_Roles()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.createrole
    def test_add_role_popup_text_040(self, setup):
        self.logger.info(
            "****************  Test_040 : Test CreateRole when user Click ADD button and verify addrole popup text ****************"
        )
        print(
            "In Description : Test_040 : Test CreateRole when user Click ADD button and verify addrole popup text "
        )
        self.logger.info(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164224?projectId=50"
        )
        print(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164224?projectId=50"
        )

        self.driver = setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()
        self.RolesList = roles(self.driver)
        self.RolesList.select_roles()
        time.sleep(2)
        self.RolesList.verify_AdminCentral_RolesList_header()
        self.RolesList.select_add_role_button()
        self.RolesList.verify_all_the_text_in_addrole_popup()
        self.driver.close()
class Test_005_Select_Activate_Button_keyBoard_shift_tab:
    baseURL = ReadConfig.get_CM_UI_Roles()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.activate_deactivate_button
    def test_select_activate_button_keyboard_shift_tab_005(self, setup):
        self.logger.info(
            "**************** IN description:: TestCase_005 : Test Activate option when user access with  Keyboard Shift+Tabbing. ****************"
        )
        self.logger.info(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164257?projectId=50"
        )
        print(
            "**************** IN description:: TestCase_005 : Test Activate option when user access with  Keyboard Shift+Tabbing. ****************"
        )
        print(
            "Jama link::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164257?projectId=50"
        )
        self.driver = setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()
        time.sleep(5)
        self.user = users(self.driver)
        self.user.select_users_Link()
        self.user.select_activate_button()
        self.user.select_close_x()
        self.driver.close()
class Test_061_CreateUser_Password_ConfirmPassword_Empty:
    baseURL = ReadConfig.get_CM_UI_Users()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.createuser
    def test_createUser_password_confirmPassword_empty_061(self,setup):
        self.logger.info("****************  Test_061:: Test CreateUser by sending password & CreatePassword as empty ****************")
        self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164248?projectId=50")
        print("****************  Test_061:: Test CreateUser by sending password & CreatePassword as empty ****************")
        print("Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164248?projectId=50")
        self.driver=setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()

        self.user = users(self.driver)
        self.user.select_users_Link()

        self.user.select_edit_button()
        self.user.send_password_empty()
        self.user.send_confirmPassword_empty()
        self.user.select_save_button()
        try:
            self.user.select_edit_button()
        except Exception:
            self.user.capture_screenshot()
            self.user.select_edit_button()
        self.driver.quit()
Ejemplo n.º 26
0
Archivo: .py Proyecto: vijaymandava/rmb
def test_updateUser_multipleEmail_without_atTheRate_020():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info(
        "****************  Test_020: Test updateUser when user sends  -  MultipleEmail without @ ****************"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )
    print(
        "****************  Test_020: Test updateUser when user sends  -  MultipleEmail without @ ****************"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )

    # Body
    list = com.getUsersList()
    userName = random.choice(list)
    print("Updating user ::", userName)

    file = open("./tests_admin/testCases/update_user_api.json", 'r')
    body = json.loads(file.read())
    body['userName'] = userName
    body['emailAddress'] = "aabc.com;ab.com"

    com.update_user_negative(body, userName)

    com.verify_updated_user_from_sm_with_api(userName)
Ejemplo n.º 27
0
class Test_007_UpdateRole_Mouse:
    baseURL = ReadConfig.get_CM_UI_Roles()
    logger = LogGen.loggen()

    @pytest.mark.regression
    @pytest.mark.test_portal
    @pytest.mark.updaterole
    def test_updateRole_mouse_007(self, setup):
        self.logger.info(
            "****************  Test_007 : Test UpdateRole when user  access with Mouse Hover ****************"
        )
        self.logger.info(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50"
        )
        print(
            "****************  Test_007 : Test UpdateRole when user  access with Mouse Hover ****************"
        )
        print(
            "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50"
        )
        self.driver = setup
        self.driver.get(self.baseURL)
        self.login = admin_central_login(self.driver)
        self.login.admin_login()

        self.RolesList = roles(self.driver)
        self.RolesList.select_roles()
        time.sleep(10)

        self.RolesList.verify_AdminCentral_RolesList_header()
        self.RolesList.select_edit_role_button()
        self.RolesList.selectAll_checkbox()
        self.RolesList.select_save_button()
        time.sleep(2)
        self.RolesList.search_toastify()
def test_updateUser_userRole_Operator_046():
    logger = LogGen.loggen()
    com = common_updateUser_api()
    logger.info(
        "****************  Test_046: Test Default fieldService and its default User Role Settings ****************"
    )
    logger.info(
        "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )
    print(
        "****************  Test_046: Test Default fieldService and its default User Role Settings ****************"
    )
    print(
        "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164311?projectId=50"
    )

    userName = '******'
    print("Updating userName  :: Operator")

    file = open("./tests_admin/testCases/update_user_api.json", 'r')
    body = json.loads(file.read())
    body['userName'] = userName
    body['userRoleName'] = userName

    com.update_user_negative(body, userName)

    com.verify_updated_user_from_sm_with_api(userName)
Ejemplo n.º 29
0
def test_Create_defaultRole_028():
    logger = LogGen.loggen()
    com = Common_role_api()
    logger.info(
        "****************  In Description :TestCase_028: Test CreateRole for by giving default userRoleName(Administrator/Operator/Fieldservice) ****************"
    )
    print(
        "In Description :Testcase_028: Test CreateRole for by giving default userRoleName(Administrator/Operator/Fieldservice)"
    )
    logger.info(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )
    print(
        "Jama link: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164299?projectId=50"
    )

    list = {"Administrator", "FieldService", "Operator"}
    for roleName in list:
        print("\n Trying to create roleName ::", roleName)

        files = readFiles()
        body = files.create_role_body()
        body['userRoleName'] = roleName

        com.create_role_negative(body, roleName)

        com.verify_roles_from_sm_with_api(roleName)

    logger.info("****************  Role not created ****************")
Ejemplo n.º 30
0
def test_createUser_lastName_empty_034():
    logger = LogGen.loggen()
    com = common_createUser_api()
    logger.info(
        "****************  Test_034: Test CreateUser when user sends  - Lastname empty ****************"
    )
    print(
        "In Description :Test_034: Test CreateUser when user sends  - Lastname empty"
    )
    logger.info(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )
    print(
        "Jama Link :: https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164308?projectId=50"
    )

    # Body
    user = username_field_validations()
    userName = user.username_regex()
    file_body = readFiles()
    body = file_body.create_user_body()
    body['lastName'] = ""
    body['userName'] = userName

    com.create_user_negative(body, userName)

    com.verify_users_from_sm_with_api(userName)