public void ViewCarbonUnitIndicator01(UnitIndicatorData input) { //Go to NancyCostCustomer2. Go to Function Unit indicator. HomePagePanel.SelectCustomer("NancyCostCustomer2"); TimeManager.ShortPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); //Select one node NancyCostCustomer2/组织A/园区A/楼宇B from Hierarchy Tree. Click Function Type button, select Carbon. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Carbon); TimeManager.ShortPause(); //严寒地区B区机房 EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industries[0]); TimeManager.MediumPause(); //Select 单项 Commodity=电. to display trend chart view.Time range="去年". EnergyViewToolbar.SelectMoreOption(EnergyViewMoreOption.LastYear); TimeManager.ShortPause(); UnitKPIPanel.SelectSingleCommodityUnitCarbon(input.InputData.Commodity[0]); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //Select Unit=单位面积, set time range=2012/07/01 00:00-2012/07/10 24:00,click to view data. var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitArea); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.Line); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //Change select 楼宇D 单项 Commodity=电 , Unit= 单位人口 to display trend chart view. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[1]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitPopulation); TimeManager.ShortPause(); UnitKPIPanel.SelectSingleCommodityUnitCarbon(input.InputData.Commodity[0]); TimeManager.MediumPause(); //·Warining message show not defined 单位人口. //· Check Commodity=电 and still display Carbon chart. EnergyViewToolbar.View(EnergyViewType.Line); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[0])); //Assert.IsFalse(UnitKPIPanel.IsTrendChartDrawn()); //Change different time range, 楼宇B //a. 2012/07/01 3:30-2012/07/01 15:30 hour UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); UnitKPIPanel.SelectCommodityUnitCarbon(); TimeManager.MediumPause(); EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitArea); TimeManager.ShortPause(); EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //b. 2012/07/01 3:30-2012/07/03 23:30 day EnergyViewToolbar.SetDateRange(ManualTimeRange[2].StartDate, ManualTimeRange[2].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); //c. 2012/07/10-2012/08/05 week EnergyViewToolbar.SetDateRange(ManualTimeRange[3].StartDate, ManualTimeRange[3].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[4], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[4], input.InputData.failedFileName[4]); //d. 2012/01/01-2012/12/31=lastyear month EnergyViewToolbar.SetDateRange(ManualTimeRange[4].StartDate, ManualTimeRange[4].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[5], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[5], input.InputData.failedFileName[5]); //e. 2011/01/01-2013/05/30 year EnergyViewToolbar.SetDateRange(ManualTimeRange[5].StartDate, ManualTimeRange[5].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[6], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[6], input.InputData.failedFileName[6]); }
public void ViewBenchmarkConsumptionUnitIndicator01(UnitIndicatorData input) { //Go to Function Unit indicator. Select the BuildingBC from Hierarchy Tree. Click Function Type button, select Energy Consumption. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); Assert.AreEqual(input.ExpectedData.UnitTypeValue, EnergyViewToolbar.GetUnitTypeButtonText()); Assert.AreEqual(input.ExpectedData.IndustryValue, EnergyViewToolbar.GetIndustryButtonText()); //Go to NancyCustomer1. Go to Function Unit indicator, select Function Type=Energy Consumption. Select BuildingBC, select V(1), select a 行业基准值=寒冷地区服装零售 option to view chart UnitKPIPanel.CheckTag(input.InputData.tagNames[0]); TimeManager.ShortPause(); EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industries[0]); TimeManager.ShortPause(); var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); /* * //Click legand to hiden Benchmark.Benchmark can be hiden. * UnitKPIPanel.ClickLegendItem(input.InputData.UnitIndicatorLegend[0].BenchmarkValue); * TimeManager.ShortPause(); * * * //Show again * UnitKPIPanel.ClickLegendItem(input.InputData.UnitIndicatorLegend[0].BenchmarkValue); * TimeManager.ShortPause(); * * * //Click "X" from legand to remove Benchmark.Benchmark can be remove. * UnitKPIPanel.CloseLegendItem(input.InputData.UnitIndicatorLegend[0].BenchmarkValue); * TimeManager.ShortPause(); * * * //Select 行业基准值=空 to view chart.Benchmark change from display to disappear. * Assert.AreEqual(input.ExpectedData.IndustryValue, EnergyViewToolbar.GetIndustryButtonText()); */ EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industries[0]); TimeManager.ShortPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industries[1]); TimeManager.ShortPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Select BuildingBAD and check V(11), Unit=单位人口to display trend chart view. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[1]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); UnitKPIPanel.CheckTag(input.InputData.tagNames[1]); TimeManager.ShortPause(); //time range 2013/1/1 to 2013/12/31 EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //·Warining message show not defined 单位人口."缺少人口属性的部分无法绘制,请设置后再试". //Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[0])); //Assert.IsFalse(UnitKPIPanel.IsTrendChartDrawn()); //Select the BuildingBC from Hierarchy Tree.time range="去年", 行业基准值=寒冷地区服装零售. Select multiple tag V(1)+V(2) +V(3) with the same commodity to display trend chart view UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); UnitKPIPanel.CheckTag(input.InputData.tagNames[0]); UnitKPIPanel.CheckTag(input.InputData.tagNames[2]); UnitKPIPanel.CheckTag(input.InputData.tagNames[3]); TimeManager.ShortPause(); //· Check 3 tags at most Assert.IsTrue(UnitKPIPanel.IsAllTagsDisabled()); EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industries[0]); TimeManager.ShortPause(); EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Month" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //Time range 2013/07/01 3:30-2013/07/01 15:00 hour EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Hour" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //Time range 2013/07/01 3:30-2013/07/03 23:00 day EnergyViewToolbar.SetDateRange(ManualTimeRange[2].StartDate, ManualTimeRange[2].EndDate); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Day" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //Time range 2013/07/10-2013/08/05 week EnergyViewToolbar.SetDateRange(ManualTimeRange[3].StartDate, ManualTimeRange[3].EndDate); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Week" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); //Time range 2013/01/01-2013/12/31=lastyear month EnergyViewToolbar.SetDateRange(ManualTimeRange[4].StartDate, ManualTimeRange[4].EndDate); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Month" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[4], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[4], input.InputData.failedFileName[4]); //Time range 2011/01/01-2013/12/31 year EnergyViewToolbar.SetDateRange(ManualTimeRange[5].StartDate, ManualTimeRange[5].EndDate); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Year" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[5], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[5], input.InputData.failedFileName[5]); }
public void BenckmarkCalculateConsumptionUnitIndicator01(UnitIndicatorData input) { //select "NancyOtherCustomer3" HomePagePanel.SelectCustomer("NancyOtherCustomer3"); TimeManager.LongPause(); //navigate to "单位指标" UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); //select hierarchy "NancyOtherCustomer3/NancyOtherSite/BuildingRanking1" UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); UnitKPIPanel.SwitchTagTab(TagTabs.HierarchyTag); TimeManager.MediumPause(); //pickup tag "Rankingtag1" UnitKPIPanel.CheckTag(input.InputData.tagNames[0]); TimeManager.ShortPause(); //time range 2012-11-20 to 2013-12-5 var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); TimeManager.ShortPause(); //select industry EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industry); TimeManager.MediumPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Year" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Month" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Week" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //Change manually defined time range to 2012-12-20-2013-1-10. EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); TimeManager.ShortPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Step is "Day" UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); /*hourly so waste time, so ignore * EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); * JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); * TimeManager.MediumPause(); * * //Step is "Hour" * UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[4], DisplayStep.Default); * TimeManager.MediumPause(); * UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[4], input.InputData.failedFileName[4]); */ }
public void UnitIndicatorConsumptionVerification01_p1(UnitIndicatorData input) { HomePagePanel.SelectCustomer("NancyOtherCustomer3"); TimeManager.LongPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); //Select "NancyOtherCustomer3/NancyOtherSite/BuildingCostYearToDay" UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //Time range = 2012-1-1 to 2013-12-18 var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); TimeManager.ShortPause(); //select Benchmark = "夏热冬冷地区轨道交通"/"全部区域全行业" EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industry); TimeManager.ShortPause(); //select UnitIndicatorType = "单位人口"/"单位面积" EnergyViewToolbar.SelectUnitTypeConvertTarget(input.InputData.UnitIndicatorType); TimeManager.ShortPause(); //Tags = P1_YearToDay/V1_YearToDay/V2_YearToDay EnergyAnalysis.CheckTags(input.InputData.tagNames); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.LongPause(); //"Year" EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //"Month" EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //"Week" EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //"Day" EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); }
public void UnitIndicatorCostVerification01(UnitIndicatorData input) { //select NancyCostCustomer2 HomePagePanel.SelectCustomer("NancyCostCustomer2"); TimeManager.ShortPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); //Select "NancyCostCustomer2/组织A/园区A/楼宇B" UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Cost); TimeManager.ShortPause(); //Select "总览" UnitKPIPanel.SelectCommodityUnitCost(); TimeManager.MediumPause(); //Time range = 2012-1-1 to 2013-12-18 var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //"Year" EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //"Month" EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //"Week" EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //"Day" EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); //Time range = 2012-7-1 to 2012-8-4 EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //"Hour" EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[4], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[4], input.InputData.failedFileName[4]); //Select "电/自来水/煤" UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[0]); TimeManager.MediumPause(); //select Benchmark = "严寒地区B区机房" EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industry); TimeManager.ShortPause(); //Time range = 2012-1-1 to 2013-12-18 EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //"Year" EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[5], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[5], input.InputData.failedFileName[5]); //"Month" EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[6], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[6], input.InputData.failedFileName[6]); //"Week" EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[7], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[7], input.InputData.failedFileName[7]); //"Day" EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[8], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[8], input.InputData.failedFileName[8]); //Time range = 2012-7-1 to 2012-8-4 EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //"Hour" EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[9], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[9], input.InputData.failedFileName[9]); }
public void UnitIndicatorOfflineCalculate01(UnitIndicatorData input) { //Go to NancyOtherCustomer3. Go to Function Unit indicator. Select the BuildingRanking50 from Hierarchy Tree. Click Function Type button, select Energy Consumption HomePagePanel.SelectCustomer("NancyOtherCustomer3"); TimeManager.ShortPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //check Rankingtag50 to view chart; UnitKPIPanel.CheckTag(input.InputData.tagNames[0]); TimeManager.ShortPause(); //select time range=2013/01/01-2013/01/02, optional step=hour; Unit=人口. var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view, · 500/1000=0.5 UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //Select Cost, select time range=2013/01/01-2013/01/02, check Commodity=电 to view chart; optional step=hour; Unit=人口. EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Cost); TimeManager.ShortPause(); EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[0]); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.LongPause(); //check on data view, · 500*10/1000=5 UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //Select Carbon, select time range=2013/01/01-2013/01/02, check Commodity=电 to view chart; optional step=hour; Unit=人口. EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Carbon); TimeManager.ShortPause(); EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); UnitKPIPanel.SelectSingleCommodityUnitCarbon(input.InputData.Commodity[0]); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.LongPause(); //check on data view· 500*7/1000=0.7 UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //Go to Function Ranking. Select the BuildingRanking1,BuildingRanking2 and BuildingRanking50 from Hierarchy Tree. Click Ranking Type button, select Energy consumption/Carbon/Cost, check Commodity=电, Ranking type=总排名/人口排名/总面积排名. UnitKPIPanel.NavigateToRanking(); TimeManager.MediumPause(); CorporateRanking.CheckHierarchyNode(input.InputData.Hierarchies[0]); CorporateRanking.CheckHierarchyNode(input.InputData.Hierarchies[1]); CorporateRanking.CheckHierarchyNode(input.InputData.Hierarchies[2]); EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); CorporateRanking.SelectCommodity(input.InputData.Commodity[0]); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.LongPause(); //· BuildingRanking50 is change from last to first by ASED. CorporateRanking.ExportRankingExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3]); TimeManager.MediumPause(); CorporateRanking.CompareDataViewOfCostUsage(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); //cost 人口排名 EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Cost); TimeManager.ShortPause(); EnergyViewToolbar.SelectRankTypeConvertTarget(RankTypeConvertTarget.AverageRank); TimeManager.ShortPause(); CorporateRanking.SelectCommodity(input.InputData.Commodity[0]); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); //· BuildingRanking50 is change from last to first by ASED. CorporateRanking.ExportRankingExpectedDataTableToExcel(input.ExpectedData.expectedFileName[4]); TimeManager.MediumPause(); CorporateRanking.CompareDataViewOfCostUsage(input.ExpectedData.expectedFileName[4], input.InputData.failedFileName[4]); //carbon 面积排名 EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Carbon); TimeManager.ShortPause(); EnergyViewToolbar.SelectRankTypeConvertTarget(RankTypeConvertTarget.UnitAreaRank); TimeManager.ShortPause(); CorporateRanking.SelectCommodity(input.InputData.Commodity[0]); EnergyViewToolbar.ClickViewButton(); TimeManager.LongPause(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //· BuildingRanking50 is change from last to first by ASED. CorporateRanking.ExportRankingExpectedDataTableToExcel(input.ExpectedData.expectedFileName[5]); TimeManager.MediumPause(); CorporateRanking.CompareDataViewOfCostUsage(input.ExpectedData.expectedFileName[5], input.InputData.failedFileName[5]); }
public void AllCommoditiesUnitCostBenchmarkView(UnitIndicatorData input) { //Go to UnitCost function. Navigate to NancyCustomer1 -> 园区测试多层级->BuildingMultipleCommodities. HomePagePanel.SelectCustomer("NancyCustomer1"); TimeManager.ShortPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Cost); TimeManager.LongPause(); UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //select time range=Select time range 2013/12/31 12:00 to 2014/10/31 8:00, var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.SetTimeRange(ManualTimeRange[0].StartTime, ManualTimeRange[0].EndTime); TimeManager.LongPause(); //Select 行业+区域=服装零售寒冷地区. Select 单项->低压蒸汽 EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industries[0]); TimeManager.LongPause(); UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[0]); TimeManager.ShortPause(); //change chart type to data view to view. Optional step=Month. EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Export to excel. Verify the export data value compared with the data view. UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); //Check · The excel value is equal to the data before export. UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //Change to select commodity 柴油 to Data view UnitKPIPanel.UnselectSingleCommodityUnitCost(input.InputData.Commodity[0]); UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[1]); TimeManager.ShortPause(); #region Not use code, for save to dashboard which will test on manual for 2.0 /* * //Select time range 上周 * EnergyViewToolbar.SelectMoreOption(EnergyViewMoreOption.LastWeek); * EnergyViewToolbar.ClickViewButton(); * JazzMessageBox.LoadingMask.WaitSubMaskLoading(); * TimeManager.LongPause(); * TimeManager.LongPause(); * TimeManager.LongPause(); * * //change chart type to the data view.Optional step=Hour * EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); * JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); * TimeManager.MediumPause(); * * //Export to excel. Verify the export data value compared with the data view. * UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); * TimeManager.MediumPause(); * //Check · The excel value is equal to the data before export. * UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); * * //Change Commodity= 冷量. * UnitKPIPanel.UnselectSingleCommodityUnitCost(input.InputData.Commodity[1]); * UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[2]); * TimeManager.ShortPause(); * * //Change to select time range 上月 * EnergyViewToolbar.SelectMoreOption(EnergyViewMoreOption.LastMonth); * TimeManager.ShortPause(); * * //change chart type to trend chart to view. * EnergyViewToolbar.View(EnergyViewType.Line); * JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); * TimeManager.MediumPause(); * * //Check · There is 1 Benchmark line in trend chart. * Assert.AreEqual(5, EnergyAnalysis.GetLegendItemTexts().Length);//5 legends include:Calculated,Target,Baseline,Original and Benchmark(Cold region Clothing retail) * //Assert.AreEqual(2, EnergyAnalysis.GetTrendChartLines()); * * //Save to dashboard. Go to dashboard to verify the dashboard chart value. * var dashboard = input.InputData.DashboardInfo[0]; * EnergyViewToolbar.SaveToDashboard(dashboard.WigetName, dashboard.HierarchyName, dashboard.IsCreateDashboard, dashboard.DashboardName); * * //On homepage, check the dashboards * UnitKPIPanel.NavigateToAllDashBoards(); * HomePagePanel.SelectHierarchyNode(dashboard.HierarchyName); * TimeManager.MediumPause(); * HomePagePanel.ClickDashboardButton(dashboard.DashboardName); * JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(); * TimeManager.MediumPause(); * Assert.IsTrue(HomePagePanel.GetDashboardHeaderName().Contains(dashboard.DashboardName)); * Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard.WigetName)); * * //Check · There is 1 Benchmark line in trend chart. * HomePagePanel.ClickOnWidget(dashboard.WigetName); */ #endregion }
public void CalculateConsumptionUnitIndicator01(UnitIndicatorData input) { //Go to NancyCustomer1. Go to Function Unit indicator. Select the BuildingBC from Hierarchy Tree. Click Function Type button, select Energy Consumption. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //Select 1 tag V(1)to display trend chart. Change different time range UnitKPIPanel.CheckTag(input.InputData.tagNames[0]); TimeManager.ShortPause(); //a. 2012/12/31 3:30-2013/01/01 15:30 hour var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.SetTimeRange(ManualTimeRange[0].StartTime, ManualTimeRange[0].EndTime); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //b. 2012/07/01 3:30-2012/07/03 23:30 day EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); EnergyViewToolbar.SetTimeRange(ManualTimeRange[1].StartTime, ManualTimeRange[1].EndTime); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //c. 2012/07/10-2012/08/05 week EnergyViewToolbar.SetDateRange(ManualTimeRange[2].StartDate, ManualTimeRange[2].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //Select Unit=单位面积 and view data. EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitArea); TimeManager.ShortPause(); //a. 2012/12/31 3:30-2013/01/01 15:30 hour EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.SetTimeRange(ManualTimeRange[0].StartTime, ManualTimeRange[0].EndTime); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); //b. 2012/07/01 3:30-2012/07/03 23:30 day EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); EnergyViewToolbar.SetTimeRange(ManualTimeRange[1].StartTime, ManualTimeRange[1].EndTime); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[4], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[4], input.InputData.failedFileName[4]); //c. 2012/07/10-2012/08/05 week EnergyViewToolbar.SetDateRange(ManualTimeRange[2].StartDate, ManualTimeRange[2].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[5], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[5], input.InputData.failedFileName[5]); //Select multiple tags V(1) and V(3) from BuildingBC node and Dimension node to display column chart view. Unit=单位人口. UnitKPIPanel.SwitchTagTab(TagTabs.SystemDimensionTab); TimeManager.MediumPause(); UnitKPIPanel.SelectSystemDimension(input.InputData.SystemDimensionPath); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); UnitKPIPanel.CheckTag(input.InputData.tagNames[1]); TimeManager.ShortPause(); TimeManager.MediumPause(); EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitPopulation); TimeManager.ShortPause(); //d. 2012/01/01-2012/12/31=lastyear month EnergyViewToolbar.SetDateRange(ManualTimeRange[3].StartDate, ManualTimeRange[3].EndDate); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[6], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[6], input.InputData.failedFileName[6]); //e. 2011/01/01-2013/05/30 year EnergyViewToolbar.SetDateRange(ManualTimeRange[4].StartDate, ManualTimeRange[4].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[7], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[7], input.InputData.failedFileName[7]); //Uncheck V(1) to view chart. UnitKPIPanel.SwitchTagTab(TagTabs.HierarchyTag); TimeManager.LongPause(); UnitKPIPanel.UncheckTag(input.InputData.tagNames[0]); TimeManager.ShortPause(); EnergyViewToolbar.SetDateRange(ManualTimeRange[3].StartDate, ManualTimeRange[3].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[8], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[8], input.InputData.failedFileName[8]); //e. 2011/01/01-2013/05/30 year EnergyViewToolbar.SetDateRange(ManualTimeRange[4].StartDate, ManualTimeRange[4].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[9], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[9], input.InputData.failedFileName[9]); //Go to NancyOtherCustomer3. Go to Function Unit indicator. Select the BuildingPrecision from Hierarchy Tree. Click Function Type button, select Energy Consumption. Verify precision display for Unit display. HomePagePanel.SelectCustomer("NancyOtherCustomer3"); TimeManager.LongPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[1]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitArea); TimeManager.ShortPause(); UnitKPIPanel.CheckTag(input.InputData.tagNames[2]); UnitKPIPanel.CheckTag(input.InputData.tagNames[3]); //2011/01/01-2013/05/30 year EnergyViewToolbar.SetDateRange(ManualTimeRange[4].StartDate, ManualTimeRange[4].EndDate); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[10], DisplayStep.Default); TimeManager.MediumPause(); //UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[10], input.InputData.failedFileName[10]); UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[2]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.LongPause(); TimeManager.MediumPause(); EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitPopulation); TimeManager.ShortPause(); UnitKPIPanel.CheckTag(input.InputData.tagNames[4]); //2011/01/01-2013/05/30 year EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[11], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[11], input.InputData.failedFileName[11]); }
public void CalculateCarbonUnitIndicator01(UnitIndicatorData input) { //Go to NancyCostCustomer2. Go to Function Unit indicator. Select the 楼宇A from Hierarchy Tree. Click Function Type button, select Carbon, HomePagePanel.SelectCustomer("NancyCostCustomer2"); TimeManager.ShortPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); //Select the 楼宇A/楼宇B from Hierarchy Tree. Click Function Type button, select Cost. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Carbon); TimeManager.ShortPause(); //then go to 介质单项. Select Commodity=电 to display trend chart; Optional step=hour; Unit=单位人口. UnitKPIPanel.SelectSingleCommodityUnitCarbon(input.InputData.Commodity[0]); TimeManager.MediumPause(); //Change manually defined time range to 2012/07/29-2012/08/04. var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //Select Commodity=水 to display trend chart; Optional step=hour; Unit=单位人口. UnitKPIPanel.UnselectSingleCommodityUnitCarbon(input.InputData.Commodity[0]); UnitKPIPanel.SelectSingleCommodityUnitCarbon(input.InputData.Commodity[1]); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //Select Commodity=煤 to display trend chart; Optional step=hour; Unit=单位人口. UnitKPIPanel.UnselectSingleCommodityUnitCarbon(input.InputData.Commodity[1]); UnitKPIPanel.SelectSingleCommodityUnitCarbon(input.InputData.Commodity[2]); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //Go to 介质总览 to display trend chart; Optional step=hour; Unit=单位人口. UnitKPIPanel.SelectCommodityUnitCarbon(); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); }
public void UnitIndicatorCarbonVerification01(UnitIndicatorData input) { //Select "NancyOtherCustomer3" HomePagePanel.SelectCustomer("NancyOtherCustomer3"); TimeManager.ShortPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); //Select "NancyOtherCustomer3/NancyOtherSite/BuildingCostYearToDay" UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //select "碳排放" EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Carbon); TimeManager.ShortPause(); //select "标煤"/"二氧化碳"/"树" EnergyViewToolbar.SelectCarbonConvertTarget(input.InputData.CarbonType); TimeManager.ShortPause(); //Select "总览" UnitKPIPanel.SelectCommodityUnitCarbon(); TimeManager.MediumPause(); //Time range = 2012-1-1 to 2013-12-18 var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.LongPause(); //"Year" EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //"Month" EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //Select "煤" UnitKPIPanel.SelectSingleCommodityUnitCarbon(input.InputData.Commodity[0]); TimeManager.MediumPause(); //select Benchmark = "夏热冬冷地区轨道交通" EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industry); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.LongPause(); //"Year" EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); //"Month" EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); }
public void BenchmarkCalculateCostUnitIndicator01(UnitIndicatorData input) { //Select "NancyOtherCustomer3" HomePagePanel.SelectCustomer("NancyOtherCustomer3"); TimeManager.ShortPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); //Select "NancyOtherCustomer3/NancyOtherSite/BuildingRanking1" UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Cost); TimeManager.ShortPause(); // view 行业基准值=全区域全行业, Unit=单位人口, Commodity=电 to view data UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[0]); TimeManager.MediumPause(); EnergyViewToolbar.SelectIndustryConvertTarget(input.InputData.Industry); TimeManager.MediumPause(); //Change manually defined time range to 2013/01/01-2013/12/5. var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); TimeManager.ShortPause(); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //Change manually defined time range to 2012-12-20-2013-1-10. EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); TimeManager.ShortPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[2], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[2], input.InputData.failedFileName[2]); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); /*hourly so waste time, so ignore * EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour); * JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); * TimeManager.MediumPause(); * * UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[3], DisplayStep.Default); * TimeManager.MediumPause(); * UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[3], input.InputData.failedFileName[3]); */ }
public void ViewCostUnitIndicator04(UnitIndicatorData input) { //Go to NancyOtherCustomer3. Go to Function Unit indicator. Select the BuildingCostYearToDay from Hierarchy Tree. HomePagePanel.SelectCustomer("NancyOtherCustomer3"); TimeManager.ShortPause(); UnitKPIPanel.NavigateToUnitIndicator(); TimeManager.MediumPause(); UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectFuncModeConvertTarget(FuncModeConvertTarget.Cost); TimeManager.ShortPause(); //Commodity=煤, predefined time range=之前七天 to view chart. UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[0]); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //· Warning message display show include tag step not support. Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0])); Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day)); Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour)); Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Week)); EnergyAnalysis.ClickGiveupButtonOnWindow(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); Assert.IsTrue(UnitKPIPanel.EntirelyNoChartDrawn()); //Change time range to 昨天 and check Commodity=水. UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[1]); TimeManager.MediumPause(); EnergyViewToolbar.SelectMoreOption(EnergyViewMoreOption.Yesterday); TimeManager.ShortPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //· Warning message display show include tag step not support. Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[1])); Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day)); Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour)); Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Week)); EnergyAnalysis.ClickGiveupButtonOnWindow(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.LongPause(); //Select the BuildingNoTag from Hierarchy Tree. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[1]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //Select 总览/单项 to display 单位人口. Assert.IsTrue(UnitKPIPanel.IsCostSingleCommodityNotExisted()); //Go to NancyOtherCustomer3. Go to Function Unit indicator. Select the BuildingCostYearToDay from Hierarchy Tree. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //Change manually defined time range to 2011/01/01-2013/05/04; Unit=单位人口. var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); TimeManager.ShortPause(); //Select Commodity=电 ; UnitKPIPanel.SelectSingleCommodityUnitCost(input.InputData.Commodity[2]); TimeManager.MediumPause(); //Optional step=year; EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[0])); //·2011 year can't display chart since that 单位人口 start from 2011/11=100 EnergyAnalysis.ClickDisplayStep(DisplayStep.Year); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[0])); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //Go to 介质总览 to display trend chart; Optional step=year; Unit=单位人口. UnitKPIPanel.SelectCommodityUnitCost(); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[0])); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //·2011 year can't display chart since that 单位人口 start from 2011/11=100 UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[1]); //Go to 介质总览/(Or V(M) commodity) to display trend chart; Optional step=day/hour/week; Unit=单位人口. EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); EnergyViewToolbar.View(EnergyViewType.Line); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); EnergyAnalysis.ClickDisplayStep(DisplayStep.Day); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); /* * Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[2])); * Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day)); * Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour)); * Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Week)); * Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Month)); * EnergyAnalysis.ClickGiveupButtonOnWindow(); * JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); * TimeManager.LongPause(); * * Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); * * EnergyAnalysis.ClickDisplayStep(DisplayStep.Week); * JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); * TimeManager.MediumPause(); * * Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[3])); * Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day)); * Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour)); * Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Week)); * Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Month)); * EnergyAnalysis.ClickStepButtonOnWindow(DisplayStep.Month); * JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); * TimeManager.LongPause(); * * Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); */ }
public void ViewConsumptionUnitIndicator01(UnitIndicatorData input) { //Go to Function Unit indicator. Select the BuildingBC from Hierarchy Tree. Click Function Type button, select Energy Consumption. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); Assert.AreEqual(input.ExpectedData.UnitTypeValue, EnergyViewToolbar.GetUnitTypeButtonText()); Assert.AreEqual(input.ExpectedData.IndustryValue, EnergyViewToolbar.GetIndustryButtonText()); //Select 1 tag V(1), time range="今年", to display trend chart view.(No population property on last year) UnitKPIPanel.CheckTag(input.InputData.tagNames[0]); TimeManager.ShortPause(); EnergyViewToolbar.SelectMoreOption(EnergyViewMoreOption.ThisYear); TimeManager.ShortPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); //Assert.AreEqual(1, UnitKPIPanel.GetTrendChartLines()); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //check on data view UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]); //Select Unit=单位面积 and view data. EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitArea); EnergyViewToolbar.View(EnergyViewType.List); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.ClickDisplayStep(DisplayStep.Month); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); UnitKPIPanel.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[1], DisplayStep.Default); TimeManager.MediumPause(); UnitKPIPanel.CompareDataViewUnitIndicator(input.ExpectedData.expectedFileName[1], input.InputData.failedFileName[0]); EnergyViewToolbar.View(EnergyViewType.Line); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); //Assert.AreEqual(1, UnitKPIPanel.GetTrendChartLines()); //4 legand s//how include 能耗/单位面积; 目标值/单位面积; 基准值/单位面积 and 能耗(Gray out). Assert.IsTrue(UnitKPIPanel.IsLineLegendItemShown(input.InputData.UnitIndicatorLegend[0].CaculationValue)); Assert.IsTrue(UnitKPIPanel.IsLineLegendItemShown(input.InputData.UnitIndicatorLegend[0].TargetValue)); Assert.IsTrue(UnitKPIPanel.IsLineLegendItemShown(input.InputData.UnitIndicatorLegend[0].BaselineValue)); Assert.IsFalse(UnitKPIPanel.IsLineLegendItemShown(input.InputData.UnitIndicatorLegend[0].OriginalValue)); Assert.IsTrue(UnitKPIPanel.IsLegendItemExists(input.InputData.UnitIndicatorLegend[0].OriginalValue)); /*tspan 找不到原始的那个数据点了;而且28版本的chrome对legend的支持不好,暂时跳过 * //能耗 chart default hiden. When click the gray out 能耗 legand, show 1 more能耗 chart. * UnitKPIPanel.ShowLineCurveLegend(input.InputData.UnitIndicatorLegend[0].OriginalValue); * TimeManager.ShortPause(); * Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); */ //Select BuildingBAD and check V(11), Unit= 单位人口 to display trend chart view. UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[1]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyViewToolbar.SelectUnitTypeConvertTarget(UnitTypeConvertTarget.UnitPopulation); UnitKPIPanel.CheckTag(input.InputData.tagNames[3]); TimeManager.ShortPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[0])); //Change time range to 2012/01-2012/03, Unit= 单位人口 to view chart. EnergyViewToolbar.SetDateRange(new DateTime(2012, 1, 1), new DateTime(2012, 3, 1)); TimeManager.ShortPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.ShortPause(); //Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[0])); Assert.AreEqual("2012-01-01", EnergyViewToolbar.GetStartDate()); Assert.AreEqual("2012-03-01", EnergyViewToolbar.GetEndDate()); //Select the BuildingBC from Hierarchy Tree.time range="去年". Select multiple tag V(1)+V(2) +V(3) to display trend chart view UnitKPIPanel.SelectHierarchy(input.InputData.Hierarchies[0]); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); UnitKPIPanel.CheckTag(input.InputData.tagNames[0]); UnitKPIPanel.CheckTag(input.InputData.tagNames[1]); UnitKPIPanel.CheckTag(input.InputData.tagNames[2]); TimeManager.ShortPause(); //Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[1])); EnergyViewToolbar.SelectMoreOption(EnergyViewMoreOption.LastYear); TimeManager.ShortPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Assert.IsTrue(HomePagePanel.GetPopNotesValue().Contains(input.ExpectedData.popupNotes[0])); Assert.IsTrue(UnitKPIPanel.IsTrendChartDrawn()); //Assert.AreEqual(3, UnitKPIPanel.GetTrendChartLines()); //2 legend pereach tag include 能耗/单位面积; and 能耗(Gray out).) Assert.IsTrue(UnitKPIPanel.IsLineLegendItemShown(input.ExpectedData.UnitIndicatorLegend[0].CaculationValue)); Assert.IsFalse(UnitKPIPanel.IsLineLegendItemShown(input.ExpectedData.UnitIndicatorLegend[0].OriginalValue)); Assert.IsTrue(UnitKPIPanel.IsLineLegendItemShown(input.ExpectedData.UnitIndicatorLegend[1].CaculationValue)); Assert.IsFalse(UnitKPIPanel.IsLineLegendItemShown(input.ExpectedData.UnitIndicatorLegend[1].OriginalValue)); Assert.IsTrue(UnitKPIPanel.IsLineLegendItemShown(input.ExpectedData.UnitIndicatorLegend[2].CaculationValue)); Assert.IsFalse(UnitKPIPanel.IsLineLegendItemShown(input.ExpectedData.UnitIndicatorLegend[2].OriginalValue)); //Change different time range //a. 2012/07/01 3:30-2012/07/01 15:00 hour var ManualTimeRange = input.InputData.ManualTimeRange; EnergyViewToolbar.SetDateRange(ManualTimeRange[0].StartDate, ManualTimeRange[0].EndDate); EnergyViewToolbar.SetTimeRange(ManualTimeRange[0].StartTime, ManualTimeRange[0].EndTime); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Hour)); //b. 2012/07/01 3:30-2012/07/03 23:30 day EnergyViewToolbar.SetDateRange(ManualTimeRange[1].StartDate, ManualTimeRange[1].EndDate); EnergyViewToolbar.SetTimeRange(ManualTimeRange[1].StartTime, ManualTimeRange[1].EndTime); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day)); Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Hour)); //c. 2012/07/10-2012/08/05 week EnergyViewToolbar.SetDateRange(ManualTimeRange[2].StartDate, ManualTimeRange[2].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week)); Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day)); //d. 2012/01/01-2012/12/31=lastyear month EnergyViewToolbar.SetDateRange(ManualTimeRange[3].StartDate, ManualTimeRange[3].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Month)); //e. 2011/01/01-2013/05/30 year EnergyViewToolbar.SetDateRange(ManualTimeRange[4].StartDate, ManualTimeRange[4].EndDate); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Month)); Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year)); }