示例#1
0
 def test_roleName_Html_018(self, setup):
     self.logger.info(
         "****************  test_018 ::  Test CreateRole when user sends 'userRoleName' with values ::  HTML characters ****************"
     )
     print(
         "In Description : TestCase_018 ::  Test CreateRole when user sends 'userRoleName' with values ::  HTML characters "
     )
     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.select_add_role_button()
     self.RolesList.select_system_from_dropdown()
     data = "<fieldset name='a'>Name: <input type='text'><br>"
     print("String is :::", data)
     self.RolesList.send_userrole_runtime(data)
     self.RolesList.select_Random_roles_checkboxes()
     self.RolesList.select_save_button()
     self.RolesList.verify_username_error()
     try:
         self.RolesList.select_Random_roles_checkboxes()
     except Exception:
         self.RolesList.capture_screenshot()
         self.RolesList.select_Random_roles_checkboxes()
     self.driver.quit()
    def test_total_checkboxes_043(self, setup):
        self.logger.info(
            "****************  Test_043 : Test CreateRole when user Click ADD button and verify total check boxes ****************"
        )
        print(
            "In Description : Test_043 : Test CreateRole when user Click ADD button and verify total checkboxes "
        )
        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.total_checkboxes()
        len = self.RolesList.total_checkboxes_size()
        assert len == 43
        self.driver.close()
    def test_updateRole_select_edit_select_close_002(self,setup):
        self.logger.info("****************  Test_002 : Test UpdateRole when user  - Click 'Edit' button and cancel role. ****************")
        self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50")
        print("****************  Test_002 : Test UpdateRole when user  - Click 'Edit' button and cancel role. ****************")
        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(5)

        self.RolesList.verify_AdminCentral_RolesList_header()
        self.RolesList.select_edit_role_button()
        self.RolesList.select_close_button()
        time.sleep(2)

        try:
           self.RolesList.select_edit_role_button()
        except Exception:
            self.RolesList.verify_error()
            self.RolesList.capture_screenshot()
            self.RolesList.select_edit_role_button()

        self.driver.quit()
示例#4
0
    def test_updateRole_selectAll_twoTimes_012(self, setup):
        self.logger.info(
            "****************  Test_012 : Test Update Role when user selects “select all” two times(Unchecks all) and saves. ****************"
        )
        self.logger.info(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50"
        )
        print(
            "****************  Test_012 : Test Update Role when user selects “select all” two times(Unchecks all) and saves. ****************"
        )
        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.selectAll_checkbox()
        self.RolesList.select_save_button()
        time.sleep(2)
        self.RolesList.search_toastify_edit_success()
        self.driver.close()
 def test_cross_x_button_006(self, setup):
     self.logger.info(
         "****************  Test_006: Test CreateRole when userClick ADD button and select cross(*) button  ****************"
     )
     print(
         "In Description : TestCase_006: Test CreateRole when userClick ADD button and select cross(*) button."
     )
     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_closeSymbol_mark()
     try:
         self.RolesList.select_add_role_button()
     except Exception:
         self.RolesList.capture_screenshot()
         self.RolesList.select_add_role_button()
     self.driver.quit()
    def test_createRole_after_zoom_010(self, setup):
        self.logger.info("****************  Test_010 : Test CreateRole after zoom ****************")
        print("In Description : TestCase_010: Test CreateRole after zoom")
        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()
        time.sleep(10)
        self.RolesList = roles(self.driver)
        self.RolesList.select_roles_after_zoom()
        time.sleep(2)
        self.RolesList.verify_AdminCentral_RolesList_header()
        self.RolesList.select_add_role_button_after_zoom()
        self.RolesList.select_system_from_dropdown()
        creating_role = self.RolesList.send_Random_RoleName()
        self.RolesList.selectAll_checkbox_after_zoom()
        self.RolesList.select_save_button_after_zoom()
        self.RolesList.search_toastify(creating_role)
        self.RolesList.verify_cm_ui_positive(creating_role)
        try:
            self.RolesList.select_add_role_button()
        except Exception:
            self.RolesList.capture_screenshot()
            self.RolesList.select_add_role_button()
        self.driver.quit()
    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()
 def test_roleName_Empty_021(self, setup):
     self.logger.info(
         "****************  test_021 ::  Test CreateRole when user sends 'userRoleName' with values :: blank input ****************"
     )
     print(
         "In Description : TestCase_021 ::  Test CreateRole when user sends 'userRoleName' with values :: blank input."
     )
     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.select_add_role_button()
     self.RolesList.select_system_from_dropdown()
     data = " "
     print("String is :::", data)
     self.RolesList.send_userrole_runtime(data)
     self.RolesList.select_Random_roles_checkboxes()
     self.RolesList.select_save_button()
     self.RolesList.search_toastify(data)
     time.sleep(1)
     try:
         self.RolesList.select_Random_roles_checkboxes()
     except Exception:
         self.RolesList.capture_screenshot()
         self.RolesList.select_Random_roles_checkboxes()
     self.driver.quit()
    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()
    def test_connected_systems_addRole_038(self, setup):
        self.logger.info(
            "****************  Test_038 : Test CreateRole when user Click ADD button and verify Connected Systems in AddRole popup. ****************"
        )
        print(
            "In Description : Test_038 : Test CreateRole when user Click ADD button and verify Connected Systems AddRole popup. "
        )
        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()
        time.sleep(10)
        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.system_options()
 def test_roleName_selectAllOptions_uncheck_few_030(self, setup):
     self.logger.info(
         "****************  Test_030 - Test CreateRole when user selects “select all” option and unchecks some and save. ****************"
     )
     print(
         "In Description : TestCase_030 : Test CreateRole when user selects “select all” option and unchecks some and save."
     )
     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()
     creating_role = self.RolesList.send_Random_RoleName()
     self.RolesList.select_Random_roles_checkboxes()
示例#12
0
    def test_updateRole_select_deselect_random_options_010(self, setup):
        self.logger.info(
            "****************  Test_010 : Test UpdateRole when user  - select  and deselect the random options. ****************"
        )
        self.logger.info(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50"
        )
        print(
            "****************  Test_010 : Test UpdateRole when user  - select  and deselect the random options. ****************"
        )
        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.select_Random_roles_checkboxes()
        self.RolesList.select_save_button()
        time.sleep(2)
        self.RolesList.search_toastify_edit_success()
        self.driver.close()
示例#13
0
 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()
示例#14
0
    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()
示例#15
0
    def test_roleName_alphabets_numbers_017(self, setup):
        self.logger.info(
            "****************  Test_017: Test CreateRole when user sends 'userRoleName' with values :: Characters(Mix of Alphabets and Numbers) ****************")
        print(
            "In Description : TestCase_017: Test CreateRole when user sends 'userRoleName' with values :: Characters(Mix of Alphabets and Numbers).")
        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.select_add_role_button()
        self.RolesList.select_system_from_dropdown()

        def randStr(chars=string.ascii_uppercase + string.ascii_lowercase, N=8):
            return ''.join(random.choice(chars) for _ in range(N))

        data = randStr(N=20)
        print("String is :::", data)
        self.RolesList.send_userrole_runtime(data)
        self.RolesList.select_Random_roles_checkboxes()
        self.RolesList.select_save_button()
        self.RolesList.search_toastify(data)
        self.RolesList.verify_cm_ui_positive(data)
        com = Common_role_portal()
        com.verify_roles_from_sm_with_api(data)
        try:
            self.RolesList.select_add_role_button()
        except Exception:
            self.RolesList.capture_screenshot()
            self.RolesList.select_add_role_button()
        self.driver.quit()
    def test_connected_systems_editRole_not_selectable_015(self, setup):
        self.logger.info(
            "****************  Test_015 : Test edit role system options not selectable. ****************"
        )
        print(
            "In Description : Test_015 : Test edit role system options not selectable "
        )
        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()
        time.sleep(10)
        self.RolesList = roles(self.driver)
        self.RolesList.select_roles()
        time.sleep(2)
        self.RolesList.verify_AdminCentral_RolesList_header()
        self.RolesList.select_edit_role_button()
        self.RolesList.system_options()
        self.RolesList.select_system_from_dropdown()
        self.driver.close()
示例#17
0
 def test_roleName_RegEx_033(self,setup):
     self.logger.info("****************  Test_033: test Role name RegEx  ****************")
     print(
         "In Description : TestCase_033: test Role name RegEx")
     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()
     creating_role = self.RolesList.send_Random_RoleName()
     self.RolesList.select_Random_roles_checkboxes()
     self.RolesList.select_save_button()
     self.RolesList.search_toastify(creating_role)
     self.RolesList.verify_cm_ui_positive(creating_role)
     com = Common_role_portal()
     com.verify_roles_from_sm_with_api(creating_role)
     try:
         self.RolesList.select_add_role_button()
     except Exception:
         self.RolesList.capture_screenshot()
         self.RolesList.select_add_role_button()
     self.driver.quit()
 def test_selectDelete_and_x_003(self, setup):
     self.logger.info("****************  Test_003 :Test DeleteRole when user Click 'Delete' button and cross(x) button. ****************")
     self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164245?projectId=50")
     print("****************  Test_003 :Test DeleteRole when user Click 'Delete' button and cross(x) button. ****************")
     print(
         "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164245?projectId=50")
     self.driver = setup
     self.driver.get(self.baseURL)
     self.RolesList = roles(self.driver)
     self.RolesList.select_delete_role_button()
     self.RolesList.select_closeSymbol_mark()
示例#19
0
    def test_editRole_header_014(self,setup):
        self.logger.info("****************  Test_014 : Test edit role header ****************")
        print("In Description : Test_14 : test edit role header. ")
        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()
        self.RolesList.select_edit_role_button()
        self.driver.close()
 def test_roleName_CreatedRole_in_CreateUsers_029(self, setup):
     self.logger.info(
         "****************  Test_029 - Test that Created Role is displayed in the Role option while Creating User ****************"
     )
     print(
         "In Description : TestCase_029 - Test that Created Role is displayed in the Role option while Creating User"
     )
     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()
     creating_role = self.RolesList.send_Random_RoleName()
     self.RolesList.selectAll_checkbox()
     self.RolesList.select_save_button()
     time.sleep(2)
     self.RolesList.search_toastify(creating_role)
     self.RolesList.verify_cm_ui_positive(creating_role)
     com = Common_role_portal()
     com.verify_roles_from_sm_with_api(creating_role)
     list = self.RolesList.verify_Roles_in_SM()
     print(list)
     if list.__contains__(creating_role):
         print("Role present in the SM UI")
     else:
         print("Role not present in the SM UI")
     self.UserList = users(self.driver)
     self.UserList.select_users_Link()
     time.sleep(5)
     self.UserList.select_add_button()
     self.UserList.select_system_dropdown()
     UserRolelist = self.UserList.select_Role_dropdown()
     if UserRolelist.__contains__(creating_role):
         print("Role present")
     else:
         print("Role not present ")
     self.driver.close()
    def test_roleName_systemOptions_028(self, setup):
        self.logger.info(
            "****************  Test_028 - Test CreateRole when user click Add button and test 'System' options. ****************"
        )
        print(
            "In Description : TestCase_028 - Test CreateRole when user click Add button and test 'System' options."
        )
        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()
        creating_role = self.RolesList.send_Random_RoleName()
        self.RolesList.selectAll_checkbox()
        self.RolesList.select_save_button()
        time.sleep(2)
        self.RolesList.search_toastify(creating_role)
        self.RolesList.verify_cm_ui_positive(creating_role)
        com = Common_role_portal()
        com.verify_roles_from_sm_with_api(creating_role)

        list = self.RolesList.verify_Roles_in_SM()
        # print(list)
        if list.__contains__(creating_role):
            print("Role present in the SM UI")
        else:
            print("Role not present in the SM UI")
        try:
            self.RolesList.select_add_role_button()
        except Exception:
            self.RolesList.capture_screenshot()
            self.RolesList.select_add_role_button()
            self.driver.quit()
        self.driver.quit()
    def test_roleName_dateFormat_026(self, setup):
        self.logger.info(
            "****************  test_026 ::  Test CreateRole when user sends 'userRoleName' with values :: date format ****************"
        )
        print(
            "In Description : TestCase_026 ::  Test CreateRole when user sends 'userRoleName' with values :: date format"
        )
        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.select_add_role_button()
        self.RolesList.select_system_from_dropdown()

        from datetime import date

        d1 = date.today()

        print("Today's date:", d1)

        self.RolesList.send_userrole_runtime(str(d1))
        self.RolesList.select_Random_roles_checkboxes()
        self.RolesList.select_save_button()
        self.RolesList.search_toastify(d1)
        self.RolesList.verify_cm_ui_positive(d1)
        com = Common_role_portal()
        com.verify_roles_from_sm_with_api(d1)
        time.sleep(1)
        try:
            self.RolesList.select_add_role_button()
        except Exception:
            self.RolesList.capture_screenshot()
            self.RolesList.select_add_role_button()
        self.driver.quit()
    def test_updateRole_select_x_004(self,setup):
        self.logger.info("****************  Test_004 : Test UpdateRole when user  - Click 'Edit' button and select * button ****************")
        self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50")
        print("****************  Test_004 : Test UpdateRole when user  - Click 'Edit' button and select * button ****************")
        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.select_closeSymbol_mark()
        self.RolesList.select_edit_role_button()
        self.driver.close()
示例#24
0
    def test_UpdateRole_DefaultRoles_013(self,setup):
        self.logger.info("****************  Test_013 : Test UpdateRole by updating default roles (Administator/operator/fieldservice) ****************")
        self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50")
        print("****************  Test_013 : Test UpdateRole by updating default roles (Administator/operator/fieldservice) ****************")
        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_default_roles()
        self.RolesList.selectAll_checkbox()
        self.RolesList.select_save_button()
        time.sleep(2)
        self.RolesList.search_toastify_edit_success()
        self.driver.close()
示例#25
0
    def test_MaxLength(self, setup):
        self.logger.info(
            "****************  Test_011 :Test CreateRole when user sends userRoleName with maximum value(50) ****************"
        )
        print(
            "In Description : TestCase_011: Test CreateRole when user sends userRoleName with maximum value(50)"
        )
        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.select_add_role_button()
        self.RolesList.select_system_from_dropdown()
        # self.RolesList.send_Random_RoleName()
        role = username_field_validations()
        data = role.username_max_characters()
        self.RolesList.send_userrole_runtime(data)
        self.RolesList.select_Random_roles_checkboxes()
        self.RolesList.select_save_button()
        self.RolesList.search_toastify(data)
        self.RolesList.verify_cm_ui_positive(data)
        com = Common_role_portal()
        com.verify_roles_from_sm_with_api(data)
        time.sleep(1)
        try:
            self.RolesList.select_add_role_button()
        except Exception:
            self.RolesList.capture_screenshot()
            self.RolesList.select_add_role_button()

        self.driver.quit()
    def test_roleName_ApartFrom_RegEx_034(self, setup):
        self.logger.info(
            "****************  Test_034 :: Test CreateRole by sending the userRoleName apart from  ^[a-zA-Z0-9\-_()'.#\\+ ]*$  (ex:- ?,@ etc.,)  ****************"
        )
        print(
            "In Description : TestCase_034 :: Test CreateRole by sending the userRoleName apart from  ^[a-zA-Z0-9\-_()'.#\\+ ]*$  (ex:- ?,@ etc.,)  "
        )
        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()
        list = {
            ".", "!", "@", "=", "$", "%", "^", "&", "*", "~", ":", ";", "/",
            "/", "?", "]", "[", "|"
        }
        for i in list:
            print(i)
            self.RolesList.send_userrole_runtime(i)
            self.RolesList.select_save_button()
            time.sleep(5)
            try:
                self.RolesList.get_error()
            except Exception:
                self.RolesList.capture_screenshot()
                self.RolesList.select_save_button()
        self.driver.quit()
 def test_roleName_decimalNumbers_025(self, setup):
     self.logger.info(
         "****************  test_025 ::  Test CreateRole when user sends 'userRoleName' with values :: decimal numbers ****************"
     )
     print(
         "In Description : TestCase_025 ::  Test CreateRole when user sends 'userRoleName' with values :: decimal numbers "
     )
     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.select_add_role_button()
     self.RolesList.select_system_from_dropdown()
     number = random.randint(00000, 99999)
     data = str(number) + "." + str(number)
     print("String is :::", data)
     self.RolesList.send_userrole_runtime(data)
     self.RolesList.select_Random_roles_checkboxes()
     self.RolesList.select_save_button()
     self.RolesList.search_toastify(data)
     self.RolesList.verify_cm_ui_positive(data)
     time.sleep(1)
     try:
         self.RolesList.select_add_role_button()
     except Exception:
         self.RolesList.capture_screenshot()
         self.RolesList.select_add_role_button()
         self.driver.quit()
     self.driver.quit()
示例#28
0
    def test_MaxPlusOne_012(self, setup):
        self.logger.info(
            "****************  Test_012 :Test CreateRole when user sends userRoleName with Maximum+1 value(51) ****************"
        )
        print(
            "In Description : TestCase_012: Test CreateRole when user sends userRoleName with Maximum+1 value(51)."
        )
        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.select_add_role_button()
        self.RolesList.select_system_from_dropdown()

        def randStr(chars=string.ascii_uppercase, N=8):
            return ''.join(random.choice(chars) for _ in range(N))

        data = randStr(N=35)
        print("String is :::", data)
        self.RolesList.send_userrole_runtime(data)
        self.RolesList.select_Random_roles_checkboxes()
        self.RolesList.select_save_button()
        time.sleep(1)
        try:
            self.RolesList.select_Random_roles_checkboxes()
        except Exception:
            self.RolesList.capture_screenshot()
            self.RolesList.select_Random_roles_checkboxes()
        self.driver.quit()
    def test_updateRole_keyboard_shift_tab_006(self, setup):
        self.logger.info(
            "****************  Test_006 : Test UpdateRole when user  access with Keyboard Shift+Tab  ****************"
        )
        self.logger.info(
            "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50"
        )
        print(
            "****************  Test_006 : Test UpdateRole when user  access with Keyboard Shift+Tab  ****************"
        )
        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()
示例#30
0
 def test_deleteRole_001(self, setup):
     self.logger.info(
         "****************  Test_001_Test DeleteRole when user Click 'Delete' button. ****************"
     )
     self.logger.info(
         "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164245?projectId=50"
     )
     print(
         "****************  Test_001_Test DeleteRole when user Click 'Delete' button. ****************"
     )
     print(
         "Jama link is ::https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164245?projectId=50"
     )
     self.driver = setup
     self.driver.get(self.baseURL)
     self.login = admin_central_login(self.driver)
     self.login.admin_login()
     time.sleep(10)
     self.RolesList = roles(self.driver)
     self.RolesList.select_roles()
     self.RolesList.select_delete_role_button()
     self.RolesList.select_ok_button_deleteRole_popup()
     self.driver.close()