Exemplo n.º 1
0
        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++;
            }
        }
Exemplo n.º 2
0
        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]));
        }
Exemplo n.º 3
0
        public void AssociateTagsThenVerify(AssociateTagData input)
        {
            //navigate and select node
            AssociateOnWhichNode(input);

            //Select 3 tags and removed 2, then click "associate"
            Association.ClickAssociateTagButton();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            Association.CheckedTags(input.InputData.TagNames);
            TimeManager.ShortPause();

            //check the removed tags disappeared and unchecked
            Association.RemoveTags(input.InputData.RemovedTagNames);
            TimeManager.ShortPause();

            foreach (string tagName in input.InputData.RemovedTagNames)
            {
                Assert.IsFalse(Association.IsRemoveTagExisted(tagName));
            }

            Association.GoToPage(1);
            TimeManager.MediumPause();

            foreach (string tagName in input.InputData.RemovedTagNames)
            {
                Assert.IsFalse(Association.IsTagChecked(tagName));
            }

            Association.ClickAssociateButton();
            JazzMessageBox.LoadingMask.WaitLoading();
            TimeManager.MediumPause();

            Assert.IsTrue(Association.IsTagOnAssociatedGridView(input.ExpectedData.TagName));
            Assert.IsFalse(Association.IsTagOnAssociatedGridView(input.InputData.RemovedTagNames[0]));
            Assert.IsFalse(Association.IsTagOnAssociatedGridView(input.InputData.RemovedTagNames[1]));

            Association.NavigateToEnergyAnalysis();
            JazzFunction.EnergyAnalysisPanel.SelectHierarchy(input.InputData.HierarchyNodePath);
            JazzFunction.EnergyAnalysisPanel.SwitchTagTab(TagTabs.HierarchyTag);
            TimeManager.ShortPause();
            JazzFunction.EnergyAnalysisPanel.WaitTagListAppear(10);
            TimeManager.LongPause();
            JazzFunction.EnergyAnalysisPanel.IsTagOnListByName(input.ExpectedData.TagName);
        }