public void SaveWidgetToExistingDashboard(MaximizeWidgetData input) { var dashboard = input.InputData.DashboardInfo; //Add a widget whose name is the same as the deleted widget for the same dashboard of the Hiearchy node. EnergyAnalysis.NavigateToEnergyAnalysis(); EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //Check tag and view data view EnergyAnalysis.CheckTag(input.InputData.TagName); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.Toolbar.SaveToDashboard(dashboard[0].WigetNames[0], dashboard[0].HierarchyName, dashboard[0].IsCreateDashboard, dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); //Add widget successfully into the dashboard and displayed in the last available space. Widget.NavigateToAllDashboard(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(60); TimeManager.LongPause(); Assert.AreEqual(12, HomePagePanel.GetWidgetsNumberOfDashboard()); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); }
public void RenameWidgetInvalid(MaximizeWidgetData input) { //Click on a Hierarchy node that contains dashboard. var dashboard = input.InputData.DashboardInfo; HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(60); TimeManager.LongPause(); // select a widget, click 'Rename' button on the widget title. HomePagePanel.RenameWidgetOpen(dashboard[0].WigetNames[0]); //Input the invalid name, and click save for (int i = 1; i < (input.ExpectedData.newWidgetName.Length); i++) { Widget.FillNewWidgetName(input.InputData.newWidgetName[i]); Widget.ClickSaveWidgetNameButton(); TimeManager.ShortPause(); Assert.IsTrue(Widget.IsWidgetNameFieldInvalid()); Assert.IsTrue(Widget.GetWidgetNameFieldInvalidMsg().Contains(input.ExpectedData.newWidgetName[i])); } //Revise above invalid name to be valid, and click Save. Widget.FillNewWidgetName(input.InputData.newWidgetName[0]); Widget.ClickSaveWidgetNameButton(); TimeManager.ShortPause(); //The widget rename saved Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(input.ExpectedData.newWidgetName[0])); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); }
public void SaveWidgetOnRanking(MaximizeWidgetData input) { var dashboard = input.InputData.DashboardInfo; CorporateRanking.NavigateToCorporateRanking(); TimeManager.MediumPause(); //Go to chart view of corporate ranking function, and click 'Save widget to dashboard'. CorporateRanking.ClickSelectHierarchyButton(); TimeManager.MediumPause(); CorporateRanking.OnlyCheckHierarchyNode(input.InputData.Hierarchies); CorporateRanking.ClickConfirmHiearchyButton(); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.LongPause(); TimeManager.LongPause(); CorporateRanking.SelectCommodity(input.InputData.TagName); TimeManager.LongPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.Toolbar.SaveToDashboard(dashboard[0].WidgetName, null, dashboard[0].IsCreateDashboard, dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); Assert.AreEqual(input.ExpectedData.invalidMessage[0], SaveToDs.GetUnselectHierarchyMsg()); SaveToDs.Close(); }
public void RenameWidgetValid(MaximizeWidgetData input) { //Click on a Hierarchy node that contains dashboard. var dashboard = input.InputData.DashboardInfo; HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(60); TimeManager.LongPause(); // select a widget, click 'Rename' button on the widget title. HomePagePanel.RenameWidgetOpen(dashboard[0].WigetNames[0]); //Input the valid name, and click cancel or 'x' icon. Widget.FillNewWidgetName(input.InputData.newWidgetName[0]); Widget.CancelModifyWidgetName(); //The widget rename cancelled Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(input.ExpectedData.newWidgetName[0])); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); //Input the valid name like '小工具_123', and click save. HomePagePanel.RenameWidgetOpen(dashboard[0].WigetNames[0]); Widget.FillNewWidgetName(input.InputData.newWidgetName[0]); Widget.ClickSaveWidgetNameButton(); TimeManager.MediumPause(); //The widget rename saved Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(input.ExpectedData.newWidgetName[0])); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(); TimeManager.LongPause(); //Mouse over a dashboard which hasn't been marked as favorite, //Click the 'star' icon which is unlighted now. HomePagePanel.ClickFavoriteDashboardButton(dashboard[0].DashboardName); TimeManager.LongPause(); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsDashboardFavorited(dashboard[0].DashboardName)); //Switch to 'My Favorite' (我的收藏) tab. Widget.NavigateToMyFavorite(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(60); TimeManager.MediumPause(); //The new name is displayed on the widget of the favorite dashboard. Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(input.ExpectedData.newWidgetName[0])); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); //On 'My favorite' page, there is no 'Rename' button on any widget. Assert.IsFalse(HomePagePanel.IsRenameButtonDisplayed(input.ExpectedData.newWidgetName[0])); }
public void RenameWidgetValid2(MaximizeWidgetData input) { //Click on a Hierarchy node that contains dashboard. var dashboard = input.InputData.DashboardInfo; HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(60); TimeManager.LongPause(); //Without any modification, just save the original name directly. HomePagePanel.RenameWidgetOpen(dashboard[0].WigetNames[1]); Widget.ClickSaveWidgetNameButton(); TimeManager.MediumPause(); //The widget rename saved Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[1])); TimeManager.MediumPause(); //valid name (e.g. '小组件 Widget_1xxxxx') for (int i = 1; i < 3; i++) { HomePagePanel.RenameWidgetOpen(dashboard[0].WigetNames[i]); TimeManager.ShortPause(); Widget.FillNewWidgetName(input.InputData.newWidgetName[i]); Widget.ClickSaveWidgetNameButton(); TimeManager.MediumPause(); //The widget rename saved Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(input.ExpectedData.newWidgetName[i])); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[i])); } HomePagePanel.ClickDashboardButton(dashboard[1].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(60); TimeManager.MediumPause(); //valid name (e.g. '小组件 Widget_1xxxxx') for (int j = 3; j < 5; j++) { HomePagePanel.RenameWidgetOpen(dashboard[1].WigetNames[j - 3]); TimeManager.ShortPause(); Widget.FillNewWidgetName(input.InputData.newWidgetName[j]); Widget.ClickSaveWidgetNameButton(); TimeManager.MediumPause(); //The widget rename saved Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(input.ExpectedData.newWidgetName[j])); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[1].WigetNames[j - 3])); } }
public void ViewWidgetTemplate(MaximizeWidgetData input) { Widget.ClickWidgetTemplateQuickCreateButton(); //All template display there for (int i = 0; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(input.ExpectedData.WidgetNames[i])); } //Click close button Widget.ClickWidgetTemplateQuickCreateButtonCloseButton(); //Verify 快速创建 button display Assert.IsTrue(Widget.IsWidgetTemplateQuickCreateButtonExisted()); }
public void SaveWidgetWithAnnotation(MaximizeWidgetData input) { var dashboard = input.InputData.DashboardInfo; //Navigate to Energy Analysis, EnergyAnalysis.NavigateToEnergyAnalysis(); EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyAnalysis.CheckTag(input.InputData.TagName); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Save to Dashboard with annotation EnergyAnalysis.Toolbar.SaveToDashboardwithAnnotation(dashboard[0].WigetNames[0], dashboard[0].HierarchyName, dashboard[0].IsCreateDashboard, dashboard[0].DashboardName, dashboard[0].Comment); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); //Navigate to Homepage->Dashboard Widget.NavigateToAllDashboard(); TimeManager.LongPause(); //Click the dashboard and verify the widget. HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); //A widget with default name, proper annotation and are added into the selected dashboard successfully. Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); HomePagePanel.FloatOnEditCommentButton(dashboard[0].WigetNames[0]); TimeManager.ShortPause(); Assert.AreEqual(input.ExpectedData.widgetComment[0], HomePagePanel.GetExistedCommentMinWdiget()); //Go to check favorite dashboard.The widget with added annotation display. HomePagePanel.NavigateToMyFavorite(); TimeManager.MediumPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); HomePagePanel.FloatOnEditCommentButton(dashboard[0].WigetNames[0]); TimeManager.ShortPause(); Assert.AreEqual(input.ExpectedData.widgetComment[0], HomePagePanel.GetExistedCommentMinWdiget()); }
public void DeleteWidget(MaximizeWidgetData input) { //Click on a Hierarchy node that contains dashboard. var dashboard = input.InputData.DashboardInfo; HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); //From the dashboard, select a widget, click 'Delete' button on the widget title. HomePagePanel.DeleteWidgetOpen(dashboard[0].WigetNames[0]); TimeManager.ShortPause(); //Warning message is prompted to user for confirmation on the deletion. Assert.IsTrue(JazzMessageBox.MessageBox.GetMessage().Contains(input.ExpectedData.messages[0])); //Click 'Cancel' (取消) in the pop up confirmation window. JazzMessageBox.MessageBox.GiveUp(); TimeManager.MediumPause(); //The deletion is cancelled and the widget is still displayed on the dashboard. Assert.AreEqual(4, HomePagePanel.GetWidgetsNumberOfDashboard()); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); //Click 'Yes' (确定) in the pop up confirmation window. HomePagePanel.DeleteWidgetOpen(dashboard[0].WigetNames[0]); TimeManager.ShortPause(); JazzMessageBox.MessageBox.Delete(); TimeManager.MediumPause(); //The widget is removed from the dashboard. Assert.AreEqual(3, HomePagePanel.GetWidgetsNumberOfDashboard()); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); //Swtich to other dashboard/function, back to the dashboard. Widget.NavigateToEnergyView(); TimeManager.ShortPause(); Widget.NavigateToAllDashboard(); HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); //The widget deletion is saved successfully.The dashboard and locations of the widgets are dispalyed correctly. Assert.AreEqual(3, HomePagePanel.GetWidgetsNumberOfDashboard()); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(); TimeManager.LongPause(); //Mouse over a dashboard which hasn't been marked as favorite, //Click the 'star' icon which is unlighted now. HomePagePanel.ClickFavoriteDashboardButton(dashboard[0].DashboardName); TimeManager.LongPause(); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsDashboardFavorited(dashboard[0].DashboardName)); //Switch to 'My Favorite' (我的收藏) tab. Widget.NavigateToMyFavorite(); TimeManager.ShortPause(); //View the dashboard that the deleted widget belonged to. HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); //The widget is deleted from the favorite dashboard on 'My favorite' page as well. Assert.AreEqual(3, HomePagePanel.GetWidgetsNumberOfDashboard()); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); //back to Widget.NavigateToAllDashboard(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); //Delete all widgets of the dashboard. for (int i = 1; i < dashboard[0].WigetNames.Length; i++) { HomePagePanel.DeleteWidgetOpen(dashboard[0].WigetNames[i]); TimeManager.ShortPause(); JazzMessageBox.MessageBox.Delete(); TimeManager.MediumPause(); //Assert.AreEqual((dashboard[0].WigetNames.Length - i - 1), HomePagePanel.GetWidgetsNumberOfDashboard()); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[i])); } //The dashboard becomes empty with a message '该仪表盘为空'. //Assert.IsTrue(HomePagePanel.IsEmptyDashboardLabelExisted()); //The favorite dashboard becomes empty as well since the hierachy based one has been empty. Widget.NavigateToMyFavorite(); TimeManager.ShortPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsEmptyDashboardLabelExisted()); //back to Widget.NavigateToAllDashboard(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); //The dashboard becomes empty with a message '该仪表盘为空'. Assert.IsTrue(HomePagePanel.IsEmptyDashboardLabelExisted()); //Add a widget whose name is the same as the deleted widget for the same dashboard of the Hiearchy node. EnergyAnalysis.NavigateToEnergyAnalysis(); EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); //Check tag and view data view EnergyAnalysis.CheckTag(input.InputData.TagName); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyAnalysis.Toolbar.SaveToDashboard(dashboard[0].WigetNames[0], dashboard[0].HierarchyName, dashboard[0].IsCreateDashboard, dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); //Add widget successfully into the dashboard and displayed in the last available space. Widget.NavigateToAllDashboard(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); Assert.AreEqual(1, HomePagePanel.GetWidgetsNumberOfDashboard()); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); }
public void AnnotationViewInMaximumWindow(MaximizeWidgetData input) { var dashboard = input.InputData.DashboardInfo; //Navigate to Energy Analysis, EnergyAnalysis.NavigateToEnergyAnalysis(); EnergyAnalysis.SelectHierarchy(input.InputData.Hierarchies); JazzMessageBox.LoadingMask.WaitSubMaskLoading(); TimeManager.MediumPause(); EnergyAnalysis.CheckTag(input.InputData.TagName); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); //Save to Dashboard without annotation EnergyAnalysis.Toolbar.SaveToDashboard(dashboard[0].WigetNames[0], dashboard[0].HierarchyName, dashboard[0].IsCreateDashboard, dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitLoading(); TimeManager.LongPause(); //Navigate to Homepage->Dashboard Widget.NavigateToAllDashboard(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); //Click the dashboard and click the widget.Widget display in maximum size. HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); HomePagePanel.MaximizeWidget(dashboard[0].WigetNames[0]); //Verify annotation in the bottom.The annotation is blank with Add button Widget.ClickAddMaxWidgetCommentButton(); TimeManager.ShortPause(); //Click Add button.The Edit widget annotation window display. //Add some annotation in annotation field and click Confirm button.The annotation can be added properly. Widget.EditAnnotationWindow(dashboard[0].Comment); Widget.ClickSaveAnnotationWindowButton(); TimeManager.MediumPause(); //Verify annotation in the bottom.The tooltip display with the new annotation. The Edit button display. Widget.ClickEditMaxWidgetCommentButton(); TimeManager.ShortPause(); Widget.ClickQuitAnnotationWindowButton(); TimeManager.MediumPause(); Assert.AreEqual(input.ExpectedData.widgetComment[0], Widget.GetMaxWidgetComment()); Widget.ClickCloseMaxDialogButton(); TimeManager.ShortPause(); //Go to check favorite dashboard.The widget with modify new annotation display. HomePagePanel.NavigateToMyFavorite(); TimeManager.MediumPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); HomePagePanel.FloatOnEditCommentButton(dashboard[0].WigetNames[0]); TimeManager.ShortPause(); Assert.AreEqual(input.ExpectedData.widgetComment[0], HomePagePanel.GetExistedCommentMinWdiget()); //Navigate to Homepage->Dashboard Widget.NavigateToAllDashboard(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); //Click the dashboard and click the widget.Widget display in maximum size. HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); HomePagePanel.MaximizeWidget(dashboard[0].WigetNames[0]); //Click Edit button.Modify the annotation. Widget.ClickEditMaxWidgetCommentButton(); TimeManager.ShortPause(); Widget.EditAnnotationWindow(input.ExpectedData.widgetComment[1]); Widget.ClickSaveAnnotationWindowButton(); TimeManager.MediumPause(); //The annotation can be modified properly. Assert.AreEqual(input.ExpectedData.widgetComment[1], Widget.GetMaxWidgetComment()); Widget.ClickCloseMaxDialogButton(); TimeManager.ShortPause(); //Go to check favorite dashboard. HomePagePanel.NavigateToMyFavorite(); TimeManager.MediumPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); HomePagePanel.FloatOnEditCommentButton(dashboard[0].WigetNames[0]); TimeManager.ShortPause(); Assert.AreEqual(input.ExpectedData.widgetComment[1], HomePagePanel.GetExistedCommentMinWdiget()); //Navigate to Homepage->Dashboard Widget.NavigateToAllDashboard(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(dashboard[0].HierarchyName); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); //Change the annotation to blank and click Confirm button. //The annotation can be change to blank with no error.Edit button change to Add button properly. The icon is highlight. HomePagePanel.MaximizeWidget(dashboard[0].WigetNames[0]); Widget.ClickEditMaxWidgetCommentButton(); TimeManager.ShortPause(); Widget.EditAnnotationWindow(input.ExpectedData.widgetComment[2]); Widget.ClickSaveAnnotationWindowButton(); TimeManager.MediumPause(); Widget.ClickAddMaxWidgetCommentButton(); TimeManager.ShortPause(); Widget.ClickQuitAnnotationWindowButton(); TimeManager.MediumPause(); Widget.ClickCloseMaxDialogButton(); TimeManager.ShortPause(); //Go to check favorite dashboard.The widget with no annotation display HomePagePanel.NavigateToMyFavorite(); TimeManager.MediumPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); HomePagePanel.FloatOnEditCommentButton(dashboard[0].WigetNames[0]); TimeManager.ShortPause(); HomePagePanel.FloatOnEditCommentButton(dashboard[0].WigetNames[0]); TimeManager.ShortPause(); HomePagePanel.ClickAddAnnotationButton(); TimeManager.ShortPause(); Widget.ClickQuitAnnotationWindowButton(); TimeManager.MediumPause(); }
public void WidgetTemplateParameters(MaximizeWidgetData input) { var hierarchy = input.InputData.HierarchyInfo; HomePagePanel.SelectHierarchyNode(hierarchy[0]); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[5]); TimeManager.MediumPause(); TimeManager.MediumPause(); TimeManager.LongPause(); //判断 associate hierarchy, not tag check Assert.AreEqual(input.ExpectedData.HierarchyName[0], Widget.GetSelectHierarchyButtonText()); EnergyAnalysis.IsAllGridTagsUnchecked(); TimeManager.MediumPause(); TimeManager.MediumPause(); TimeManager.LongPause(); //2013,全年,请选择能效标识, 单位面积 Assert.AreEqual(input.ExpectedData.TimeName[0], Widget.GetComboxYearText()); Assert.AreEqual(input.ExpectedData.TimeName[1], Widget.GetComboxMonthText()); Assert.AreEqual(input.ExpectedData.BenchmarkName[0], Widget.GetMenuButtonLabellingIndustryConvertText()); Assert.AreEqual(input.ExpectedData.UnitTypeValue[0], Widget.GetMenuButtonEnergyViewConvertTargetText()); //choose a not building hierarchy node Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); HomePagePanel.SelectHierarchyNode(hierarchy[1]); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[5]); TimeManager.LongPause(); UserDataScope.IsHierarchyNodeChecked(hierarchy[1]); //判断节点名称 Assert.AreEqual(input.ExpectedData.HierarchyName[2], Widget.GetSelectHierarchyButtonText()); //判断 "该节点为非楼宇节点,请重新选择节点", 单位面积 //Assert.AreEqual(input.ExpectedData.UnitTypeValue[0], Widget.GetMenuButtonEnergyViewConvertTargetText()); Assert.AreEqual(input.ExpectedData.messages[0], HomePagePanel.GetPopNotesValue()); //Click rangking widget Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); HomePagePanel.SelectHierarchyNode(hierarchy[1]); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[6]); //判断 请选择层级结点进行排名,能耗, 单位面积排名 start and end time TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); Assert.AreEqual(input.ExpectedData.HierarchyName[1], Widget.GetRankSelectHierarchyButtonText()); Assert.AreEqual(input.ExpectedData.UnitTypeValue[1], Widget.GetRankTypeConvertTargetButtonText()); Assert.AreEqual(input.ExpectedData.FuncTypeValue[0], Widget.GetFuncModeConvertTargetButtonText()); Assert.AreEqual(input.ExpectedData.TimeName[2], Widget.GetStartDatePickerText()); Assert.AreEqual(input.ExpectedData.TimeName[3], Widget.GetEndDatePickerText()); //Click 年逐月能耗工休比 Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); HomePagePanel.SelectHierarchyNode(hierarchy[1]); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[0]); EnergyAnalysis.IsAllGridTagsUnchecked(); TimeManager.LongPause(); //判断工休比 start and end time 行业基准值 button disabled Assert.AreEqual(input.ExpectedData.RadioTypeValue[1], Widget.GetRadioTypeConvertTargetButtonText()); Assert.AreEqual(input.ExpectedData.TimeName[2], Widget.GetStartDatePickerText()); Assert.AreEqual(input.ExpectedData.TimeName[3], Widget.GetEndDatePickerText()); TimeManager.LongPause(); //Click 年逐月平米能耗 Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[1]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[4]); TimeManager.LongPause(); Assert.AreEqual(input.ExpectedData.FuncTypeValue[0], Widget.GetFuncModeConvertTargetButtonText()); TimeManager.LongPause(); Assert.AreEqual(input.ExpectedData.UnitTypeValue[0], Widget.GetUnitTypeButtonText()); TimeManager.LongPause(); //Click 年最大需量控制 Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[1]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[7]); EnergyAnalysis.IsAllGridTagsUnchecked(); //Click 年逐月碳排放 Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[1]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[3]); TimeManager.LongPause(); Assert.AreEqual(input.ExpectedData.CarbonConvertTypeValue[1], Widget.GetCarbonConvertTargetButtonText()); //年逐月成本 HomePagePanel.SelectCustomer("NancyCostCustomer2"); Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[1]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickOnWidgetTemplateField(input.InputData.WidgetNames[1]); TimeManager.LongPause(); Assert.IsFalse(Widget.IsPeakValleyButtonEnabled()); //年逐月电峰谷用电成本 with config TOU building HomePagePanel.SelectCustomer("NancyCostCustomer2"); Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[2]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[2]); TimeManager.LongPause(); Assert.IsTrue(costPanel.IsCommodityChecked(input.ExpectedData.CommodityValue[0])); TimeManager.LongPause(); Assert.IsTrue(Widget.IsPeakValleyButtonPressed()); //Make sure 2013 have data value //Assert.IsTrue(costPanel.IsColumnChartDrawn()); TimeManager.LongPause(); //年逐月电峰谷用电成本 without config TOU building Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[3]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[2]); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); Assert.IsTrue(Widget.IsPopMsgCorrect(input.ExpectedData.messages[1])); Widget.ClickNotConfigPeakValleyMessageCloseButton(); Assert.IsFalse(costPanel.IsCommodityChecked(input.ExpectedData.CommodityValue[0])); Assert.IsFalse(Widget.IsPeakValleyButtonEnabled()); //年逐月电峰谷用电成本 no electricity Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[4]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[2]); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); Assert.IsTrue(costPanel.IsNoSingleCommodity()); Assert.IsFalse(Widget.IsPeakValleyButtonEnabled()); //年逐月电峰谷用电成本 no building Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[1]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[2]); TimeManager.LongPause(); TimeManager.LongPause(); Assert.IsFalse(Widget.IsPeakValleyButtonEnabled()); //年逐月电峰谷用电成本 without hierarchy Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[2]); TimeManager.LongPause(); Assert.AreEqual(input.ExpectedData.HierarchyName[3], Widget.GetSelectHierarchyButtonText()); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); Assert.IsTrue(costPanel.IsNoSingleCommodity()); Assert.IsFalse(Widget.IsPeakValleyButtonEnabled()); //from map page HomePagePanel.SelectCustomer("NancyCostCustomer2"); JazzFunction.Navigator.NavigateHome(); HomePagePanel.ClickOnBuildingField("zy"); TimeManager.LongPause(); Widget.ClickCheckEnergyInfoLinkButton(); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); TimeManager.LongPause(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[5]); //2013,全年,请选择能效标识, 单位面积 TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); Assert.AreEqual(input.ExpectedData.TimeName[0], Widget.GetComboxYearText()); Assert.AreEqual(input.ExpectedData.TimeName[1], Widget.GetComboxMonthText()); Assert.AreEqual(input.ExpectedData.BenchmarkName[0], Widget.GetMenuButtonLabellingIndustryConvertText()); Assert.AreEqual(input.ExpectedData.UnitTypeValue[0], Widget.GetMenuButtonEnergyViewConvertTargetText()); }
public void UseWidgetTemplate(MaximizeWidgetData input) { var hierarchy = input.InputData.HierarchyInfo; var dashboard = input.InputData.DashboardInfo; HomePagePanel.SelectCustomer("NancyCostCustomer2"); Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[2]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[0]); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); EnergyAnalysis.CheckTag(input.InputData.TagName); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); EnergyViewToolbar.IsMoreMenuItemDisabled(input.InputData.MoreMenuItems[0]); EnergyViewToolbar.IsMoreMenuItemDisabled(input.InputData.MoreMenuItems[1]); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); EnergyAnalysis.Toolbar.SaveToDashboard(dashboard[0].WigetNames[0], dashboard[0].HierarchyName, dashboard[0].IsCreateDashboard, dashboard[0].DashboardName); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[2]); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[0])); TimeManager.LongPause(); HomePagePanel.RenameWidgetOpen(dashboard[0].WigetNames[0]); TimeManager.LongPause(); Widget.FillNewWidgetName(input.InputData.newWidgetName[0]); Widget.ClickSaveWidgetNameButton(); TimeManager.MediumPause(); TimeManager.LongPause(); HomePagePanel.ClickShareWidgetButton(input.InputData.newWidgetName[0]); TimeManager.Pause(HomePagePanel.WAITSHAREWINDOWTIME); Assert.IsTrue(ShareWindow.IsShareUserExistedOnWindow(dashboard[0].ShareUsers[0])); ShareWindow.CheckShareUser(dashboard[0].ShareUsers[0]); TimeManager.LongPause(); ShareWindow.ClickShareButton(); TimeManager.LongPause(); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); JazzMessageBox.LoadingMask.WaitDashboardHeaderLoading(15); TimeManager.LongPause(); HomePagePanel.DeleteWidgetOpen(input.InputData.newWidgetName[0]); TimeManager.ShortPause(); JazzMessageBox.MessageBox.Delete(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); Assert.IsFalse(HomePagePanel.IsWidgetExistedOnDashboard(input.InputData.newWidgetName[0])); HomePagePanel.SelectHierarchyNode(hierarchy[2]); TimeManager.LongPause(); Widget.ClickWidgetTemplateQuickCreateButton(); HomePagePanel.ClickWidgetTemplateField(input.InputData.WidgetNames[6]); TimeManager.LongPause(); TimeManager.LongPause(); CorporateRanking.ClickSelectHierarchyButton(); TimeManager.LongPause(); CorporateRanking.OnlyCheckHierarchyNode(hierarchy[2]); TimeManager.LongPause(); CorporateRanking.OnlyCheckHierarchyNode(hierarchy[3]); TimeManager.LongPause(); CorporateRanking.ClickConfirmHiearchyButton(); TimeManager.LongPause(); CorporateRanking.SelectCommodity(input.ExpectedData.CommodityValue[0]); TimeManager.MediumPause(); EnergyViewToolbar.ClickViewButton(); JazzMessageBox.LoadingMask.WaitChartMaskerLoading(); TimeManager.MediumPause(); TimeManager.LongPause(); EnergyAnalysis.Toolbar.SaveToDashboard(dashboard[0].WigetNames[1], dashboard[0].HierarchyName, dashboard[0].IsCreateDashboard, dashboard[0].DashboardName); TimeManager.LongPause(); Widget.NavigateToAllDashboard(); TimeManager.MediumPause(); TimeManager.LongPause(); TimeManager.LongPause(); HomePagePanel.SelectHierarchyNode(hierarchy[2]); HomePagePanel.ClickDashboardButton(dashboard[0].DashboardName); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnDashboard(dashboard[0].WigetNames[1])); }
public void FilterWidgetTemplateValid(MaximizeWidgetData input) { var widgetname = input.ExpectedData.WidgetNames; Widget.ClickWidgetTemplateQuickCreateButton(); Widget.ClickWidgetTemplateFilterButton(); TimeManager.MediumPause(); TimeManager.MediumPause(); //Check 行为,filter 年逐月能耗工休比 Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); //行为criteria display Assert.IsTrue(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[3])); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[0])); TimeManager.LongPause(); //Click applyfilter button, 行为 still check, 年逐月能耗工休比 still display Widget.ClickWidgetTemplateFilterButton(); TimeManager.LongPause(); //verify 行为 check, other uncheck Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[0])); TimeManager.LongPause(); Assert.IsTrue(Widget.IsWidgetTemplateChecked(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3])); TimeManager.LongPause(); //for (int i = 0; i < 3; i++) //{ // Assert.IsTrue(Widget.IsWidgetTemplateUnChecked(input.InputData.FilterPropertiesName[i], input.InputData.TargetObject[i])); //} //for (int i = 4; i < 19; i++) //{ // Assert.IsTrue(Widget.IsWidgetTemplateUnChecked(input.InputData.FilterPropertiesName[i], input.InputData.TargetObject[i])); //} //uncheck 行为 Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3]); //check 建筑 单位指标 Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[0])); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[1]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[7]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); //建筑 单位指标 criteria display Assert.IsTrue(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[1])); Assert.IsTrue(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[7])); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[4])); Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[1]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[7]); TimeManager.LongPause(); //Check 管理,行为,能源消耗,按年 Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[2], input.InputData.TargetObject[11]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[4], input.InputData.TargetObject[17]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); TimeManager.LongPause(); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[0])); for (int i = 4; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } TimeManager.LongPause(); Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[2], input.InputData.TargetObject[11]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[4], input.InputData.TargetObject[17]); TimeManager.LongPause(); TimeManager.LongPause(); //Check 建筑,按年 Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[1]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[4], input.InputData.TargetObject[17]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); for (int i = 1; i < 5; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } TimeManager.LongPause(); Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[1]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[4], input.InputData.TargetObject[17]); TimeManager.LongPause(); TimeManager.LongPause(); //check 管理,集团排名,能效分析,柱状图 Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[10]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[4]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[15]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[6])); TimeManager.LongPause(); Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[10]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[4]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[15]); TimeManager.LongPause(); TimeManager.LongPause(); //check 管理,碳排放,成本,柱状图 Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[5]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[6]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[15]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); for (int i = 1; i < 4; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } TimeManager.LongPause(); Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[5]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[6]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[15]); TimeManager.LongPause(); TimeManager.LongPause(); //check 能效标识图 Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[16]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[5])); TimeManager.LongPause(); Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[16]); TimeManager.LongPause(); TimeManager.LongPause(); //check 时段能耗比,线状图 Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[8]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[14]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[0])); TimeManager.LongPause(); TimeManager.LongPause(); Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[8]); TimeManager.LongPause(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[14]); TimeManager.LongPause(); TimeManager.LongPause(); //check all for (int i = 0; i < 4; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[i]); } for (int i = 4; i < 11; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[i]); } for (int i = 11; i < 14; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[2], input.InputData.TargetObject[i]); } for (int i = 14; i < 17; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[i]); } for (int i = 17; i < 19; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[4], input.InputData.TargetObject[i]); } TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); for (int i = 0; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } TimeManager.LongPause(); Widget.ClickWidgetTemplateFilterButton(); //uncheck all for (int i = 0; i < 4; i++) { Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[i]); } for (int i = 4; i < 11; i++) { Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[i]); } for (int i = 11; i < 14; i++) { Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[2], input.InputData.TargetObject[i]); } for (int i = 14; i < 17; i++) { Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[i]); } for (int i = 17; i < 19; i++) { Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[4], input.InputData.TargetObject[i]); } //for (int i = 0; i < 19; i++) //{ // Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[i], input.InputData.TargetObject[i]); //} TimeManager.LongPause(); TimeManager.LongPause(); //check 能效分析,碳排放 Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[4]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[2], input.InputData.TargetObject[12]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); for (int i = 0; i < 8; i++) { Assert.IsFalse(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } TimeManager.LongPause(); Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[4]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[2], input.InputData.TargetObject[12]); TimeManager.LongPause(); TimeManager.LongPause(); }
public void CleanFilterCriteria(MaximizeWidgetData input) { var widgetname = input.ExpectedData.WidgetNames; Widget.ClickWidgetTemplateQuickCreateButton(); Widget.ClickWidgetTemplateFilterButton(); TimeManager.LongPause(); //Check 设备 行为 checkboxs Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[2]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); TimeManager.LongPause(); //Verify clearfilter button display Assert.IsTrue(Widget.IsClearFilterButtonExisted()); //click 行为 close button. Widget.ClickWidgetTemplateCloseFilterButton(input.InputData.TargetObject[3]); //Verify 行为 criteria and widget template not display Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[3])); //All template not display there for (int i = 0; i < 8; i++) { Assert.IsFalse(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } //Click 'Filter Criteria' ('模板筛选') button to view Widget.ClickWidgetTemplateFilterButton(); //Verify 行为 unchecked Assert.IsTrue(Widget.IsWidgetTemplateUnChecked(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3])); //Verify 设备 checked Assert.IsTrue(Widget.IsWidgetTemplateChecked(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[2])); //All template not display there for (int i = 0; i < 8; i++) { Assert.IsFalse(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } //Click Cancel button Widget.ClickWidgetTemplateCancelFilterButton(); //Verify clearfilter button still display Assert.IsTrue(Widget.IsClearFilterButtonExisted()); //Click close button to 设备 Widget.ClickWidgetTemplateCloseFilterButton(input.InputData.TargetObject[2]); //Verify 设备 criteria and widget template display Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[2])); //All template display there for (int i = 0; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } //verify clearall button not display Assert.IsFalse(Widget.IsClearFilterButtonExisted()); //Click 'Filter Criteria' ('模板筛选') button Widget.ClickWidgetTemplateFilterButton(); //check all for (int i = 0; i < 4; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[i]); } for (int i = 4; i < 11; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[i]); } for (int i = 11; i < 14; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[2], input.InputData.TargetObject[i]); } for (int i = 14; i < 17; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[i]); } for (int i = 17; i < 19; i++) { Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[4], input.InputData.TargetObject[i]); } //click 'ApplyFilter' button. Widget.ClickWidgetTemplateApplyFilterButton(); //verity clearall button display Assert.IsTrue(Widget.IsClearFilterButtonExisted()); //Click 'Clean Criteria' ('清空筛选条件') button. Widget.ClickWidgetTemplateClearFilterButton(); //All criteria not display when all checkbox check for (int i = 0; i < 19; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } //All templates display there for (int i = 0; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } //Click 'Filter Criteria' ('模板筛选') button Widget.ClickWidgetTemplateFilterButton(); for (int i = 0; i < 4; i++) { Assert.IsTrue(Widget.IsWidgetTemplateUnChecked(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[i])); } for (int i = 4; i < 11; i++) { Assert.IsTrue(Widget.IsWidgetTemplateUnChecked(input.InputData.FilterPropertiesName[1], input.InputData.TargetObject[i])); } for (int i = 11; i < 14; i++) { Assert.IsTrue(Widget.IsWidgetTemplateUnChecked(input.InputData.FilterPropertiesName[2], input.InputData.TargetObject[i])); } for (int i = 14; i < 17; i++) { Assert.IsTrue(Widget.IsWidgetTemplateUnChecked(input.InputData.FilterPropertiesName[3], input.InputData.TargetObject[i])); } for (int i = 17; i < 19; i++) { Assert.IsTrue(Widget.IsWidgetTemplateUnChecked(input.InputData.FilterPropertiesName[4], input.InputData.TargetObject[i])); } //All templates display there for (int i = 0; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } }
public void FilterWidgetTemplateCancelled(MaximizeWidgetData input) { var widgetname = input.ExpectedData.WidgetNames; Widget.ClickWidgetTemplateQuickCreateButton(); Widget.ClickWidgetTemplateFilterButton(); TimeManager.LongPause(); //Uncheck any checkbox TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); TimeManager.LongPause(); TimeManager.LongPause(); //All template display there for (int i = 0; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } //All criteria not display when no checkbox check for (int i = 0; i < 19; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } //Verify clearfilter button not display Assert.IsFalse(Widget.IsClearFilterButtonExisted()); //Click filter button, check one checkbox,then uncheck, then applyfilter Widget.ClickWidgetTemplateFilterButton(); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); //All template display there for (int i = 0; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } //All criteria not display when no checkbox check for (int i = 0; i < 19; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } //Verify clearfilter button not display Assert.IsFalse(Widget.IsClearFilterButtonExisted()); //Click filter button, check one checkbox,then cancel, then applyfilter Widget.ClickWidgetTemplateFilterButton(); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[0]); Widget.ClickWidgetTemplateCancelFilterButton(); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); //All template display there for (int i = 0; i < 8; i++) { Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[i])); } //All criteria not display when no checkbox check for (int i = 0; i < 19; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } //Verify clearfilter button not display Assert.IsFalse(Widget.IsClearFilterButtonExisted()); //Click filter button, check 行为 checkbox,then applyfilter Widget.ClickWidgetTemplateFilterButton(); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3]); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); //Template "年逐月工休比" display there Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[0])); //All criteria not display when no checkbox check Assert.IsTrue(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[3])); for (int i = 0; i < 2; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } for (int i = 4; i < 19; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } //Verify clearfilter button display TimeManager.LongPause(); Assert.IsTrue(Widget.IsClearFilterButtonExisted()); //Click filter button,then applyfilter, keep above check Widget.ClickWidgetTemplateFilterButton(); TimeManager.LongPause(); Widget.ClickWidgetTemplateApplyFilterButton(); //Template "年逐月工休比" display there Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[0])); //行为 criteria display Assert.IsTrue(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[3])); for (int i = 0; i < 2; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } for (int i = 4; i < 19; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } //Verify clearfilter button display TimeManager.LongPause(); Assert.IsTrue(Widget.IsClearFilterButtonExisted()); //Click filter button,uncheck 行为, check 设备, then cancel, then applyfilter, keep above check Widget.ClickWidgetTemplateFilterButton(); Widget.UncheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[3]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[2]); Widget.ClickWidgetTemplateCancelFilterButton(); TimeManager.LongPause(); //Template "年逐月工休比" display there Assert.IsTrue(HomePagePanel.IsWidgetExistedOnQuickCreateWidget(widgetname[0])); //All criteria not display when no checkbox check Assert.IsTrue(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[3])); for (int i = 0; i < 2; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } for (int i = 4; i < 19; i++) { Assert.IsFalse(Widget.IsCriteriaLabelTextCorrect(input.InputData.TargetObject[i])); } //Verify clearfilter button display TimeManager.LongPause(); Assert.IsTrue(Widget.IsClearFilterButtonExisted()); //Click filter button,行为 is check, check 设备,建筑, then cancel, then applyfilter, keep above check Widget.ClickWidgetTemplateFilterButton(); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[1]); Widget.CheckWidgetTemplateCheckBox(input.InputData.FilterPropertiesName[0], input.InputData.TargetObject[2]); Widget.ClickWidgetTemplateQuickCreateButtonCloseButton(); TimeManager.LongPause(); //Verify 快速创建 button exist Assert.IsTrue(Widget.IsWidgetTemplateQuickCreateButtonExisted()); }