public void AssociateThenCancel(AssociateTagData input) { //navigate and select node AssociateOnWhichNode(input); Association.ClickAssociateTagButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.ShortPause(); //Do not select tag and click "Cancel" button directly Association.ClickCancelButton(); TimeManager.ShortPause(); //verify go back to the previous page Assert.IsTrue(Association.IsAssociateTagButtonDisplayed()); //Select 2 tags and cancel Association.ClickAssociateTagButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); Association.CheckedTags(input.InputData.TagNames); Association.ClickCancelButton(); TimeManager.ShortPause(); //verify go back to the previous page Assert.IsTrue(Association.IsAssociateTagButtonDisplayed()); }
public void DisassociateTagVerify(AssociateTagData input) { int i = 0; while (i <= 3) { AssociateSettings.NavigateToHierarchyAssociate(); string[] HierarchyNewPath = new string[i + 1]; Array.Copy(input.InputData.HierarchyNodePath, HierarchyNewPath, i + 1); Assert.IsTrue(AssociateSettings.SelectHierarchyNodePath(HierarchyNewPath)); //AssociateSettings.SelectHierarchyNode(input.InputData.HierarchyNodePath[i]); //Navigate to system dimension node and disassociate ptag //Select one hierarchy building node, select a associated tag and click '解除关联' button. AssociateSettings.FocusOnTag(input.InputData.TagNames[i]); AssociateSettings.ClickDisassociateButton(input.InputData.TagNames[i]); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); // It disappears from the associated grid and it appears in the unassociated grid; Assert.IsFalse(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[i])); AssociateSettings.ClickAssociateTagButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); Assert.IsTrue(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[i])); //Associate this tag again AssociateSettings.CheckedTag(input.InputData.TagNames[i]); AssociateSettings.ClickAssociateButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); Assert.IsTrue(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[i])); AssociateSettings.ClickAssociateTagButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); Assert.IsFalse(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagNames[i])); AssociateSettings.ClickCancelButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //Go to Energy Usage Analysis, select above hierarchy node then select ‘全部数据点’ try to find the above tag. AssociateSettings.NavigateToEnergyAnalysis(); JazzFunction.EnergyAnalysisPanel.SelectHierarchy(HierarchyNewPath); JazzFunction.EnergyAnalysisPanel.SwitchTagTab(TagTabs.HierarchyTag); TimeManager.ShortPause(); JazzFunction.EnergyAnalysisPanel.WaitTagListAppear(10); TimeManager.LongPause(); Assert.IsTrue(JazzFunction.EnergyAnalysisPanel.IsTagOnListByName(input.InputData.TagNames[i])); i++; } }