public void AddRoleTypeWithDefaultFunctionScope(RoleTypePermissionData input) { int i = 0; int j = 0; // Click "+角色" to add a new role type RoleTypeSettings.ClickAddFunctionRoleType(); TimeManager.ShortPause(); //Fill input data RoleTypeSettings.FillInName(input.InputData.CommonName); TimeManager.ShortPause(); // Click "保存" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); RoleTypeSettings.FocusOnUserType(input.InputData.CommonName); TimeManager.ShortPause(); //Assert.IsTrue(RoleTypeSettings.IsPermissionItemChecked()); // Verfiy the public permissions are checked while (i < 4) { Assert.IsTrue(RoleTypeSettings.IsPublicPermissionItemChecked(input.InputData.publicPermission[1])); i++; } while (j < 1) { Assert.IsFalse(RoleTypeSettings.IsCustomerizePermissionItemChecked(input.InputData.roleTypePermission[j])); j++; } }
public void ModifyRoleToExist(RoleTypePermissionData input) { int i = 0; int length = input.InputData.NameList.Length; while (i < length) { // Focus a role type RoleTypeSettings.FocusOnUserType(input.InputData.CommonName); RoleTypeSettings.ClickModifyButton(); TimeManager.ShortPause(); //Fill input data RoleTypeSettings.FillInName(input.InputData.NameList[i]); TimeManager.ShortPause(); // Click "保存" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Verify the error message Assert.IsTrue(RoleTypeSettings.IsUserNameInvalid()); Assert.IsTrue(RoleTypeSettings.IsUserNameInvalidMsgCorrect(input.ExpectedData)); TimeManager.ShortPause(); RoleTypeSettings.ClickCancelButton(); TimeManager.ShortPause(); i = i + 1; } }
public void AddFunctionScope(RoleTypePermissionData input) { int i = 0; int j = 0; // Click "+角色" to add a new role type RoleTypeSettings.ClickAddFunctionRoleType(); TimeManager.ShortPause(); //Fill input data RoleTypeSettings.FillInName(input.InputData.CommonName); TimeManager.ShortPause(); //Check permission items while (j < input.InputData.NameList.Length) { RoleTypeSettings.Check(input.InputData.NameList[j]); j++; } //Click some functions from function scope. RoleTypeSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //The RoleType and FunctionRoleType add to FunctionRoleType list successfully. while (i < input.InputData.publicPermission.Length) { RoleTypeSettings.IsPublicPermissionItemChecked(input.InputData.publicPermission[i]); i++; } j = 0; while (j < input.InputData.NameList.Length) { RoleTypeSettings.IsCustomerizePermissionItemChecked(input.InputData.NameList[j]); j++; } }
public void DeleteRoleType(RoleTypePermissionData input) { // Focus a function role type to delete RoleTypeSettings.FocusOnUserType(input.InputData.CommonName); TimeManager.ShortPause(); //Delete the role type RoleTypeSettings.ClickDeleteButton(); //Verify that the message 'Are your sure to delete the role type?' is displayed on message box. Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.ExpectedData.Message[0])); //Click GiveUp button to cancel the deletion. JazzMessageBox.MessageBox.GiveUp(); TimeManager.ShortPause(); //Verify the role type not deleted and still exists RoleTypeSettings.FocusOnUserType(input.InputData.CommonName); Assert.IsTrue(RoleTypeSettings.IsRoleTypeOnListByName(input.InputData.CommonName)); // Delete the role type again RoleTypeSettings.ClickDeleteButton(); //Verify that the message 'Are your sure to delete the role type?' is displayed on message box. Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.ExpectedData.Message[0])); //Click Delete button to confirm the deletion. JazzMessageBox.MessageBox.Delete(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); //Verify the role type is deleted successfully and not exists Assert.IsFalse(RoleTypeSettings.IsRoleTypeOnListByName(input.InputData.CommonName)); }
public void AllFieldsEmpty(RoleTypePermissionData input) { // Click "+角色" to add a new role type RoleTypeSettings.ClickAddFunctionRoleType(); TimeManager.ShortPause(); // Click "保存" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Verify the error message RoleTypeSettings.IsUserNameInvalid(); Assert.IsTrue(RoleTypeSettings.IsUserNameInvalidMsgCorrect(input.ExpectedData)); }
public void AllFieldsEmpty(RoleTypePermissionData input) { // Focus a role type RoleTypeSettings.FocusOnUserType(input.InputData.CommonName); RoleTypeSettings.ClickModifyButton(); TimeManager.ShortPause(); RoleTypeSettings.FillInName(""); RoleTypeSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Verify the error message RoleTypeSettings.IsUserNameInvalid(); Assert.IsTrue(RoleTypeSettings.IsUserNameInvalidMsgCorrect(input.ExpectedData)); }
public void AddRoleTypeAndCancel(RoleTypePermissionData input) { // Click "+角色" to add a new role type RoleTypeSettings.ClickAddFunctionRoleType(); TimeManager.ShortPause(); //Fill input data RoleTypeSettings.FillInName(input.InputData.CommonName); TimeManager.ShortPause(); // Click "放弃" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickCancelButton(); //JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Verify RoleTypeSettings.IsRoleTypeOnListByName(input.InputData.CommonName); }
public void AddInvalidRoleType(RoleTypePermissionData input) { // Click "+角色" to add a new role type RoleTypeSettings.ClickAddFunctionRoleType(); TimeManager.ShortPause(); //Fill input data RoleTypeSettings.FillInName(input.InputData.CommonName); TimeManager.ShortPause(); // Click "保存" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); //Verify the error message //Assert.IsTrue(RoleTypeSettings.IsUserNameInvalid()); Assert.IsTrue(RoleTypeSettings.IsUserNameInvalidMsgCorrect(input.ExpectedData)); }
public void ModifyFunctionScopeSuccess(RoleTypePermissionData input) { // Focus a role type RoleTypeSettings.FocusOnUserType(input.InputData.CommonName); RoleTypeSettings.ClickModifyButton(); TimeManager.ShortPause(); int i = 0; while (i < input.InputData.NameList.Length) { RoleTypeSettings.UnCheck(input.InputData.NameList[i]); RoleTypeSettings.Check(input.InputData.NameList[i]); i++; } int j = 0; while (j < input.InputData.permissions.Length) { RoleTypeSettings.Check(input.InputData.permissions[j]); RoleTypeSettings.UnCheck(input.InputData.permissions[j]); j++; } // Click "保存" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Verify // Verify pubic permissions checked Assert.IsTrue(RoleTypeSettings.ArePublicPermissionItemsChecked()); // verify other permissions i = 0; while (i < input.InputData.NameList.Length) { Assert.IsTrue(RoleTypeSettings.IsCustomerizePermissionItemChecked(input.InputData.NameList[i])); i++; } j = 0; while (j < input.InputData.NameList.Length) { Assert.IsFalse(RoleTypeSettings.IsCustomerizePermissionItemChecked(input.InputData.permissions[j])); j++; } }
public void ModifyAndThenCancel(RoleTypePermissionData input) { // Focus a role type RoleTypeSettings.FocusOnUserType(input.InputData.CommonName); RoleTypeSettings.ClickModifyButton(); TimeManager.ShortPause(); int i = 0; //Click some functions without "√" from function scope. while (i < input.InputData.NameList.Length) { RoleTypeSettings.UnCheck(input.InputData.NameList[i]); RoleTypeSettings.Check(input.InputData.NameList[i]); i++; } int j = 0; while (j < input.InputData.permissions.Length) { RoleTypeSettings.Check(input.InputData.permissions[j]); RoleTypeSettings.UnCheck(input.InputData.permissions[j]); j++; } // Click "保存" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickCancelButton(); TimeManager.ShortPause(); //Verify // Verify pubic permissions checked Assert.IsTrue(RoleTypeSettings.ArePublicPermissionItemsChecked()); // verify other permissions i = 0; while (i < input.InputData.NameList.Length) { Assert.IsTrue(RoleTypeSettings.IsCustomerizePermissionItemChecked(input.InputData.NameList[i])); i++; } j = 0; while (j < input.InputData.NameList.Length) { Assert.IsFalse(RoleTypeSettings.IsCustomerizePermissionItemChecked(input.InputData.permissions[j])); j++; } }
public void ModifyRoleTypeAndCancel(RoleTypePermissionData input) { string roleTypeName = "RoleTypeForModify"; // Focus a role type RoleTypeSettings.FocusOnUserType(roleTypeName); RoleTypeSettings.ClickModifyButton(); TimeManager.ShortPause(); // problem here @@@@@@@@@@@@@@ Problem here //Fill input data RoleTypeSettings.FillInName(input.InputData.CommonName); TimeManager.ShortPause(); // Click "放弃" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickCancelButton(); //JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Verify Assert.IsFalse(RoleTypeSettings.IsRoleTypeOnListByName(input.InputData.CommonName)); }
public void ModifyInvalidRoleType(RoleTypePermissionData input) { string roleTypeName = "RoleTypeForModify"; // Focus a role type RoleTypeSettings.FocusOnUserType(roleTypeName); RoleTypeSettings.ClickModifyButton(); TimeManager.ShortPause(); //Fill input data RoleTypeSettings.FillInName(input.InputData.CommonName); TimeManager.ShortPause(); // Click "保存" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Verify the error message Assert.IsTrue(RoleTypeSettings.IsUserNameInvalid()); Assert.IsTrue(RoleTypeSettings.IsUserNameInvalidMsgCorrect(input.ExpectedData)); }
public void DeleteRoleTypeFailedWhenAssociated(RoleTypePermissionData input) { // Focus a function role type to delete RoleTypeSettings.FocusOnUserType(input.InputData.CommonName); TimeManager.ShortPause(); //Delete the role type RoleTypeSettings.ClickDeleteButton(); //Verify that the message 'Are your sure to delete the role type?' is displayed on message box. Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.ExpectedData.Message[0])); //Click Delete button to confirm the deletion. JazzMessageBox.MessageBox.Delete(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); //Verify that the message 'The role type has been used and can't be deleted.' is displayed on message box. Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.ExpectedData.Message[1])); //Close the message box. JazzMessageBox.MessageBox.Close(); //Verify the role type not deleted and still exists Assert.IsTrue(RoleTypeSettings.IsRoleTypeOnListByName(input.InputData.CommonName)); }
public void PublicFunctionUncheck(RoleTypePermissionData input) { int i, j, s = 0; while (s < input.InputData.NameList.Length) { // Focus a role type RoleTypeSettings.FocusOnUserType(input.InputData.NameList[s]); RoleTypeSettings.ClickModifyButton(); TimeManager.ShortPause(); for (i = 0; i < 4; i++) { Assert.IsTrue(RoleTypeSettings.IsPermissionItemDisabled(input.InputData.publicPermission[i])); } for (j = 0; j < input.InputData.customerizePermission.Length; j++) { Assert.IsFalse(RoleTypeSettings.IsPermissionItemDisabled(input.InputData.customerizePermission[j])); } RoleTypeSettings.ClickCancelButton(); s++; } }
public void AddFunctionScopeCancel(RoleTypePermissionData input) { int i = 0; //Check permission items while (i < input.InputData.NameList.Length) { // Click "+角色" to add a new role type RoleTypeSettings.ClickAddFunctionRoleType(); TimeManager.ShortPause(); //Fill input data RoleTypeSettings.FillInName(input.InputData.CommonName); TimeManager.ShortPause(); RoleTypeSettings.Check(input.InputData.NameList[i]); // Click "保存" button without input FunctionRoleType and function scope. RoleTypeSettings.ClickCancelButton(); TimeManager.ShortPause(); //Verify Assert.IsFalse(RoleTypeSettings.IsRoleTypeOnListByName(input.InputData.CommonName)); i++; } }