public void AssociatedSameTagSuccessed(AssociateTagData input) { //Select building node Association.SelectHierarchyNodePath(input.InputData.HierarchyNodePath); TimeManager.MediumPause(); //Navigate to system dimension node and associate vtag Association.NavigateToSystemDimensionAssociate(); SystemSettings.SelectSystemDimensionNodePath(input.InputData.SystemDimensionPath); TimeManager.ShortPause(); Association.ClickAssociateTagButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); Association.CheckedTag(input.InputData.TagName); TimeManager.ShortPause(); Association.ClickAssociateButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); Assert.IsTrue(Association.IsTagOnAssociatedGridView(input.ExpectedData.TagName)); //Navigate to areadimension node and associate vtag Association.NavigateToAreaDimensionAssociate(); AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaDimensionPath); TimeManager.ShortPause(); Association.ClickAssociateTagButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); Association.CheckedTag(input.InputData.TagName); TimeManager.ShortPause(); Association.ClickAssociateButton(); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.MediumPause(); Assert.IsTrue(Association.IsTagOnAssociatedGridView(input.ExpectedData.TagName)); //Check the tag has been associated to these 2 node correctly Association.NavigateToSystemDimensionAssociate(); SystemSettings.SelectSystemDimensionNodePath(input.InputData.SystemDimensionPath); TimeManager.MediumPause(); Assert.IsTrue(Association.IsTagOnAssociatedGridView(input.ExpectedData.TagName)); Association.NavigateToAreaDimensionAssociate(); AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaDimensionPath); TimeManager.MediumPause(); Assert.IsTrue(Association.IsTagOnAssociatedGridView(input.ExpectedData.TagName)); }
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++; } }
public void MarkedElectricTags(AssociateTagData input) { //Select a building node, then select an associated tag AssociateSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath); AssociateSettings.FocusOnVTagByName(input.InputData.TagNames[0]); AssociateSettings.LightenTag(input.InputData.TagNames[0]); Assert.IsTrue(AssociateSettings.IsTagLighted(input.InputData.TagNames[0])); AssociateSettings.LightenTag(input.InputData.TagNames[1]); Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.InputData.TagName)); JazzMessageBox.MessageBox.Close(); TimeManager.ShortPause(); //Disassociate Ptag1, then light Ptag2 again. AssociateSettings.FocusOnVTagByName(input.InputData.TagNames[0]); AssociateSettings.ClickDisassociateButton(input.InputData.TagNames[0]); AssociateSettings.LightenTag(input.InputData.TagNames[1]); Assert.IsTrue(AssociateSettings.IsTagLighted(input.InputData.TagNames[1])); //Disassociate Ptag2, then associate Ptag2 to one system dimension node under this building node. AssociateSettings.FocusOnVTagByName(input.InputData.TagNames[1]); AssociateSettings.ClickDisassociateButton(input.InputData.TagNames[1]); AssociateSettings.NavigateToSystemDimensionAssociate(); //SystemNodeSettings.ShowHierarchyTree(); //SystemNodeSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath); SystemNodeSettings.SelectSystemDimensionNodePath(input.InputData.SystemDimensionPath); AssociateSettings.ClickAssociateTagButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.ShortPause(); AssociateSettings.CheckedTag(input.InputData.TagNames[1]); AssociateSettings.ClickAssociateButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.ShortPause(); //The flag turn light if there are no tag whose commodity is electricity is lighted in the same system dimension node. AssociateSettings.LightenTag(input.InputData.TagNames[1]); Assert.IsTrue(AssociateSettings.IsTagLighted(input.InputData.TagNames[1])); }