public void CheckSingleThenUnCheckAll(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); // Select 配置数据权限 link from customerA ,view status of created user 客户数据权限 UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.HierarchyNodePath); UserDataPermissionSettings.SaveTreeWindow(); //Check then uncheck "全部平台客户及对应数据权限" UserDataPermissionSettings.CheckAllCustomerDatas(); UserDataPermissionSettings.CheckAllCustomerDatas(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // Verify the hierarchy nodes are still checked @@@Temporary scripts@@@ Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void CheckSingleThenCheckAll(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); // Select 配置数据权限 link from customerA ,view status of created user 客户数据权限 UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.HierarchyNodePath); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); //Check "全部平台客户及对应数据权限" UserDataPermissionSettings.CheckAllCustomerDatas(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); // Verify the hierarchy nodes are checked UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void AddThenSwitch(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); TimeManager.ShortPause(); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); //Verify all customers checkbox is unchecked and "编辑数据权限" link is gray out and save button disable Assert.IsFalse(UserDataPermissionSettings.IsSaveButtonEnable()); Assert.IsTrue(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); //Check multiple customer checkbox from datascope. UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[1]); //Switch to function role type and back JazzFunction.FunctionRoleTypePermissionSettings.NavigatorToFunctionPermissionSettings(); TimeManager.LongPause(); JazzFunction.Navigator.NavigateToTarget(NavigationTarget.UserManagementUser); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); TimeManager.ShortPause(); UserDataPermissionSettings.SwitchToDataPermissionTab(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); // View the data permission Assert.IsTrue(UserDataPermissionSettings.IsCustomerUnchecked(input.InputData.CustomerList[0])); Assert.IsTrue(UserDataPermissionSettings.IsCustomerUnchecked(input.InputData.CustomerList[1])); }
public void CheckAllCustomerNamesThenView(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); TimeManager.ShortPause(); // check "客户名称" UserDataPermissionSettings.CheckAllCumstomerNames(); // Select 配置数据权限 link from customerA ,view 客户数据权限 Assert.False(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // All hierarchy nodes are unchecked Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesUnChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CancelTreeWindow(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //Verify UserDataPermissionSettings.ClickModifyButton(); TimeManager.LongPause(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); //IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(path)); TimeManager.MediumPause(); Assert.IsFalse(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void CheckAllNamesThenUncheck(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); //Check the hierarchy node all uncheck UserDataPermissionSettings.CheckAllCumstomerNames(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsFalse(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.HierarchyNodePath); TimeManager.ShortPause(); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); //Check then uncheck "全部平台客户及对应数据权限" UserDataPermissionSettings.CheckAllCumstomerNames(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // Verify the hierarchy nodes are checked Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void ModifyThenSwitch(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); // Check multiple customers UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[1]); //Switch to function role type and back JazzFunction.FunctionRoleTypePermissionSettings.NavigatorToFunctionPermissionSettings(); TimeManager.LongPause(); JazzFunction.Navigator.NavigateToTarget(NavigationTarget.UserManagementUser); TimeManager.LongPause(); JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); TimeManager.LongPause(); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); // View the data permission Assert.IsTrue(UserDataPermissionSettings.IsCustomerUnchecked(input.InputData.CustomerList[0])); Assert.IsTrue(UserDataPermissionSettings.IsCustomerUnchecked(input.InputData.CustomerList[1])); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // View the data permission Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void ModifyMultiToSingle(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); TimeManager.ShortPause(); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.MediumPause(); UserDataPermissionSettings.ClickModifyButton(); TimeManager.ShortPause(); // Check multiple customers UserDataPermissionSettings.UnCheckCustomer(input.InputData.CustomerList[0]); TimeManager.ShortPause(); UserDataPermissionSettings.UnCheckCustomer(input.InputData.CustomerList[1]); TimeManager.ShortPause(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[2]); TimeManager.ShortPause(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); // View the data permission Assert.IsFalse(UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0])); Assert.IsFalse(UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[1])); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[2]); TimeManager.ShortPause(); UserDataPermissionSettings.CloseTreeWindow(); TimeManager.ShortPause(); }
public void NodeTreeChanged(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); //Click Checkall(全选). Then select 配置数据权限 link from customerA. //UserDataPermissionSettings.CheckAllCumstomerNames(); //@@@@ ·All customers checked.·全部平台客户及对应数据权限 is unchecked. Assert.IsTrue(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); //Uncheck 全选 then 选择CustomerA, Then select 配置数据权限 link from customerA. UserDataPermissionSettings.UnCheckAllData(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.CheckHierarchyOrzNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); //全选 then Uncheck全选, 选择CustomerA Then select 配置数据权限 link from customerA again. //之前选择的hierarchy node of customerA still checked. UserDataPermissionSettings.CheckAllCumstomerNames(); UserDataPermissionSettings.UnCheckAllData(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // verify 之前选择的hierarchy node of customerA still checked. Assert.IsFalse(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); Assert.IsTrue(UserDataPermissionSettings.IsHierarchSiteNodeChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void ModifySingleToMultiply(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); // Check multiple customers UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[1]); UserDataPermissionSettings.UnCheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.CustomerList); UserDataPermissionSettings.SaveTreeWindow(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[1]); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.HierarchyNodePath); UserDataPermissionSettings.SaveTreeWindow(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); Assert.IsFalse(UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName)); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.CustomerList)); UserDataPermissionSettings.CloseTreeWindow(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[1]); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void ModifyMultiToAll(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); UserDataPermissionSettings.ClickModifyButton(); TimeManager.LongPause(); //Check customerA and customerB UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[1]); // check hierarchy nodes of customerA. UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckHierarchyOrzNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyBuildingNode(input.ExpectedData.HierarchyNodePath); UserDataPermissionSettings.SaveTreeWindow(); //Check "全部平台客户及对应数据权限" UserDataPermissionSettings.CheckAllCustomerDatas(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); // verify Assert.IsTrue(UserDataPermissionSettings.IsAllDataCheckboxChecked()); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); TimeManager.ShortPause(); }
public void NodeTreeNotChange(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); TimeManager.ShortPause(); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.MediumPause(); UserDataPermissionSettings.ClickModifyButton(); //Check customerA and customerB UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[1]); UserDataPermissionSettings.UnCheckCustomer(input.InputData.CustomerList[2]); // check hierarchy nodes of customerA. UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckAllHierarchyNode(); UserDataPermissionSettings.SaveTreeWindow(); //Check "全部平台客户及对应数据权限" UserDataPermissionSettings.CheckAllCustomerDatas(); //Uncheck UserDataPermissionSettings.UnCheckAllData(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); // verify 全部层级节点数据权限 checkbox is checked and all customer hierarchy tree is checked. Assert.IsFalse(UserDataPermissionSettings.IsAllDataCheckboxChecked()); Assert.IsTrue(UserDataPermissionSettings.IsHierarchSiteNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchOrzNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); }
public void SaveTreeThenCancel(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); // Check datascope UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // uncheck UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.CustomerList); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickCancelButton(); TimeManager.LongPause(); UserDataPermissionSettings.ClickModifyButton(); TimeManager.MediumPause(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // View the data permission //@@@@@@@@@@@@@@@@ lost a verify whole Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.CustomerList)); UserDataPermissionSettings.CloseTreeWindow(); }
public void NodeTreeModifyValid(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); TimeManager.ShortPause(); //Check 全部层级节点数据权限 option and click "Cancel" from 配置数据权限 window.Then click “数据权限” of CustomerD again to check the hierarchy node checker.Close. UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.CheckAllHierarchyNode(); UserDataPermissionSettings.CancelTreeWindow(); TimeManager.ShortPause(); //The datascope isn't modified and the same as before modify. UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsFalse(UserDataPermissionSettings.IsHierarchCustomerNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchOrzNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchSiteNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); //Check 全部层级节点数据权限 option and click "确定" and go to 配置数据权限. UserDataPermissionSettings.CheckAllHierarchyNode(); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); //Click "Cancel" button from customer selection window to "save" datascope of user. //Go to view status of exist user 客户数据权限. Click 查看数据权限 of customerD. UserDataPermissionSettings.ClickCancelButton(); TimeManager.MediumPause(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); //The datascope isn't modified and the same as before modify. Assert.IsFalse(UserDataPermissionSettings.IsHierarchCustomerNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchOrzNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchSiteNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); //Assert.IsTrue(UserDataPermissionSettings.IsHierarchSiteNodeChecked(input.InputData.CustomerList)); //Assert.IsFalse(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.CustomerList)); UserDataPermissionSettings.CloseTreeWindow(); //Modify again. Check 全部层级节点数据权限 option and click "确定". Click "Save" button. UserDataPermissionSettings.ClickModifyButton(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.CheckAllHierarchyNode(); UserDataPermissionSettings.SaveTreeWindow(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); //Click 查看数据权限 of customerD. UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.CustomerList)); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void AddEmptyDataPermission(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. TimeManager.MediumPause(); Assert.IsTrue(JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName)); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); //Verify all customers checkbox is unchecked and "编辑数据权限" link is gray out and save button disable Assert.IsFalse(UserDataPermissionSettings.IsSaveButtonEnable()); Assert.IsTrue(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); }
public void CheckAdminDataScope(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); Assert.IsFalse(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); TimeManager.ShortPause(); Assert.IsTrue(UserDataPermissionSettings.IsAllDataScopeCheckBoxDisabled()); Assert.IsTrue(UserDataPermissionSettings.IsAllDataCheckboxChecked()); }
public void ModifyEmptyInvalid(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); Assert.IsTrue(UserDataPermissionSettings.IsSaveButtonEnable()); // Check datascope UserDataPermissionSettings.UnCheckCustomer(input.InputData.CustomerName); // View the data permission Assert.IsFalse(UserDataPermissionSettings.IsSaveButtonEnable()); }
public void LongNameNodeDisplay(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); //Verify all customers checkbox is unchecked and "编辑数据权限" link is gray out and save button disable UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsTrue(UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void ModifyNodeTreeAndVerify(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); TimeManager.ShortPause(); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.MediumPause(); UserDataPermissionSettings.ClickModifyButton(); //Select customerD and select 全部层级节点数据权限 option and saved datascope successfully. UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.CheckAllHierarchyNode(); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); /* * //Login with UserD. Verify userD can select organizationA:siteA: from hierarchy tree and own datascope of buildingC: tagC: * JazzFunction.UserProfile.NavigatorToUserProfile(); * JazzFunction.UserProfile.ExitJazz(); * JazzMessageBox.MessageBox.Confirm(); * JazzMessageBox.LoadingMask.WaitLoading(); * TimeManager.LongPause(); * JazzFunction.LoginPage.LoginWithOption(input.InputData.UserName,input.ExpectedData.UserName,input.InputData.CustomerName); * JazzMessageBox.LoadingMask.WaitLoading(); * TimeManager.LongPause(); * TimeManager.LongPause(); * JazzFunction.Navigator.NavigateToTarget(NavigationTarget.CostUsage); * Assert.IsTrue(JazzFunction.CostPanel.SelectHierarchy(input.InputData.HierarchyNodePath)); * JazzFunction.Navigator.NavigateToTarget(NavigationTarget.AssociationHierarchy); * JazzFunction.AssociateSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath); * Assert.IsTrue(JazzFunction.AssociateSettings.IsTagOnAssociatedGridView(input.InputData.CustomerList[0])); * JazzFunction.UserProfile.NavigatorToUserProfile(); * JazzFunction.UserProfile.ExitJazz(); * JazzMessageBox.MessageBox.Confirm(); * JazzMessageBox.LoadingMask.WaitLoading(); * TimeManager.LongPause(); * JazzFunction.LoginPage.LoginToAdmin(); * JazzMessageBox.LoadingMask.WaitLoading(); * TimeManager.LongPause(); */ }
public void CheckAllHierarchyData(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); //Check "全部层级节点数据权限" UserDataPermissionSettings.CheckAllHierarchyNode(); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.MediumPause(); //Verify the hierarchy node all checked UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); //Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); //Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.ExpectedData.CustomerList)); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); // verify after save hierarchy tree TimeManager.MediumPause(); UserDataPermissionSettings.UnCheckCustomer(input.InputData.CustomerName); // UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); TimeManager.MediumPause(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); //Verify the hierarchy node all checked Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); //Verify the hierarchy node all checked UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); //Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.ExpectedData.CustomerList)); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void AddMultipleNodeAndView(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); //Verify all customers checkbox is unchecked and "编辑数据权限" link is gray out and save button disable UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.SaveTreeWindow(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); TimeManager.ShortPause(); }
public void ModifyToAllAndView(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); //Check "全部平台客户及对应数据权限" UserDataPermissionSettings.CheckAllCustomerDatas(); Assert.IsTrue(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); // verify UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); TimeManager.ShortPause(); }
public void CheckAllDataScopeThenView(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.LongPause(); // check "全部平台客户及对应数据权限" Assert.IsTrue(UserDataPermissionSettings.CheckAllCustomerDatas()); TimeManager.LongPause(); Assert.IsTrue(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); // Select 配置数据权限 link from customerA ,view status of created user 客户数据权限 UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // All hierarchy nodes are unchecked@@@@@@@@@@@ Assert.IsTrue(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); }
public void AddMultipleNodeAndView(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); //Verify all customers checkbox is unchecked and "编辑数据权限" link is gray out and save button disable Assert.IsFalse(UserDataPermissionSettings.IsSaveButtonEnable()); Assert.IsTrue(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); //Check multiple customer checkbox from datascope. UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[0]); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.HierarchyNodePath); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[1]); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[1]); // temp hierachy node CustomerList UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.CustomerList); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); // View the data permission UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); string[] HierarchyNode = { "customerA", "organizationA", "siteA" }; Assert.IsFalse(UserDataPermissionSettings.IsHierarchyNodeChecked(HierarchyNode)); UserDataPermissionSettings.CloseTreeWindow(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[1]); Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.CustomerList)); UserDataPermissionSettings.CloseTreeWindow(); // energy analysis }
public void AddAndViewRootNode(UserDataPermissionData input) { //string[] hierarchyNode = {"NancyCustomerIndustry","GreenieSite","GreenieBuilding"}; string[] hierarchyNode = { "" }; // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); //Verify all customers checkbox is unchecked and "编辑数据权限" link is gray out and save button disable Assert.IsFalse(UserDataPermissionSettings.IsSaveButtonEnable()); Assert.IsTrue(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); //Check Customer A B C root node from datascope. int i = 0; while (i < input.InputData.CustomerList.Length) { UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[i]); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[i]); hierarchyNode[0] = input.InputData.CustomerList[i]; UserDataPermissionSettings.CheckHierarchyNode(hierarchyNode); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); i++; } UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); // View the data permission int j = 0; while (j < input.InputData.CustomerList.Length) { UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[j]); hierarchyNode[0] = input.InputData.CustomerList[j]; Assert.IsTrue(UserDataPermissionSettings.IsHierarchyNodeChecked(hierarchyNode)); UserDataPermissionSettings.CloseTreeWindow(); j++; } }
public void AddThenCancel(UserDataPermissionData input) { // Focus on a new created user, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); //Verify all customers checkbox is unchecked and "编辑数据权限" link is gray out and save button disable Assert.IsFalse(UserDataPermissionSettings.IsSaveButtonEnable()); Assert.IsTrue(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); //Check multiple customer checkbox from datascope. UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerName); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); UserDataPermissionSettings.CheckHierarchyNode(input.InputData.HierarchyNodePath); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.HierarchyNodePath); UserDataPermissionSettings.CancelTreeWindow(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerName); // View the data permission Assert.IsFalse(UserDataPermissionSettings.IsHierarchyNodeChecked(input.InputData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchyNodeChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CancelTreeWindow(); }
public void ModifyMultiCustomer(UserDataPermissionData input) { // Focus on an exist UserForMultiCustomer, open datascope tab. JazzFunction.UserSettings.FocusOnUser(input.InputData.UserName); UserDataPermissionSettings.SwitchToDataPermissionTab(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickModifyButton(); // Check customerD and uncheck customerC UserDataPermissionSettings.UnCheckCustomer(input.InputData.CustomerList[2]); UserDataPermissionSettings.CheckCustomer(input.InputData.CustomerList[3]); TimeManager.MediumPause(); // Set Customer A hierarchy check node UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); TimeManager.ShortPause(); Assert.IsTrue(UserDataPermissionSettings.CheckHierarchySiteNode(input.InputData.HierarchyNodePath)); TimeManager.ShortPause(); UserDataPermissionSettings.UnCheckHierarchyNode(input.InputData.HierarchyNodePath); TimeManager.MediumPause(); UserDataPermissionSettings.UnCheckHierarchyOrzNode(input.InputData.HierarchyNodePath); TimeManager.ShortPause(); UserDataPermissionSettings.SaveTreeWindow(); TimeManager.ShortPause(); // Set Customer B hierarchy check node UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[1]); UserDataPermissionSettings.UnCheckHierarchySiteNode(input.ExpectedData.HierarchyNodePath); TimeManager.ShortPause(); UserDataPermissionSettings.CheckHierarchyNode(input.ExpectedData.HierarchyNodePath); TimeManager.ShortPause(); UserDataPermissionSettings.CheckHierarchyOrzNode(input.ExpectedData.HierarchyNodePath); TimeManager.ShortPause(); UserDataPermissionSettings.SaveTreeWindow(); //Save UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); // view customer A UserDataPermissionSettings.ClickModifyButton(); TimeManager.LongPause(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[0]); TimeManager.MediumPause(); Assert.IsTrue(UserDataPermissionSettings.IsHierarchOrzNodeChecked(input.InputData.HierarchyNodePath)); //Assert.IsFalse(UserDataPermissionSettings.IsHierarchOrzNodeChecked(input.InputData.HierarchyNodePath)); //Assert.IsFalse(UserDataPermissionSettings.IsHierarchCustomerNodeChecked(input.InputData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); // view customer B UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[1]); Assert.IsTrue(UserDataPermissionSettings.IsHierarchSiteNodeChecked(input.ExpectedData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchOrzNodeChecked(input.ExpectedData.HierarchyNodePath)); Assert.IsFalse(UserDataPermissionSettings.IsHierarchCustomerNodeChecked(input.ExpectedData.HierarchyNodePath)); UserDataPermissionSettings.CloseTreeWindow(); // Tag association@@@@@@@@@@@@@@@@@@@ not finish //Save UserDataPermissionSettings.ClickCancelButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); // Check 客户名称 to check all the customerr names UserDataPermissionSettings.ClickModifyButton(); TimeManager.LongPause(); TimeManager.LongPause(); UserDataPermissionSettings.CheckAllCumstomerNames(); UserDataPermissionSettings.ClickEditDataPermission(input.InputData.CustomerList[2]); Assert.IsFalse(UserDataPermissionSettings.AreAllHierarchyNodesChecked(input.InputData.HierarchyNodePathsArray[0])); UserDataPermissionSettings.CloseTreeWindow(); TimeManager.ShortPause(); UserDataPermissionSettings.ClickSaveButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); Assert.IsFalse(UserDataPermissionSettings.AreAllEditDataPermissionLinkButtonDisable()); // @@@@@@@@@@@@@@@@@@@@@@@@@ check null hierarchy node }