Ejemplo n.º 1
0
        public void SmokeTestRankingCost(SmokeTestEnergyViewData input)
        {
            //Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇A"]
            CorporateRanking.NavigateToCorporateRanking();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            CorporateRanking.CheckHierarchyNode(input.InputData.Hierarchies);

            CorporateRanking.ClickConfirmHiearchyButton();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading(10);
            TimeManager.Pause(4000);

            EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Cost);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.LongPause();
            TimeManager.LongPause();

            //电
            CorporateRanking.SelectCommodity(input.InputData.commodityNames[0]);

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();

            //总览
            CorporateRanking.SelectCommodity(input.InputData.commodityNames[1]);

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();
        }
Ejemplo n.º 2
0
        public void Alarm(SmokeTestEnergyViewData input)
        {
            Dictionary <string, Object> testD = new Dictionary <string, Object>();

            JazzFunction.Navigator.NavigateToTarget(NavigationTarget.AlarmSettings);
            TimeManager.Pause(10000);

            JazzBrowseManager.SwitchToWidnow("Jazz_Alarm");
            TimeManager.Pause(10000);

            JazzButton.AlarmConfigrationButton.Click();
            TimeManager.Pause(10000);

            JazzButton.AlarmHierarchyTreeButton.Click();
            TimeManager.Pause(5000);

            string[] nodePath = { "NancyOtherCustomer3", "NancyOtherSite", "BuildingRanking1" };
            JazzTreeView.AlarmHierarchyTree.Alarm_SelectNode(nodePath);
            TimeManager.Pause(30000);

            JazzCheckBox.AlarmCheckBoxTaglist.Alarm_Checked("Rankingtag1");
            TimeManager.MediumPause();

            JazzButton.AlarmViewButton.Click();
            TimeManager.Pause(30000);
            var tests = BrowserHandler.ExecuteJavaScript("return window.testObj._energyRawData");

            Console.Out.WriteLine(tests);
        }
Ejemplo n.º 3
0
        public void SmokeTestUnitIndicatorCost(SmokeTestEnergyViewData input)
        {
            UnitKPIPanel.NavigateToUnitIndicator();
            TimeManager.MediumPause();

            //Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇A/C"]
            UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Cost);
            TimeManager.ShortPause();

            //电
            UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.commodityNames[0]);
            TimeManager.MediumPause();

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();

            Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn());

            //总览
            UnitKPIPanel.SelectCommodityUnitCost();
            TimeManager.MediumPause();

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();

            Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn());
        }
Ejemplo n.º 4
0
        public void SmokeTestCostUsage(SmokeTestEnergyViewData input)
        {
            CostUsage.NavigateToCostUsage();
            TimeManager.MediumPause();

            //Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇A"]
            CostUsage.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //Commodity = Electricity
            CostUsage.SelectCommodity(input.InputData.commodityNames);
            TimeManager.ShortPause();

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();

            Assert.IsTrue(CostUsage.IsTrendChartDrawn());

            //总览
            CostUsage.SelectCommodity();

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();

            Assert.IsTrue(CostUsage.IsTrendChartDrawn());
        }
Ejemplo n.º 5
0
        public void PopTreeOperation02(SmokeTestEnergyViewData input)
        {
            //open pop and login
            JazzBrowseManager.OpenJazz();
            TimeManager.Pause(15000);

            JazzTextField.PopLoginUserNameTextField.Fill("SchneiderElectricChina");
            JazzTextField.PopLoginPasswordTextField.Fill("P@ssw0rdChina");

            JazzButton.PopLoginSubmitButton.Click();
            JazzButton.PopMenuButtonCustomer.WaitControlDisplayed(60);
            TimeManager.Pause(5000);

            JazzButton.PopbButtonConfirm.Click();
            TimeManager.Pause(10000);

            JazzButton.PopButtonUserManagement.Pop_SelectItem("用户管理");
            TimeManager.LongPause();
            TimeManager.LongPause();

            JazzButton.PopButtonAddUser.Click();
            TimeManager.LongPause();
            TimeManager.LongPause();

            JazzComboBox.PopComboBoxPosition.Pop_SelectItem("部门经理");
            TimeManager.LongPause();
        }
Ejemplo n.º 6
0
        public void SmokeTestEnergyAnalysis(SmokeTestEnergyViewData input)
        {
            EnergyAnalysis.NavigateToEnergyAnalysis();
            TimeManager.MediumPause();

            //Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇A"]
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //Tags
            EnergyAnalysis.CheckTags(input.InputData.TagNames);
            TimeManager.ShortPause();

            //Time range = default
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Chart display correctly
            Assert.IsTrue(EnergyAnalysis.IsTrendChartDrawn());

            EnergyViewToolbar.SelectTagModeConvertTarget(TagModeConvertTarget.MultipleHierarchyTag);
            TimeManager.LongPause();

            //Select multiple tags Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇B"]
            MultiHieCompareWindow.SelectHierarchyNode(input.InputData.MultipleHierarchyAndtags[0].HierarchyPath);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();

            ////Tags = BBV1Root
            MultiHieCompareWindow.SwitchTagTab(TagTabs.HierarchyTag);
            MultiHieCompareWindow.CheckTag(input.InputData.MultipleHierarchyAndtags[0].TagsName[0]);
            TimeManager.ShortPause();

            MultiHieCompareWindow.ClickConfirmButton();
            TimeManager.LongPause();

            //Time range = default
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Chart display correctly
            Assert.IsTrue(EnergyAnalysis.IsTrendChartDrawn());
        }
Ejemplo n.º 7
0
        public void SmokeTestLabelling(SmokeTestEnergyViewData input)
        {
            //Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇A"]
            IndustryLabellingPanel.NavigateToIndustryLabelling();
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            IndustryLabellingPanel.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //Tags = BAV1Root
            IndustryLabellingPanel.CheckTags(input.InputData.TagNames);
            TimeManager.ShortPause();

            //全年
            IndustryLabellingPanel.SetMonth(input.InputData.YearAndMonth[0].month);

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();

            EnergyViewToolbar.SelectTagModeConvertTarget(TagModeConvertTarget.MultipleHierarchyTag);
            TimeManager.LongPause();

            //Select multiple tags Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇B"]
            MultiHieCompareWindow.SelectHierarchyNode(input.InputData.MultipleHierarchyAndtags[0].HierarchyPath);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();

            //Tags = BBV1Root
            MultiHieCompareWindow.SwitchTagTab(TagTabs.HierarchyTag);
            MultiHieCompareWindow.CheckTag(input.InputData.MultipleHierarchyAndtags[0].TagsName[0]);
            TimeManager.ShortPause();

            MultiHieCompareWindow.ClickConfirmButton();
            TimeManager.LongPause();
            TimeManager.LongPause();

            //全年
            IndustryLabellingPanel.SetMonth(input.InputData.YearAndMonth[0].month);

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();
        }
Ejemplo n.º 8
0
        public void SmokeTestUnitIndicatorConsumption(SmokeTestEnergyViewData input)
        {
            UnitKPIPanel.NavigateToUnitIndicator();
            TimeManager.MediumPause();

            //Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇A/C"]
            UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //Tags = BAV1Root
            UnitKPIPanel.CheckTags(input.InputData.TagNames);
            TimeManager.ShortPause();

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();

            Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn());

            EnergyViewToolbar.SelectTagModeConvertTarget(TagModeConvertTarget.MultipleHierarchyTag);
            TimeManager.LongPause();

            //Select multiple tags Hierarchy = ["NancyCostCustomer2", "组织A", "园区A", "楼宇B"]
            MultiHieCompareWindow.SelectHierarchyNode(input.InputData.MultipleHierarchyAndtags[0].HierarchyPath);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.ShortPause();

            //Tags = BBV1Root
            MultiHieCompareWindow.SwitchTagTab(TagTabs.HierarchyTag);
            MultiHieCompareWindow.CheckTag(input.InputData.MultipleHierarchyAndtags[0].TagsName[0]);
            TimeManager.ShortPause();

            MultiHieCompareWindow.ClickConfirmButton();
            TimeManager.LongPause();

            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.MediumPause();

            Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn());
        }
Ejemplo n.º 9
0
        public void PopTreeOperation01(SmokeTestEnergyViewData input)
        {
            //open pop and login
            JazzBrowseManager.OpenJazz();
            TimeManager.Pause(5000);

            JazzTextField.PopLoginUserNameTextField.Fill("SchneiderElectricChina");
            JazzTextField.PopLoginPasswordTextField.Fill("P@ssw0rdChina");

            JazzButton.PopLoginSubmitButton.Click();
            JazzButton.PopMenuButtonCustomer.WaitControlDisplayed(60);
            TimeManager.Pause(5000);

            //Select customer and confirm
            JazzButton.PopMenuButtonCustomer.Pop_SelectItem("NancyCustomer12");
            TimeManager.LongPause();

            JazzButton.PopbButtonConfirm.Click();
            TimeManager.Pause(10000);

            string[] nodePath = { "NancyCustomer12", "园区测试多层级", "楼宇BC" };
            JazzTreeView.PopHierarchyTree.Pop_SelectNode(nodePath);
        }
Ejemplo n.º 10
0
        public void HM_China_ProdCompEnergyAnalysis(SmokeTestEnergyViewData input)
        {
            HomePagePanel.SelectCustomer(input.InputData.Customer);
            TimeManager.LongPause();

            EnergyAnalysis.NavigateToEnergyAnalysis();
            TimeManager.MediumPause();

            //Hierarchy
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //Tags
            EnergyAnalysis.CheckTags(input.InputData.TagNames);
            TimeManager.ShortPause();

            //from 2013 to 2015, 每年的数据
            var ManualTimeRange = input.InputData.ManualTimeRange;

            EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate);
            TimeManager.ShortPause();

            //Time range = default
            EnergyViewToolbar.View(EnergyViewType.List);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //"Year"
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Year);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            EnergyAnalysis.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default);
            TimeManager.MediumPause();
            EnergyAnalysis.CompareDataViewOfEnergyAnalysis(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]);

            //"Month"
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Month);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            EnergyAnalysis.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default);
            TimeManager.MediumPause();
            EnergyAnalysis.CompareDataViewOfEnergyAnalysis(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]);

            //"Week"
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Week);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            EnergyAnalysis.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default);
            TimeManager.MediumPause();
            EnergyAnalysis.CompareDataViewOfEnergyAnalysis(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]);

            //"Day"
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Day);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            EnergyAnalysis.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default);
            TimeManager.MediumPause();
            EnergyAnalysis.CompareDataViewOfEnergyAnalysis(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]);
        }