public void StudioTooling_StudioToolingUITest_CanToolsDisplay_IconIsVisible() { // Open the Workflow ExplorerUIMap.DoubleClickWorkflow("AllTools", "UI Test Resources"); UITestControl theTab = TabManagerUIMap.GetActiveTab(); // Assert all the icons are visible var designer = WorkflowDesignerUIMap.GetFlowchartDesigner(theTab); designer.GetChildren(); #region Scroll All Items Into View var scrollBarV = WorkflowDesignerUIMap.ScrollViewer_GetVerticalScrollBar(theTab); WorkflowDesignerUIMap.ScrollViewer_GetHorizontalScrollBar(theTab); // Look low Mouse.StartDragging(scrollBarV); Mouse.StopDragging(WorkflowDesignerUIMap.ScrollViewer_GetScrollDown(theTab)); // Look high Mouse.StartDragging(scrollBarV); Mouse.StopDragging(WorkflowDesignerUIMap.ScrollViewer_GetScrollUp(theTab)); #endregion // Assert all the icons are visible designer = WorkflowDesignerUIMap.GetFlowchartDesigner(theTab); var toolCollection = designer.GetChildren(); HashSet <string> controls = new HashSet <string>(); foreach (var child in toolCollection) { if (child.ControlType == "Custom" && child.ClassName != "Uia.ConnectorWithoutStartDot" && child.ClassName != "Uia.StartSymbol" && child.ClassName != "Uia.UserControl" && child.ClassName != "Uia.DsfWebPageActivityDesigner") { Assert.IsTrue(WorkflowDesignerUIMap.IsActivityIconVisible(child), child.FriendlyName + " is missing its icon on the design surface"); controls.Add(child.ClassName); } } Assert.AreEqual(27, controls.Count, "Not all tools on the alls tools text workflow can be checked for icons"); }
// ReSharper disable InconsistentNaming public void QuickVariableInput_GriddedToolsWithComboboxes_OpenAndCloseQVI_SelectedValueIsPreserved() // ReSharper restore InconsistentNaming { var gridedToolsWithComboboxes = new List <string> { "DsfDataMergeActivity", "DsfDataSplitActivity", "DsfBaseConvertActivity", "DsfCaseConvertActivity" }; // Open the Explorer ExplorerUIMap.EnterExplorerSearchText("AllTools"); // Open the Workflow ExplorerUIMap.DoubleClickOpenProject("localhost", "Mocake", "AllTools"); UITestControl theTab = TabManagerUIMap.GetActiveTab(); var designer = WorkflowDesignerUIMap.GetFlowchartDesigner(theTab); var toolsWithLargeViews = designer.GetChildren() .Where(t => gridedToolsWithComboboxes.Contains(t.FriendlyName)) .ToList(); foreach (var tool in toolsWithLargeViews) { //Some of the tools on the design surface are out of view, look for them... if (tool.BoundingRectangle.Y > 800) { //might already be scrolled var scrollBar = WorkflowDesignerUIMap.ScrollViewer_GetVerticalScrollBar(theTab); WpfControl getTop = scrollBar as WpfControl; if (getTop != null && getTop.Top < 200) { //Look low Mouse.StartDragging(scrollBar); Mouse.StopDragging(WorkflowDesignerUIMap.ScrollViewer_GetScrollDown(theTab)); } } else { //might already be scrolled var scrollBar = WorkflowDesignerUIMap.ScrollViewer_GetVerticalScrollBar(theTab); WpfControl getTop = scrollBar as WpfControl; if (getTop != null && getTop.Top > 200) { //Look high Mouse.StartDragging(scrollBar); Mouse.StopDragging(WorkflowDesignerUIMap.ScrollViewer_GetScrollUp(theTab)); } } // var selectedItems = SelectItemOnComboBox(tool.FriendlyName, theTab); //Get Mappings button UITestControl toggleButton = WorkflowDesignerUIMap.Adorner_GetButton(theTab, tool.FriendlyName, "Open Quick Variable Input") as WpfToggleButton; // Click it Mouse.Click(toggleButton); //Get Mappings button toggleButton = WorkflowDesignerUIMap.Adorner_GetButton(theTab, tool.FriendlyName, "Close Quick Variable Input") as WpfToggleButton; // Click it Mouse.Click(toggleButton); //Assert Assert.IsTrue(VerifySelectedItems(tool.FriendlyName, theTab, selectedItems)); } }