Exemplo n.º 1
0
        public void CostSetDisplayStep8(DisplayStepData input)
        {
            HomePagePanel.SelectCustomer("NancyCostCustomer2");
            TimeManager.MediumPause();

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

            //Select 组织A->园区A->楼宇B
            CostPanel.SelectHierarchy(input.InputData.Hierarchies);
            TimeManager.MediumPause();

            //Selected Time Range=2012/07/01-2012/07/31
            var timeRange = input.InputData.ManualTimeRange;

            EnergyViewToolbar.SetDateRange(timeRange[0].StartDate, timeRange[0].EndDate);
            TimeManager.MediumPause();

            //Commodity=电, Click "峰谷展示".
            CostPanel.SelectCommodity(input.InputData.commodityNames[0]);
            TimeManager.MediumPause();
            EnergyViewToolbar.ShowPeakValley();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Optional step=day/week.
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //Selected Time Range=2012/07/29-2012/08/04
            EnergyViewToolbar.SetDateRange(timeRange[1].StartDate, timeRange[1].EndDate);
            TimeManager.MediumPause();
            EnergyViewToolbar.ShowPeakValley();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();
            EnergyViewToolbar.ShowPeakValley();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Optional step=day/hour.
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //Click optional step=hour button
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour);
            TimeManager.LongPause();
            TimeManager.LongPause();

            //Showing message in dialog, No Optional step=hour in dialog.
            Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.ExpectedData.StepMessage[0]));
            JazzMessageBox.MessageBox.Confirm();
            TimeManager.MediumPause();
        }
Exemplo n.º 2
0
        public void SetDisplayStep1015(DisplayStepData input)
        {
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //1. Selected Time Range
            var timeRange = input.InputData.ManualTimeRange;

            for (int i = 0; i < timeRange.Length; i++)
            {
                EnergyViewToolbar.SetDateRange(timeRange[i].StartDate, timeRange[i].EndDate);
                TimeManager.ShortPause();

                //Check tag and view data view
                EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
                EnergyViewToolbar.View(EnergyViewType.Column);
                EnergyViewToolbar.ClickViewButton();
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();

                //Default is month
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Month));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Min));//not repro:? There is no raw step in UI, but it can be found raw step in code.

                //Click all Optional Steps to change chart view.
                EnergyViewToolbar.View(EnergyViewType.Line);
                EnergyViewToolbar.ClickViewButton();
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();

                Assert.IsTrue(EnergyAnalysis.IsTrendChartDrawn());
                //Default is month
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Month));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Min));

                //back to intinial
                EnergyAnalysis.UncheckTag(input.InputData.TagNames[0]);
                EnergyViewToolbar.ClickViewButton();
                TimeManager.LongPause();
            }
        }
Exemplo n.º 3
0
        public void EnergyAnalysisSetDisplayStep4(DisplayStepData input)
        {
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //Set date range "2012/07/29-2012/08/03"
            var timeRange = input.InputData.ManualTimeRange;

            //4. Select Start Time or End Time which cannot be covered with whole step.
            //Set date range "2012/07/01 3:30-2012/07/03 23:30", only check VD with data view
            EnergyViewToolbar.SetDateRange(timeRange[2].StartDate, timeRange[2].EndDate);
            EnergyViewToolbar.SetTimeRange(timeRange[2].StartTime, timeRange[2].EndTime);
            TimeManager.ShortPause();

            //Step as 1 day, and then 7/2 and 7/3 day data is loaded.).
            EnergyAnalysis.CheckTag(input.InputData.TagNames[1]);
            EnergyViewToolbar.View(EnergyViewType.List);
            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]);

            //Delete all datas
            //Click  "删除所有" option then confirm
            EnergyViewToolbar.SelectMoreOption(EnergyViewMoreOption.DeleteAll);
            TimeManager.MediumPause();
            Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.ExpectedData.ClearAllMessage));
            JazzMessageBox.MessageBox.Clear();
            TimeManager.MediumPause();

            //4. Set date range "2012/07/15-2012/12/15", only check VM with data view
            EnergyViewToolbar.SetDateRange(timeRange[3].StartDate, timeRange[3].EndDate);
            TimeManager.ShortPause();

            EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
            TimeManager.ShortPause();

            //Step as 1 month, and then 8-12 month data is loaded.).
            EnergyViewToolbar.View(EnergyViewType.List);
            EnergyViewToolbar.ClickViewButton();
            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]);
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Month));
        }
Exemplo n.º 4
0
        public void SetDisplayStep1012(DisplayStepData input)
        {
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //1. Selected Time Range=2012/07/01 3:00-2012/07/01 15:00
            var timeRange = input.InputData.ManualTimeRange;

            EnergyViewToolbar.SetDateRange(timeRange[0].StartDate, timeRange[0].EndDate);
            EnergyViewToolbar.SetTimeRange(timeRange[0].StartTime, timeRange[0].EndTime);
            TimeManager.ShortPause();

            //Check tag and view data view
            EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
            EnergyViewToolbar.View(EnergyViewType.Column);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Optional step=raw/hour, and default is hour
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Min));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Hour));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //Click all Optional Steps to change chart view.
            EnergyViewToolbar.View(EnergyViewType.Line);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            Assert.IsTrue(EnergyAnalysis.IsTrendChartDrawn());
            //Optional step=raw/hour, and default is hour
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Min));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Hour));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //The energy data is aggregated as expected
            EnergyAnalysis.ExportExpectedDataTableToExcel(input.ExpectedData.expectedFileName[0], DisplayStep.Default);
            TimeManager.MediumPause();
            EnergyAnalysis.CompareDataViewOfEnergyAnalysis(input.ExpectedData.expectedFileName[0], input.InputData.failedFileName[0]);
        }
Exemplo n.º 5
0
        public void RawStep(DisplayStepData input)
        {
            //10. Select NancyOtherSite->BuildingMultipleSteps
            CostPanel.SelectHierarchy(input.InputData.Hierarchies);
            TimeManager.LongPause();
            TimeManager.LongPause();

            //V(H)
            EnergyAnalysis.CheckTag(input.InputData.TagNames[2]);
            TimeManager.ShortPause();

            //Selected Time Range=2012/07/29-2012/08/03
            //Selected Time Range=2012/07/01-2012/07/31
            var timeRange = input.InputData.ManualTimeRange;

            for (int i = 0; i < 2; i++)
            {
                EnergyViewToolbar.SetDateRange(timeRange[i].StartDate, timeRange[i].EndDate);
                TimeManager.MediumPause();

                //Click view button
                EnergyViewToolbar.ClickViewButton();
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();

                //Change option=Raw step
                EnergyAnalysis.ClickDisplayStep(DisplayStep.Min);
                //JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();

                //Check Showing message in dialog  '换个步长试试'.
                Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0]));
                Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day));
                Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour));
                EnergyAnalysis.ClickStepButtonOnWindow(DisplayStep.Day);
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));

                //Change option=Raw step again
                EnergyAnalysis.ClickDisplayStep(DisplayStep.Min);
                //JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();

                //Check Hide dialog when select cancel, Display original view before selection.
                Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0]));
                Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day));
                Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour));
                EnergyAnalysis.ClickGiveupButtonOnWindow();
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            }

            //For multiple data sources, one step in Optional Steps is not supported by one source.
            //P(H)
            EnergyAnalysis.UncheckTag(input.InputData.TagNames[1]);
            EnergyAnalysis.CheckTag(input.InputData.TagNames[2]);
            TimeManager.ShortPause();

            //Selected Time Range=2012/07/29-2012/08/03
            EnergyViewToolbar.SetDateRange(timeRange[0].StartDate, timeRange[0].EndDate);
            TimeManager.MediumPause();
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Change step to raw
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Min);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Select tag "VH_SiteS1"
            EnergyAnalysis.CheckTag(input.InputData.TagNames[1]);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Showing message in dialog and display available step=day&hour for selection.
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0]));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour));
            EnergyAnalysis.ClickGiveupButtonOnWindow();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Check Hide dialog. Display original view before selection.  Uncheck V(H).
            Assert.AreEqual(false, EnergyAnalysis.IsTagChecked(input.InputData.TagNames[1]));
            TimeManager.ShortPause();

            //Select P(H) and V(D) go to data view in energy view. Click Option=hour.
            EnergyAnalysis.CheckTag(input.InputData.TagNames[3]);
            TimeManager.ShortPause();
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Selected Time Range=2012/07/01-2012/08/01
            EnergyViewToolbar.SetDateRange(timeRange[2].StartDate, timeRange[2].EndDate);
            TimeManager.MediumPause();
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //check Showing message in dialog  'Pop message中显示的“推荐步长”按钮最多3枚,按照从小到大的顺序,超出的不显示。'.
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[1]));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Week));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour));
            EnergyAnalysis.ClickGiveupButtonOnWindow();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Go to Ratio indicator. Selected a DayNightP from NancyOtherCustomter3. Formula=V(H). Aggregate Step=day.
            RatioPanel.NavigateToRatio();
            TimeManager.MediumPause();
            RatioPanel.SelectHierarchy(input.InputData.OtherHierarchies);
            TimeManager.LongPause();
            RatioPanel.CheckTag(input.InputData.TagNames[4]);
            TimeManager.ShortPause();

            //Selected Time Range=2012/07/01-2012/07/01
            EnergyViewToolbar.SetDateRange(timeRange[3].StartDate, timeRange[3].EndDate);
            TimeManager.MediumPause();
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Check No Optional step=Raw optional button.
            Assert.AreEqual(false, EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Min));
        }
Exemplo n.º 6
0
        public void CostSetDisplayStep10To16(DisplayStepData input)
        {
            //10. Select NancyOtherSite->BuildingMultipleSteps
            CostPanel.SelectHierarchy(input.InputData.Hierarchies);
            TimeManager.MediumPause();

            //V(M), V(H)
            EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
            EnergyAnalysis.CheckTag(input.InputData.TagNames[1]);
            TimeManager.ShortPause();

            //Selected Time Range=2012/07/01-2012/08/01
            var timeRange = input.InputData.ManualTimeRange;

            EnergyViewToolbar.SetDateRange(timeRange[0].StartDate, timeRange[0].EndDate);
            TimeManager.MediumPause();

            EnergyViewToolbar.View(EnergyViewType.Distribute);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Selected Time Range=2012/07/29-2012/08/03
            EnergyViewToolbar.SetDateRange(timeRange[1].StartDate, timeRange[1].EndDate);
            TimeManager.MediumPause();

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

            //11. Select different aggregated step tags to display distribution chart.
            //V(M), P(H)
            EnergyAnalysis.UncheckTag(input.InputData.TagNames[1]);
            EnergyAnalysis.CheckTag(input.InputData.TagNames[2]);
            TimeManager.ShortPause();

            //Selected Time Range=2012/07/01-2012/07/31
            EnergyViewToolbar.SetDateRange(timeRange[2].StartDate, timeRange[2].EndDate);
            TimeManager.MediumPause();

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

            //Change chart type from distribution chart to trend chart.
            EnergyViewToolbar.View(EnergyViewType.Line);
            TimeManager.LongPause();
            TimeManager.LongPause();
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0]));
            JazzWindow.WindowMessageInfos.Quit();
            TimeManager.ShortPause();

            //Back to default original status
            EnergyAnalysis.UncheckTag(input.InputData.TagNames[0]);
            EnergyAnalysis.UncheckTag(input.InputData.TagNames[2]);
            EnergyViewToolbar.View(EnergyViewType.Line);
            EnergyViewToolbar.ClickViewButton();
            TimeManager.LongPause();

            //12. Go to chart view with original default time range(7 days). Select a V(M) tag.
            EnergyViewToolbar.SetDateRange(timeRange[3].StartDate, timeRange[3].EndDate);
            TimeManager.MediumPause();
            EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
            EnergyViewToolbar.ClickViewButton();
            TimeManager.LongPause();
            TimeManager.LongPause();
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0]));
            JazzWindow.WindowMessageInfos.Quit();
            TimeManager.ShortPause();

            //Back to default original status
            EnergyAnalysis.UncheckTag(input.InputData.TagNames[0]);
            EnergyViewToolbar.View(EnergyViewType.Line);
            EnergyViewToolbar.ClickViewButton();
            TimeManager.LongPause();

            //14.Select V(H) and go to data view in energy view. Click Option=hour.
            EnergyViewToolbar.SetDateRange(timeRange[3].StartDate, timeRange[3].EndDate);
            TimeManager.MediumPause();
            EnergyAnalysis.CheckTag(input.InputData.TagNames[1]);
            EnergyViewToolbar.View(EnergyViewType.List);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //VD, Selected Time Range=2012/01/01-2013/01/01
            EnergyAnalysis.CheckTag(input.InputData.TagNames[3]);
            EnergyViewToolbar.SetDateRange(timeRange[4].StartDate, timeRange[4].EndDate);
            TimeManager.MediumPause();
            EnergyViewToolbar.ClickViewButton();
            TimeManager.LongPause();
            TimeManager.LongPause();
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[1]));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Week));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Month));
            JazzWindow.WindowMessageInfos.Quit();
            TimeManager.ShortPause();

            //Back to default original status
            EnergyAnalysis.UncheckTag(input.InputData.TagNames[3]);
            EnergyViewToolbar.View(EnergyViewType.Line);
            EnergyViewToolbar.ClickViewButton();
            TimeManager.LongPause();

            //16.Select V(H) and go to data view in energy view. Click Option=hour.
            EnergyViewToolbar.SetDateRange(timeRange[3].StartDate, timeRange[3].EndDate);
            TimeManager.MediumPause();
            EnergyAnalysis.CheckTag(input.InputData.TagNames[1]);
            EnergyViewToolbar.View(EnergyViewType.List);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Check other V(M) and click view chart again.
            EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
            EnergyViewToolbar.ClickViewButton();
            TimeManager.LongPause();
            TimeManager.LongPause();
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0]));
            Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Month));
            JazzWindow.WindowMessageInfos.Quit();
            TimeManager.LongPause();

            Assert.IsFalse(EnergyAnalysis.IsTagChecked(input.InputData.TagNames[0]));
            Assert.IsTrue(EnergyAnalysis.IsTagChecked(input.InputData.TagNames[1]));
        }
Exemplo n.º 7
0
        public void EnergyAnalysisSetDisplayStep123(DisplayStepData input)
        {
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //Set date range "2012/07/29-2012/08/03"
            var timeRange = input.InputData.ManualTimeRange;

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

            //Check tag and view trend chart
            EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
            EnergyViewToolbar.ClickViewButton();
            TimeManager.LongPause();
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0]));
            JazzWindow.WindowMessageInfos.Quit();
            TimeManager.ShortPause();

            //Display original view before selection. Uncheck V(M)
            Assert.IsFalse(EnergyAnalysis.IsTagChecked(input.InputData.TagNames[0]));
            Assert.IsTrue(EnergyAnalysis.EntirelyNoChartDrawn());

            //Set date range "2012/07/01-2012/07/31"
            EnergyViewToolbar.SetDateRange(timeRange[1].StartDate, timeRange[1].EndDate);
            TimeManager.ShortPause();

            //Check tag and view trend chart
            EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
            EnergyViewToolbar.ClickViewButton();
            TimeManager.LongPause();
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[0]));
            JazzWindow.WindowMessageInfos.Quit();
            TimeManager.ShortPause();

            //Display original view before selection. Uncheck V(M)
            Assert.IsFalse(EnergyAnalysis.IsTagChecked(input.InputData.TagNames[0]));
            Assert.IsTrue(EnergyAnalysis.EntirelyNoChartDrawn());

            //For multiple data sources, one step in Optional Steps is not supported by one source.VD and VH
            EnergyViewToolbar.SetDateRange(timeRange[0].StartDate, timeRange[0].EndDate);
            TimeManager.ShortPause();
            EnergyAnalysis.CheckTag(input.InputData.TagNames[1]);
            EnergyAnalysis.CheckTag(input.InputData.TagNames[2]);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour);
            TimeManager.LongPause();
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[1]));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour));
            EnergyAnalysis.ClickStepButtonOnWindow(DisplayStep.Day);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));

            //Set date range "2012/07/01-2012/07/31", only check VD with line chart and data view
            EnergyViewToolbar.SetDateRange(timeRange[1].StartDate, timeRange[1].EndDate);
            TimeManager.ShortPause();
            EnergyAnalysis.UncheckTag(input.InputData.TagNames[2]);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Week);
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));

            //Covnert to data view
            EnergyViewToolbar.View(EnergyViewType.List);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Week));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
            EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour);
            TimeManager.LongPause();
            Assert.IsTrue(JazzWindow.WindowMessageInfos.GetContentValue().Contains(input.ExpectedData.messages[1]));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsStepButtonOnWindow(DisplayStep.Hour));
            TimeManager.MediumPause();
            EnergyAnalysis.ClickStepButtonOnWindow(DisplayStep.Week);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Week));
        }
Exemplo n.º 8
0
        public void EnergyAnalysisSetDisplayStep6(DisplayStepData input)
        {
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            var timeRange = input.InputData.ManualTimeRange;

            EnergyAnalysis.CheckTag(input.InputData.TagNames[2]);
            TimeManager.ShortPause();

            //6. Switch from data view to trend chart view and original step is not supported.
            //To 2012/07/10-2012/08/05
            EnergyViewToolbar.View(EnergyViewType.List);
            EnergyViewToolbar.SetDateRange(timeRange[10].StartDate, timeRange[10].EndDate);
            TimeManager.ShortPause();

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

            //Only "Week" and "Day" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //to chart view
            EnergyViewToolbar.View(EnergyViewType.Line);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Only "Week" and "Day" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //To 2012/01/01-2012/12/31
            EnergyViewToolbar.SetDateRange(timeRange[8].StartDate, timeRange[8].EndDate);
            TimeManager.ShortPause();

            EnergyViewToolbar.View(EnergyViewType.List);
            TimeManager.ShortPause();
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Only "hour" "Week" "month" and "Day" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //change to line chart
            EnergyViewToolbar.View(EnergyViewType.Line);
            EnergyViewToolbar.ClickViewButton();
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();

            //Only "month" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));
        }
Exemplo n.º 9
0
        public void EnergyAnalysisSetDisplayStep5(DisplayStepData input)
        {
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            var timeRange = input.InputData.ManualTimeRange;

            EnergyAnalysis.CheckTag(input.InputData.TagNames[2]);
            TimeManager.ShortPause();

            //5. Change time range from 2012/07/01 3:30-2012/07/01 15:30
            EnergyViewToolbar.SetDateRange(timeRange[4].StartDate, timeRange[4].EndDate);
            EnergyViewToolbar.SetTimeRange(timeRange[4].StartTime, timeRange[4].EndTime);
            TimeManager.ShortPause();

            EnergyViewToolbar.View(EnergyViewType.Column);
            JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
            TimeManager.LongPause();
            TimeManager.LongPause();

            //Only "hour" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Hour));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //To 2012/07/29 3:30-2012/08/03 15:30
            EnergyViewToolbar.SetDateRange(timeRange[5].StartDate, timeRange[5].EndDate);
            EnergyViewToolbar.SetTimeRange(timeRange[5].StartTime, timeRange[5].EndTime);
            TimeManager.ShortPause();

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

            //Only "hour" and "Day" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Hour));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //To 2012/07/01-2012/07/31
            EnergyViewToolbar.SetDateRange(timeRange[6].StartDate, timeRange[6].EndDate);
            TimeManager.ShortPause();

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

            //Only "Week" and "Day" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //To 2012/06/01-2012/08/31
            EnergyViewToolbar.SetDateRange(timeRange[7].StartDate, timeRange[7].EndDate);
            TimeManager.ShortPause();

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

            //Only "Month" pressed, "Week" and "Day" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //To 2012/01/01-2012/12/31
            EnergyViewToolbar.SetDateRange(timeRange[8].StartDate, timeRange[8].EndDate);
            TimeManager.ShortPause();

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

            //Only "Month" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Month));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

            //2008/01/01-2013/01/01
            EnergyViewToolbar.SetDateRange(timeRange[9].StartDate, timeRange[9].EndDate);
            TimeManager.ShortPause();

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

            //Only "Week" and "Day" button display
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Month));
            Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
            Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
        }
Exemplo n.º 10
0
        public void SetDisplayStep1011(DisplayStepData input)
        {
            EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies);
            JazzMessageBox.LoadingMask.WaitSubMaskLoading();
            TimeManager.MediumPause();

            //1. Selected Time Range
            var timeRange = input.InputData.ManualTimeRange;

            for (int i = 0; i < timeRange.Length; i++)
            {
                EnergyViewToolbar.SetDateRange(timeRange[i].StartDate, timeRange[i].EndDate);
                EnergyViewToolbar.SetTimeRange(timeRange[i].StartTime, timeRange[i].EndTime);
                TimeManager.ShortPause();

                //Check tag and view data view
                EnergyAnalysis.CheckTag(input.InputData.TagNames[0]);
                //EnergyViewToolbar.View(EnergyViewType.List);//? If view list chart here, there is no chart display when change chart to line in next step.
                EnergyViewToolbar.View(EnergyViewType.Column);
                EnergyViewToolbar.ClickViewButton();
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();

                //Optional step=day/hour/raw, and default is day
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Min));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

                //Click all Optional Steps to change chart view.
                EnergyViewToolbar.View(EnergyViewType.Line);
                EnergyViewToolbar.ClickViewButton();
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();

                Assert.IsTrue(EnergyAnalysis.IsTrendChartDrawn());
                //Optional step=day/hour/raw, and default is day
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Day));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Min));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

                //click "hour"
                EnergyAnalysis.ClickDisplayStep(DisplayStep.Hour);
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Hour));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Min));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

                //click "Raw"
                EnergyAnalysis.ClickDisplayStep(DisplayStep.Min);
                JazzMessageBox.LoadingMask.WaitChartMaskerLoading();
                TimeManager.LongPause();
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepPressed(DisplayStep.Min));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Day));
                Assert.IsTrue(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Hour));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Week));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Month));
                Assert.IsFalse(EnergyAnalysis.IsDisplayStepDisplayed(DisplayStep.Year));

                //back to intinial
                EnergyAnalysis.UncheckTag(input.InputData.TagNames[0]);
                EnergyViewToolbar.ClickViewButton();
                TimeManager.LongPause();
            }
        }