예제 #1
0
        public void ModifyValidAreaNode(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            // Click "Modify " buttion
            AreaSettings.ClickModifyAreaDimensionButton();

            //"Input  area name, comment ,Click ""Save"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            AreaSettings.ClickSaveButton();
            JazzMessageBox.LoadingMask.WaitLoading();
            TimeManager.ShortPause();
            Assert.AreEqual(AreaSettings.GetAreaDimensionName(), input.InputData.CommonName);
            Assert.AreEqual(AreaSettings.GetAreaDimensionComment(), input.InputData.Comments);
            //AreaSettings.ShowHierarchyTree();
            //TimeManager.LongPause();

            //Verify the area node has been created under the correct hierarchy path

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();

            TimeManager.MediumPause();
            Assert.IsTrue(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
        }
예제 #2
0
        public void ModifyAreaCancel(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            // Click "Modify " buttion
            AreaSettings.ClickModifyAreaDimensionButton();

            //"Input  area name ,comment ,Click ""cancel"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            AreaSettings.ClickCancelButton();

            // Verify the Area Node is not Modified
            //TimeManager.MediumPause();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            //TimeManager.MediumPause();
            //AreaSettings.ShowHierarchyTree();
            //TimeManager.MediumPause();
            //AreaSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
        }
예제 #3
0
        public void DeleteAreaNodeThenCancel(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            //Click "删除" button and "取消"
            AreaSettings.ClickDeleteButton();
            //TimeManager.ShortPause();

            //Verify that message box popup for confirm delete
            string msgText = JazzMessageBox.MessageBox.GetMessage();

            Assert.IsTrue(msgText.Contains(input.ExpectedData.Messages[0]));
            Assert.IsTrue(msgText.Contains(input.ExpectedData.Messages[1]));

            AreaSettings.CancelErrorMsgBox();

            //Verify
            // Verify the Area Node is not deleted
            TimeManager.MediumPause();
            Assert.AreEqual(AreaSettings.GetAreaDimensionName(), input.InputData.CommonName);
            TimeManager.MediumPause();
        }
예제 #4
0
        public void DeleteLeafAreaNode(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            //Click "删除" button and "确认"
            AreaSettings.ClickDeleteButton();
            //Verify that message box popup for confirm delete
            string msgText1 = JazzMessageBox.MessageBox.GetMessage();

            Assert.IsTrue(msgText1.Contains(input.ExpectedData.Messages[0]));
            Assert.IsTrue(msgText1.Contains(input.ExpectedData.Messages[1]));

            AreaSettings.ConfirmErrorMsgBox();
            JazzMessageBox.LoadingMask.WaitLoading();
            //AreaSettings

            //Verify the area node has been deleted under the correct hierarchy path

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();

            //  Could not select the node path
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
        }
예제 #5
0
        public void AddLongestArea(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            //Click "子区域" button to add Area node.
            //The Area property display and enable to input.
            AreaSettings.ClickCreateAreaDimensionButton();

            //"Input  area name, comment ,Click ""Save"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            AreaSettings.ClickSaveButton();
            JazzMessageBox.LoadingMask.WaitLoading();
            Assert.AreEqual(input.ExpectedData.CommonName, AreaSettings.GetAreaDimensionName());
            Assert.AreEqual(input.ExpectedData.Comments, AreaSettings.GetAreaDimensionComment());

            // Verify the correct  areaNode is successfully created
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            TimeManager.MediumPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            TimeManager.MediumPause();

            //AreaSettings.ShowHierarchyTree();
            //TimeManager.MediumPause();
            //AreaSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.ShortPause();
            //  Could select the node path
            Assert.IsTrue(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
        }
예제 #6
0
        public void AddAreaCancel(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            //The Area property display and enable to input.
            AreaSettings.ClickCreateAreaDimensionButton();

            //"Input  area name,comment ,Click ""cancel"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            AreaSettings.ClickCancelButton();

            //Verify
            // Verify the Area Node is not added
            TimeManager.ShortPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            TimeManager.MediumPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            TimeManager.MediumPause();

            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
        }
예제 #7
0
        public void OrgandSiteNodeAddArea(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            Assert.IsFalse(AreaSettings.IsCreateAreaDimensionButtonEnabled());
        }
예제 #8
0
        public void ModifyValidAndVerify(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            // click "modify" buttion
            AreaSettings.ClickModifyAreaDimensionButton();

            //"Input  area name, comment ,Click ""Save"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            AreaSettings.ClickSaveButton();
            JazzMessageBox.LoadingMask.WaitLoading();

            //check every where
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            Assert.IsTrue(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
            TimeManager.MediumPause();

            //1. Check  area node Modified  on AssociationAreaDimension
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.AssociationSettings);
            TimeManager.MediumPause();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.AssociationAreaDimension);
            //AreaSettings.ShowHierarchyTree();
            //JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            //AreaSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            Assert.IsTrue(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
            TimeManager.MediumPause();

            //2. Energy Analysis area node Modified
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.EnergyAnalysis);
            TimeManager.LongPause();
            JazzFunction.EnergyAnalysisPanel.SelectHierarchy(input.InputData.HierarchyNodePath);

            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            JazzFunction.EnergyAnalysisPanel.SwitchTagTab(TagTabs.AreaDimensionTab);
            TimeManager.LongPause();
            Assert.IsTrue(JazzFunction.EnergyAnalysisPanel.SelectAreaDimension(input.ExpectedData.AreaNodePath));
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
        }
예제 #9
0
        public void AddInValidAreaNode(AreaDimensionData input)
        {
            string[] HierarchyNodePath = new string[] { "自动化测试", "测试楼宇园区", "楼宇配置测试" };
            string[] AreaNodePath      = new string[] { "楼宇配置测试" };
            TimeManager.ShortPause();

            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(AreaNodePath);
            TimeManager.MediumPause();

            //Click "子区域" button to add Area node.
            //The Area property display and enable to input.
            AreaSettings.ClickCreateAreaDimensionButton();

            //"Input  area name: "area1", comment ,Click ""cancel"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);

            TimeManager.LongPause();
            AreaSettings.ClickSaveButton();
            TimeManager.MediumPause();
            //Assert.IsFalse(AreaSettings.IsSaveButtonEnabled());

            //Verify
            Assert.IsTrue(AreaSettings.IsNameInvalidMsgCorrect(input.ExpectedData.CommonName));
            Assert.AreEqual(input.ExpectedData.Comments, AreaSettings.GetAreaDimensionComment());

            TimeManager.LongPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            TimeManager.MediumPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            TimeManager.MediumPause();
            //AreaSettings.ShowHierarchyTree();
            // TimeManager.MediumPause();
            // The Build don't need select hierarchy again
            //AreaSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            //TimeManager.MediumPause();
            string[] AreaNodePathNew = new string[2];
            AreaNodePathNew[0] = "楼宇配置测试";
            AreaNodePathNew[1] = input.InputData.CommonName;
            Assert.AreEqual(AreaNodePathNew[1], input.InputData.CommonName);
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(AreaNodePathNew));
        }
예제 #10
0
        public void SameAreaNodes(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            /*
             * //Click "子区域" button to add Area node.
             * //The Area property display and enable to input.
             * AreaSettings.ClickCreateAreaDimensionButton();
             *
             * //"Input  area name comment ,Click ""save"" button"
             * AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
             * AreaSettings.ClickSaveButton();
             *
             * TimeManager.MediumPause();
             *
             * JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
             * JazzMessageBox.LoadingMask.WaitSubMaskLoading();
             * TimeManager.MediumPause();
             * JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
             * JazzMessageBox.LoadingMask.WaitSubMaskLoading();
             * TimeManager.LongPause();
             * //AreaSettings.ShowHierarchyTree();
             * //TimeManager.MediumPause();
             * //AreaSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
             * //TimeManager.MediumPause();
             * AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
             * JazzMessageBox.LoadingMask.WaitSubMaskLoading();
             */
            //Click "子区域" button to add same Area node.
            AreaSettings.ClickCreateAreaDimensionButton();

            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            TimeManager.ShortPause();
            AreaSettings.ClickSaveButton();
            TimeManager.ShortPause();
            //Verify
            AreaSettings.IsNameInvalidMsgCorrect(input.ExpectedData.Message);
        }
예제 #11
0
        public void FiveLevelsAreaNodes(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            int AreaNodeLength = input.ExpectedData.AreaNodePath.Length;

            for (int i = 1; i < (AreaNodeLength); i++)
            {
                AreaSettings.ClickCreateAreaDimensionButton();
                AreaSettings.FillAreaDimensionData(input.ExpectedData.AreaNodePath[i], input.InputData.Comments);
                //Click "Save" button
                TimeManager.MediumPause();
                AreaSettings.ClickSaveButton();
                JazzMessageBox.LoadingMask.WaitLoading();
                TimeManager.ShortPause();

                //Verify whether
                Assert.AreEqual(input.ExpectedData.AreaNodePath[i], AreaSettings.GetAreaDimensionName());
            }

            // CreateAreaDimensionButton  is  disabled
            TimeManager.MediumPause();
            Assert.IsFalse(AreaSettings.IsCreateAreaDimensionButtonEnabled());

            // Verify the correct  areaNode is successfully created
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            TimeManager.MediumPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            TimeManager.MediumPause();

            //AreaSettings.ShowHierarchyTree();
            //TimeManager.MediumPause();
            //AreaSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();
            //  Could select the node path
            Assert.IsTrue(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
        }
예제 #12
0
        public void ModifyInvalidAreaNode(AreaDimensionData input)
        {
            string[] HierarchyNodePath = new string[] { "自动化测试", "测试楼宇园区", "楼宇配置测试" };
            string[] AreaNodePath      = new string[] { "楼宇配置测试", "AreaNodeForCheckAll" };
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(AreaNodePath);
            TimeManager.MediumPause();

            AreaSettings.ClickModifyAreaDimensionButton();

            //"Input  area name,comment ,Click ""cancel"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);

            TimeManager.LongPause();
            AreaSettings.ClickSaveButton();
            JazzMessageBox.LoadingMask.WaitLoading();
            //Verify
            Assert.IsTrue(AreaSettings.IsNameInvalidMsgCorrect(input.ExpectedData.CommonName));
            Assert.AreEqual(input.ExpectedData.Comments, AreaSettings.GetAreaDimensionComment());
            TimeManager.LongPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            TimeManager.MediumPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            TimeManager.MediumPause();

            ///AreaSettings.ShowHierarchyTree();
            //TimeManager.MediumPause();
            //AreaSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            //TimeManager.MediumPause();

            string[] AreaNodePathNew = new string[2];
            AreaNodePathNew[0] = "楼宇配置测试";
            AreaNodePathNew[1] = input.InputData.CommonName;
            Assert.AreEqual(AreaNodePathNew[1], input.InputData.CommonName);
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(AreaNodePathNew));
        }
예제 #13
0
        public void EmptyItemNotDisplay(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            //Click "子区域" button to add Area node.
            //The Area property display and enable to input.
            AreaSettings.ClickCreateAreaDimensionButton();

            //"Input  area name, comment ,Click ""Save"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            AreaSettings.ClickSaveButton();
            JazzMessageBox.LoadingMask.WaitLoading();
            Assert.AreEqual(AreaSettings.GetAreaDimensionComment(), string.Empty);
        }
예제 #14
0
        public void ModifyToSameAreaNodes(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            AreaSettings.ClickModifyAreaDimensionButton();

            //"Input  area name, comment ,Click ""save"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            TimeManager.LongPause();
            AreaSettings.ClickSaveButton();
            JazzMessageBox.LoadingMask.WaitLoading();
            //Verify
            AreaSettings.IsNameInvalidMsgCorrect(input.ExpectedData.Message);
        }
예제 #15
0
        public void ModifyInvalidAreaCancel(AreaDimensionData input)
        {
            string[] HierarchyNodePath = new string[] { "自动化测试", "测试楼宇园区", "楼宇配置测试" };
            string[] AreaNodePath      = new string[] { "楼宇配置测试", "AreaNodeForCheckAll" };

            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(AreaNodePath);
            TimeManager.MediumPause();

            AreaSettings.ClickModifyAreaDimensionButton();

            //"Input  area name: comment ,Click ""cancel"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            AreaSettings.ClickCancelButton();


            // Verify the Area Node is not  modified
            TimeManager.MediumPause();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            TimeManager.MediumPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            TimeManager.MediumPause();

            //AreaSettings.ShowHierarchyTree();
            //TimeManager.MediumPause();
            //AreaSettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            //TimeManager.MediumPause();

            string[] AreaNodePathNew = new string[2];
            AreaNodePathNew[0] = "楼宇配置测试";
            AreaNodePathNew[1] = input.InputData.CommonName;
            Assert.AreEqual(AreaNodePathNew[1], input.InputData.CommonName);

            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(AreaNodePathNew));
        }
예제 #16
0
        public void AddInvalidAreaCancel(AreaDimensionData input)
        {
            string[] HierarchyNodePath = new string[] { "自动化测试", "测试楼宇园区", "楼宇配置测试" };
            string[] AreaNodePath      = new string[] { "楼宇配置测试" };
            TimeManager.ShortPause();

            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(AreaNodePath);
            TimeManager.MediumPause();

            //Click "子区域" button to add Area node.
            //The Area property display and enable to input.
            AreaSettings.ClickCreateAreaDimensionButton();

            //"Input  area name comment ,Click ""cancel"" button"
            AreaSettings.FillAreaDimensionData(input.InputData.CommonName, input.InputData.Comments);
            AreaSettings.ClickCancelButton();

            // Verify the Area Node is not added
            TimeManager.MediumPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            TimeManager.MediumPause();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            TimeManager.MediumPause();

            string[] AreaNodePathNew = new string[2];
            AreaNodePathNew[0] = "楼宇配置测试";
            AreaNodePathNew[1] = input.InputData.CommonName;
            Assert.AreEqual(AreaNodePathNew[1], input.InputData.CommonName);

            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(AreaNodePathNew));
        }
예제 #17
0
        public void DeleteNonLeafAreaNode(AreaDimensionData input)
        {
            string[] AreaNode2 = new string[] { "楼宇配置测试", "L1", "L2" };
            string[] AreaNode1 = new string[] { "楼宇配置测试", "L1" };

            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            //Click "删除" button and "确认"
            AreaSettings.ClickDeleteButton();
            //Verify that message box popup for confirm delete
            string msgText3 = JazzMessageBox.MessageBox.GetMessage();

            Assert.IsTrue(msgText3.Contains(input.ExpectedData.Messages[0]));
            Assert.IsTrue(msgText3.Contains(input.ExpectedData.Messages[1]));

            AreaSettings.ConfirmErrorMsgBox();
            TimeManager.MediumPause();

            string msgText2 = JazzMessageBox.MessageBox.GetMessage();

            Assert.IsTrue(msgText2.Contains(input.ExpectedData.Messages[3]));
            AreaSettings.OKErrorMsgBox();
            TimeManager.ShortPause();

            //Delete all child nodes  L4
            AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath);
            TimeManager.MediumPause();

            AreaSettings.ClickDeleteButton();
            AreaSettings.ConfirmErrorMsgBox();
            JazzMessageBox.LoadingMask.WaitLoading();
            TimeManager.ShortPause();

            //Delete L3 again
            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            //Click "删除" button and "确认"
            AreaSettings.ClickDeleteButton();
            //Verify that message box popup for confirm delete
            Assert.IsTrue(msgText3.Contains(input.ExpectedData.Messages[0]));
            Assert.IsTrue(msgText3.Contains(input.ExpectedData.Messages[1]));

            AreaSettings.ConfirmErrorMsgBox();
            JazzMessageBox.LoadingMask.WaitLoading();
            TimeManager.ShortPause();

            //Verify the area node has been deleted under the correct hierarchy path
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            //  Could select the node path
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath));

            //Verify the Child area node has been deleted under the correct hierarchy path

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            //  Could select the node path
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));

            // check  Level  1 deleted
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            AreaSettings.SelectAreaDimensionNodePath(AreaNode1);
            TimeManager.LongPause();

            //Click "删除" button and "确认"
            AreaSettings.ClickDeleteButton();
            //Verify that message box popup for confirm delete
            string msgText = JazzMessageBox.MessageBox.GetMessage();

            Assert.IsTrue(msgText.Contains(input.ExpectedData.Messages[2]));
            Assert.IsTrue(msgText.Contains(input.ExpectedData.Messages[1]));

            AreaSettings.ConfirmErrorMsgBox();
            JazzMessageBox.LoadingMask.WaitLoading();

            //Verify the area node has been deleted under the correct hierarchy path
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();

            //  Could select the node path
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(AreaNode1));

            // check level 2 also deleted
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsSystemDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.HierarchySettingsAreaDimension);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //  Could select the node path
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(AreaNode2));
        }
예제 #18
0
        public void DeleteandVerifyEverywhere(AreaDimensionData input)
        {
            //Select a Building node.
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            AreaSettings.ClickDeleteButton();
            TimeManager.ShortPause();
            //Verify that message box popup for confirm delete
            string msgText = JazzMessageBox.MessageBox.GetMessage();

            Assert.IsTrue(msgText.Contains(input.ExpectedData.Messages[0]));
            Assert.IsTrue(msgText.Contains(input.ExpectedData.Messages[1]));
            AreaSettings.ConfirmErrorMsgBox();
            TimeManager.ShortPause();

            //can't delete when area have associated tags
            string msgText2 = JazzMessageBox.MessageBox.GetMessage();

            Assert.IsTrue(msgText2.Contains(input.ExpectedData.Messages[2]));
            AreaSettings.OKErrorMsgBox();
            TimeManager.ShortPause();

            //Disassociated tag and delete area node again
            AssociateSettings.NavigateToAreaDimensionAssociate();
            TimeManager.ShortPause();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.ShortPause();

            AssociateSettings.FocusOnTag(input.InputData.TagName);
            TimeManager.ShortPause();
            AssociateSettings.ClickDisassociateButton(input.InputData.TagName);
            JazzMessageBox.LoadingMask.WaitLoading();
            TimeManager.MediumPause();

            //Delete again
            HierarchySettings.SelectHierarchyNodePath(input.InputData.HierarchyNodePath);
            TimeManager.MediumPause();

            AreaSettings.NavigateToAreaDimensionSetting();
            AreaSettings.SelectAreaDimensionNodePath(input.InputData.AreaNodePath);
            TimeManager.MediumPause();

            AreaSettings.ClickDeleteButton();
            TimeManager.ShortPause();
            //Verify that message box popup for confirm delete
            string msgText3 = JazzMessageBox.MessageBox.GetMessage();

            Assert.IsTrue(msgText3.Contains(input.ExpectedData.Messages[0]));
            Assert.IsTrue(msgText3.Contains(input.ExpectedData.Messages[1]));
            AreaSettings.ConfirmErrorMsgBox();
            TimeManager.ShortPause();

            //1. Check  on AssociationAreaDimension
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.AssociationAreaDimension);
            Assert.IsFalse(AreaSettings.SelectAreaDimensionNodePath(input.ExpectedData.AreaNodePath));
            TimeManager.MediumPause();

            //2. Energy Analysis area node added
            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.EnergyAnalysis);
            TimeManager.LongPause();
            JazzFunction.EnergyAnalysisPanel.SelectHierarchy(input.InputData.HierarchyNodePath);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();
            JazzFunction.EnergyAnalysisPanel.SwitchTagTab(TagTabs.AreaDimensionTab);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();

            Assert.IsFalse(JazzFunction.EnergyAnalysisPanel.SelectAreaDimension(input.ExpectedData.AreaNodePath));
            TimeManager.MediumPause();
        }