public void VerifyTooltipOfAssociatedTags(AssociateTagData input) { //Select one hierarchy node. Association.SelectHierarchyNodePath(input.InputData.HierarchyNodePath); TimeManager.MediumPause(); Association.FloatOnDisassociateButton(input.InputData.TagName); Assert.AreEqual(input.ExpectedData.AssociatedTooltips[0], Association.GetAssociateInfo()); //Change the Tag1 from unlight to light. Association.LightenTag(input.InputData.TagName); TimeManager.MediumPause(); //The tooltip can be display with "解除与以下节点的关联关系xxx/xxx." well. Association.FloatOnDisassociateButton(input.InputData.TagName); Assert.AreEqual(input.ExpectedData.AssociatedTooltips[0], Association.GetAssociateInfo()); //Change the Tag1 from light to unlight. Association.DarkenTag(input.InputData.TagName); TimeManager.MediumPause(); //The tooltip can be display with "解除与以下节点的关联关系xxx/xxx." well. Association.FloatOnDisassociateButton(input.InputData.TagName); Assert.AreEqual(input.ExpectedData.AssociatedTooltips[0], Association.GetAssociateInfo()); //Mouse over the 关联状态 button of Tag2. Association.NavigateToAreaDimensionAssociate(); AreaSettings.ShowHierarchyTree(); AreaSettings.SelectHierarchyNodePath(input.ExpectedData.HierarchyNodePath); AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaDimensionPath); TimeManager.MediumPause(); Association.FloatOnDisassociateButton(input.InputData.TagNames[0]); Assert.AreEqual(input.ExpectedData.AssociatedTooltips[1], Association.GetAssociateInfo()); Association.NavigateToSystemDimensionAssociate(); SystemSettings.SelectSystemDimensionNodePath(input.InputData.SystemDimensionPath); TimeManager.MediumPause(); Association.FloatOnDisassociateButton(input.InputData.TagNames[0]); Assert.AreEqual(input.ExpectedData.AssociatedTooltips[1], Association.GetAssociateInfo()); }
public void MarkedTagsSystemOrArea(AssociateTagData input) { //Find a tag which has been associated with both system dimension and area dimension node, light it separately in two dimensions. AssociateSettings.NavigateToAreaDimensionAssociate(); AreaNodeSettings.ShowHierarchyTree(); AreaNodeSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath); AreaNodeSettings.SelectAreaDimensionNodePath(input.InputData.AreaDimensionPath); AssociateSettings.LightenTag(input.InputData.TagName); Assert.IsTrue(AssociateSettings.IsTagLighted(input.InputData.TagName)); AssociateSettings.NavigateToSystemDimensionAssociate(); SystemNodeSettings.ShowHierarchyTree(); SystemNodeSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath); SystemNodeSettings.SelectSystemDimensionNodePath(input.InputData.SystemDimensionPath); AssociateSettings.LightenTag(input.InputData.TagName); Assert.IsTrue(AssociateSettings.IsTagLighted(input.InputData.TagName)); TimeManager.LongPause(); //Darken the associated tag in the system dimension. Doing nothing to the other dimension. //The first energy consumption flag turn dark. AssociateSettings.DarkenTag(input.InputData.TagName); TimeManager.MediumPause(); Assert.IsFalse(AssociateSettings.IsTagLighted(input.InputData.TagName)); AssociateSettings.FocusOnVTagByName(input.InputData.TagName); AssociateSettings.ClickDisassociateButton(input.InputData.TagName); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.ShortPause(); Assert.IsFalse(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagName)); //The other energy consumption flag is lighted still. AssociateSettings.NavigateToAreaDimensionAssociate(); AreaNodeSettings.ShowHierarchyTree(); AreaNodeSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath); AreaNodeSettings.SelectAreaDimensionNodePath(input.InputData.AreaDimensionPath); Assert.IsFalse(AssociateSettings.IsTagOnAssociatedGridView(input.InputData.TagName)); }