class Test_013_UpdateRole_DefaultRoles: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.updaterole 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()
class Test_002_UpdateRole_Select_Edit_Select_Close: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.updaterole 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()
class Test_011_UpdateRole_SelectAll_DeselectFew: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.updaterole def test_UpdateRole_selectALL_deselectFew_011(self,setup): self.logger.info("**************** Test_011 : Test UpdateRole when user selects “select all” option and unchecks some and save. ****************") self.logger.info("https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164242?projectId=50") print("**************** Test_011 : Test UpdateRole when user selects “select all” option and unchecks some and save. ****************") 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_Random_roles_checkboxes() self.RolesList.select_save_button() time.sleep(2) self.RolesList.search_toastify_edit_success() self.driver.close()
class Test_038_Connected_Systems_AddRole: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_010_CreateRole_After_Zoom: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
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_030_CreateRole_RoleName_SelectAllOptions_Uncheck_Few: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_001_DeleteRole: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.deleterole 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()
class Test_006_UpdateRole_Keyboard_Shift_Tab: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.updaterole 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()
class Test_043: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole def test_total_checkboxes_043(self, setup): self.logger.info( "**************** Test_043 : Test updateRole when user Click ADD button and verify total check boxes ****************") print("In Description : Test_043 : Test updateRole 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()
class Test_005_Select_close_button: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole def test_close_button_005(self, setup): self.logger.info( "**************** Test_005 : Test CreateRole when userClick ADD button and select close button ****************" ) print( "In Description : TestCase_005: Test CreateRole when userClick ADD button and select close 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() self.RolesList.verify_AdminCentral_RolesList_header() self.RolesList.select_add_role_button() self.RolesList.select_closeSymbol_mark() self.driver.close()
class Test_016_Select_Activate_and_Deactivate_Same_User: 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_and_deactivate_same_user_016(self, setup): self.logger.info( "**************** IN Description :TestCase_016:Test if user Deactivates a particular user and activates again and vice versa ****************" ) self.logger.info( "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164257?projectId=50" ) print( "**************** IN Description :TestCase_016:Test if user Deactivates a particular user and activates again and vice versa ****************" ) 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_ok_button() self.user.select_deactivate_button() self.user.select_ok_button() self.driver.close()
class Test_008_Select_DeActivate_Button_close: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.activate_deactivate_button def test_select_deactivate_button_008(self, setup): self.logger.info( "**************** IN Description: TestCase_008 : Test DeActivate option when user Click Deactivate button. ****************" ) self.logger.info( "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164257?projectId=50" ) print( "**************** IN Description : TestCase_008 : Test DeActivate option when user Click Deactivate button. ****************" ) 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_deactivate_button() self.driver.close()
class Test_004_UpdateRole_Select_X: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.updaterole 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()
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()
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()
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_002_DeleteRole_SelectDelete_CloseDeletePopup: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.deleterole def test_selectDelete_closeDeletePopup_002(self, setup): self.logger.info( "**************** Test_002 :Test DeleteRole when user Click 'Delete' button and cancel button. ****************" ) self.logger.info( "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164245?projectId=50" ) print( "**************** Test_002 :Test DeleteRole when user Click 'Delete' button and cancel 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_close_button()
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_015_Connected_Systems_EditRole_Not_Selectable: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_029_CreatedRole_in_CreateUsers: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_028_CreateRole_RoleName_SystemOptions: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_014_CreateUser_UserName_LowerCase: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createuser def test_userName_lowerCase_014(self, setup): self.logger.info( "**************** Test_014 Test CreateUser when user sends userName with values :: lowercase alphabets ****************" ) self.logger.info( "https://rapidmicrobiosystems.jamacloud.com/perspective.req#/testCases/164248?projectId=50" ) print( "**************** Test_014 Test CreateUser when user sends userName with values :: lowercase alphabets ****************" ) 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() def randStr(chars=string.ascii_lowercase, N=8): return ''.join(random.choice(chars) for _ in range(N)) data = randStr(N=54) print("String is :::", data) self.user.send_userName_runtime(data) self.user.send_firstname_textbox() self.user.send_middleinitial_textbox() self.user.send_lastname_textbox() self.user.send_emailaddress_textbox() self.user.send_telephonenumber_textbox() self.user.send_extension_textbox() self.user.send_same_password_and_confirmPassword() self.user.select_system_dropdown() self.user.select_Role_from_dropdown() self.user.select_save_button() self.user.verify_error() try: self.user.select_add_button() except Exception: self.user.capture_screenshot() self.user.select_add_button() self.driver.quit()
class Test_014_CreateRole_RoleName_UpperCase: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole def test_roleName_UpperCase_014(self, setup): self.logger.info( "**************** Test_014 :: Test CreateRole when user sends userRoleName with values :: uppercase alphabets ****************" ) print( "In Description : TestCase_014 :: Test CreateRole when user sends userRoleName with values :: uppercase alphabets " ) 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) time.sleep(3) try: self.RolesList.select_Random_roles_checkboxes() except Exception: self.RolesList.capture_screenshot() self.RolesList.select_Random_roles_checkboxes() self.driver.quit()
class Test_026_CreateRole_RoleName_dateFormat: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_011_CreateRole_RoleName_MaxLength: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_034_roleName_ApartFrom_RegEx: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_025_CreateRole_RoleName_DecimalNumbers: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_012_CreateRole_RoleName_MaxPlusOne: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole 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()
class Test_createRole_with_keyBoard_007: baseURL = ReadConfig.get_CM_UI_Roles() logger = LogGen.loggen() @pytest.mark.regression @pytest.mark.test_portal @pytest.mark.createrole def test_createRole_with_keyBoard_007(self, setup): self.logger.info( "**************** Test_007 : Test CreateRole when user use 'Key Board' ****************" ) print( "In Description : TestCase_007: Test CreateRole when user use 'Key Board'" ) 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_with_keyboard_tab() time.sleep(2) self.RolesList.verify_AdminCentral_RolesList_header() self.RolesList.select_add_role_button_with_keyboard_tab() self.RolesList.select_system_from_dropdown() creating_role = self.RolesList.send_Random_RoleName() self.RolesList.select_total_checkboxes_with_KeyBoard_tab() 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()