public void LargeViewTextboxesEnterTestData(ToolType tool, UITestControl theTab) { //Find the start point UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); Point workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200); // Drag the tool onto the workflow ToolboxUIMap.DragControlToWorkflowDesigner(tool, workflowPoint1); WorkflowDesignerUIMap.OpenCloseLargeView(tool, theTab); // Add the data! List <UITestControl> listOfTextboxes = GetAllTextBoxesFromLargeView(tool.ToString(), theTab); int counter = 0; foreach (var textbox in listOfTextboxes) { WpfEdit tb = textbox as WpfEdit; if (tb != null && !tb.IsPassword) { tb.SetFocus(); SendKeys.SendWait("[[theVar" + counter.ToString(CultureInfo.InvariantCulture) + "]]"); } counter++; } }
public void AutoConnectorTests_DragADecisionOnStartAutoConnectorNode_ASecondConnectorIsCreated() { Mouse.MouseMoveSpeed = 500; Mouse.MouseDragSpeed = 500; CreateWorkflow(); Point point = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(TabManagerUIMap.GetActiveTab()); //Drag a control to the design surface ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, point); DecisionWizardUIMap.ClickDone(2500); //If the screen resolution is low or if the studio is windowed this point can jump as soon as the control is dragged over the work surface, the control might need to be re-dragged to hit the connector line Point newPoint = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(TabManagerUIMap.GetActiveTab()); if (point != newPoint) { WorkflowDesignerUIMap.DragControl("Decision", newPoint); } var connectors = WorkflowDesignerUIMap.GetAllConnectors(); //Assert start auto connector worked Assert.AreEqual(1, connectors.Count, "Start auto connector doesnt work"); }
public void DragActivityOnDropPoint(ToolType toolType) { UITestControl dropPoint = VisualTreeWalker.GetChildByAutomationIdPath(Activity, "SmallViewContent", "DropPoint"); var boundingRectangle = dropPoint.BoundingRectangle; ToolboxUIMap.DragControlToWorkflowDesigner(toolType, new Point(boundingRectangle.X + 10, boundingRectangle.Y + 10)); }
public void AutoConnectorTests_DragAToolOnALineBetweenConnectors_ASecondConnectorIsCreated() { //Drag a tool to the design surface var theTab = ExplorerUIMap.DoubleClickWorkflow("AutoConnectorResource", "UI Test Resources"); UITestControl control = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "MultiAssignDesigner"); //Drag a tool to the design surface //Note that this point is a position relative to the multi assign on the design surface. This is to ensure that the tool is dropped exactly on the line if (control != null) { var point = new Point(control.BoundingRectangle.X + 120, control.BoundingRectangle.Y - 150); ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, point); //If the screen resolution is low or if the studio is windowed this point can jump as soon as the control is dragged over the work surface, the control might need to be re-dragged to hit the connector line var newPoint = new Point(control.BoundingRectangle.X + 120, control.BoundingRectangle.Y - 150); if (point != newPoint) { var theControl = WorkflowDesignerUIMap.GetAllControlsOnDesignSurface(theTab)[5]; Mouse.StartDragging(theControl, new Point(10, 10)); Mouse.StopDragging(newPoint); } } else { throw new Exception("MultiAssignDesigner not found on active tab"); } var connectors = WorkflowDesignerUIMap.GetAllConnectors(); //Assert that the line was split Assert.IsTrue(connectors.Count >= 2, "Connector line wasn't split"); }
public void DragAStartNodeOntoATool_HoverOverAToolForAWhile_NoDrillDownShouldHappen() { // Create the workflow RibbonUIMap.CreateNewWorkflow(); // Get some variables UITestControl theTab = TabManagerUIMap.GetActiveTab(); UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); var workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200); // Drag an assign onto the Workflow ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, workflowPoint1); //Drag Start Node Mouse.StartDragging(theStartButton, MouseButtons.Left); UITestControl assign = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Assign"); var point = new Point(assign.BoundingRectangle.X + 150, assign.BoundingRectangle.Y + 50); //Hover over the multi assign for 5 seconds Mouse.Move(point); Playback.Wait(2000); Mouse.Click(); // ensure the start btn is visible, hence no drill down theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); Assert.IsTrue(theStartButton.Exists, "Start Node Hover Caused Drilldown"); }
public void AdornerHelpButtonOpenAnExampleWorlkflowTest() { // Create the workflow RibbonUIMap.CreateNewWorkflow(); // Get some design surface UITestControl theTab = TabManagerUIMap.GetActiveTab(); //Get a point Point requiredPoint = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab); //Drag a control to the design surface ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, requiredPoint); //Get Adorner buttons var button = WorkflowDesignerUIMap.Adorner_GetButton(theTab, "Assign", "Open Help"); Mouse.Click(button); //Get 'View Sample' link button var findViewSampleLink = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "View Sample Workflow"); Mouse.Click(findViewSampleLink.GetChildren()[0]); //Wait for sample workflow UITestControl waitForTabToOpen = null; var count = 10; while (waitForTabToOpen == null && count > 0) { waitForTabToOpen = TabManagerUIMap.FindTabByName("Utility - Assign", 500); count--; } //Assert workflow opened after a time out. Assert.IsNotNull(waitForTabToOpen); }
public void SqlBulkInsertTest_OpenQuickVariableInputAndCloseItImmediately_ReturnsToSmallView() { // Create the workflow RibbonUIMap.CreateNewWorkflow(); var theTab = TabManagerUIMap.GetActiveTab(); // Get some variables var startPoint = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(theTab); var point = new Point(startPoint.X, startPoint.Y + 200); // Drag the tool onto the workflow ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.SqlBulkInsert, point, "Sql Bulk"); //Open the quick variable input view var toggleButton = GetControlByFriendlyName("Open Quick Variable Input"); MouseCommands.ClickControlAtPoint(toggleButton, new Point(5, 5)); WaitForControlLoad(); var quickVarInputContent = GetControlByFriendlyName("QuickVariableInputContent"); Assert.IsNotNull(quickVarInputContent); //Close the quick variable input view toggleButton = GetControlByFriendlyName("Close Quick Variable Input"); MouseCommands.ClickControlAtPoint(toggleButton, new Point(5, 5)); WaitForControlLoad(); var smallDataGrid = GetControlById("SmallDataGrid", theTab); Assert.IsNotNull(smallDataGrid); }
public void QuickVariableInputFromListTest() { Clipboard.Clear(); // Create the workflow RibbonUIMap.CreateNewWorkflow(); // Get some variables UITestControl theTab = TabManagerUIMap.GetActiveTab(); Point startPoint = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(theTab); Point point = new Point(startPoint.X - 100, startPoint.Y + 100); // Drag the tool onto the workflow ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, point); //Get Mappings button UITestControl button = WorkflowDesignerUIMap.Adorner_GetButton(theTab, "Assign", "Open Quick Variable Input"); // Click it MouseCommands.MoveAndClick(new Point(button.BoundingRectangle.X + 5, button.BoundingRectangle.Y + 5)); // Enter some invalid data WorkflowDesignerUIMap.AssignControl_QuickVariableInputControl_EnterData(theTab, "Assign", ",", "some(<).", "_suf", "varOne,varTwo,varThree"); // Click done WorkflowDesignerUIMap.AssignControl_QuickVariableInputControl_ClickAdd(theTab, "Assign"); var errorControl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Prefix contains invalid characters"); Assert.IsNotNull(errorControl, "No error displayed for incorrect QVI input"); #region Scroll Right var scrollBarH = WorkflowDesignerUIMap.ScrollViewer_GetHorizontalScrollBar(theTab); WorkflowDesignerUIMap.ScrollViewer_GetHorizontalScrollBar(theTab); // Look far right Mouse.StartDragging(scrollBarH); Mouse.StopDragging(WorkflowDesignerUIMap.ScrollViewer_GetScrollRight(theTab)); #endregion // Assert clicking an error focuses the correct text-box MouseCommands.ClickControl(errorControl.GetChildren()[0]); // enter some correct data KeyboardCommands.SendKey("^a^xpre_", 100); WorkflowDesignerUIMap.AssignControl_QuickVariableInputControl_ClickAdd(theTab, "Assign"); // Check the data string varName = WorkflowDesignerUIMap.AssignControl_GetVariableName(theTab, "Assign", 0); StringAssert.Contains(varName, "[[pre_varOne_suf]]"); }
public void DragToolOntoDesigner(ToolType toolType, Point pointToDragTo = new Point()) { if (toolType == ToolType.Workflow || toolType == ToolType.Service) { ToolboxUIMap.DragControlToWorkflowDesigner(toolType, TheTab, new Point(), false); PopupDialogUIMap.WaitForDialog(); } else { Activity = ToolboxUIMap.DragControlToWorkflowDesigner(toolType, TheTab); } }
public void ToolDesigners_ForEach_DraggingSwitch_NotAllowed() { using (var dsfActivityUiMap = new DsfForEachUiMap(false, false) { TheTab = RibbonUIMap.CreateNewWorkflow(2000) }) { Point pointToDragTo = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(dsfActivityUiMap.TheTab); dsfActivityUiMap.Activity = ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.ForEach, dsfActivityUiMap.TheTab, pointToDragTo); dsfActivityUiMap.DragActivityOnDropPoint(ToolType.Switch); var forEachActivity = dsfActivityUiMap.GetActivity(); Assert.IsNull(forEachActivity); } }
public void SetRoundingType_Normal_ExpectedRoundingInputIsEnabled() { RibbonUIMap.CreateNewWorkflow(); UITestControl theTab = TabManagerUIMap.GetActiveTab(); UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); Point workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200); // Drag the tool onto the workflow ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.FormatNumber, workflowPoint1, "Format Number"); UITestControl ctrl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "NumberFormat"); FormatNumberUIMap.InputAllFormatNumberValues(ctrl, "1234.56", "Normal", "1", "3", "[[Result]]"); Assert.IsTrue(FormatNumberUIMap.IsRoundingInputEnabled()); }
public void SqlBulkInsertTest_NoDatabaseIsSelected_GridHasNothing() { // Create the workflow RibbonUIMap.CreateNewWorkflow(); var theTab = TabManagerUIMap.GetActiveTab(); // Get some variables var startPoint = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(theTab); var point = new Point(startPoint.X, startPoint.Y + 200); // Drag the tool onto the workflow ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.SqlBulkInsert, point, "Sql Bulk"); var smallDataGrid = GetControlById("SmallDataGrid", theTab); Assert.IsTrue(smallDataGrid.GetChildren().Count == 0); }
public void ToolDesigners_SequenceSmallView_DraggingNonDecision_Allowed() { Mouse.MouseDragSpeed = 500; using (var dsfActivityUiMap = new DsfSequenceUiMap(false, false) { TheTab = RibbonUIMap.CreateNewWorkflow(2000) }) { Point pointToDragTo = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(dsfActivityUiMap.TheTab); dsfActivityUiMap.Activity = ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Sequence, dsfActivityUiMap.TheTab, pointToDragTo); dsfActivityUiMap.DragActivityOnDropPoint(ToolType.Assign); var activityList = dsfActivityUiMap.GetActivityList(); Assert.AreEqual(1, activityList.Count); } }
// 05/11 - Failure is Intermittent - Problems finding LargeView button ;) public void SqlBulkInsertTest_SelectDatabaseAndTableName_GridHasColumnnames() { // Create the workflow RibbonUIMap.CreateNewWorkflow(); var theTab = TabManagerUIMap.GetActiveTab(); var startPoint = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(theTab); var point = new Point(startPoint.X, startPoint.Y + 200); // Drag the tool onto the workflow ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.SqlBulkInsert, point, "Sql Bulk"); //Select a database var dbDropDown = GetControlById("UI__Database_AutoID", theTab) as WpfComboBox; MouseCommands.ClickControlAtPoint(dbDropDown, new Point(10, 10)); WaitForControlLoad(15000); if (dbDropDown != null) { var listOfDbNames = dbDropDown.Items.Select(i => i as WpfListItem).ToList(); var databaseName = listOfDbNames.SingleOrDefault(i => i.DisplayText.Contains(TestingDb)); MouseCommands.ClickControlAtPoint(databaseName, new Point(5, 5)); } //Select a table var tableDropDown = GetControlById("UI__TableName_AutoID", theTab) as WpfComboBox; MouseCommands.ClickControlAtPoint(tableDropDown, new Point(10, 10)); WaitForControlLoad(15000); if (tableDropDown != null) { var listOfTableNames = tableDropDown.Items.Select(i => i as WpfListItem).ToList(); WaitForControlLoad(2500); MouseCommands.ClickControlAtPoint(listOfTableNames[TableIndex], new Point(5, 5)); } WaitForControlLoad(3000); //Assert that grid is not empty var smallDataGrid = GetControlById("SmallDataGrid", theTab); Assert.IsTrue(smallDataGrid.GetChildren().Count > 0); }
public void DragAWorkflowIntoAndOutOfAForEach_Expected_NoErrors() { // Create the workflow RibbonUIMap.CreateNewWorkflow(); // Get some variables UITestControl theTab = TabManagerUIMap.GetActiveTab(); UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); Point workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200); Point requiredPoint = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab); requiredPoint.Offset(20, 50); // Drag a ForEach onto the Workflow ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.ForEach, workflowPoint1, "For Each"); // Get a sample workflow, and drag it onto the "Drop Activity Here" part of the ForEach box ExplorerUIMap.EnterExplorerSearchText("CalculateTaxReturns"); var targetPoint = new Point(workflowPoint1.X + 25, workflowPoint1.Y + 25); ExplorerUIMap.DragControlToWorkflowDesigner("localhost", "WORKFLOWS", "MO", "CalculateTaxReturns", targetPoint); // Now - Onto Part 2! // 5792.2 // Get the location of the ForEach box UITestControl forEachControl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "ForEach"); MouseCommands.MoveAndClick(new Point(forEachControl.BoundingRectangle.X + 175, forEachControl.BoundingRectangle.Y + 75)); // And drag it down Mouse.StartDragging(); Mouse.StopDragging(new Point(workflowPoint1.X - 200, workflowPoint1.Y + 100)); // Now get its position UITestControl calcTaxReturnsControl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "CalculateTaxReturns"); // Its not on the design surface, must be in foreach Assert.IsNotNull(calcTaxReturnsControl, "Could not drop it ;("); }
public void AutoConnectorTests_DragAToolOnStartAutoConnectorNode_AConnectorIsCreated() { UITestControl theTab = CreateWorkflow(); Point point = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(theTab); //Drag a control to the design surface ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, point); //If the screen resolution is low or if the studio is windowed this point can jump as soon as the control is dragged over the work surface, the control might need to be re-dragged to hit the connector line Point newPoint = WorkflowDesignerUIMap.GetStartNodeBottomAutoConnectorPoint(theTab); if (point != newPoint) { WorkflowDesignerUIMap.DragControl("Assign", newPoint); } List <UITestControl> connectors = WorkflowDesignerUIMap.GetAllConnectors(); //Assert start auto connector worked Assert.AreEqual(1, connectors.Count, "Start auto connector was not created"); }
// Faulty DebugInput window public void DebugOutputWithRefreshOnBrowserExpectedDebugOutputWindowNotUpdated() { // Create a new workflow CreateWorkflow(); UITestControl control = TabManagerUIMap.FindTabByName("Unsaved 1"); if (control != null) { // Drag an assign onto the Design Surface and configure the control DockManagerUIMap.ClickOpenTabPage("Toolbox"); ToolboxUIMap.DragControlToWorkflowDesigner("Assign", WorkflowDesignerUIMap.GetPointUnderStartNode(control)); WorkflowDesignerUIMap.SetStartNode(control, "Assign"); WorkflowDesignerUIMap.AssignControl_EnterData(control, "Assign", "[[test]]", "test"); //Debug the workflow. RibbonUIMap.ClickRibbonMenuItem("Home", "Debug"); DebugUIMap.ExecuteDebug(); // Check the output tab for the debug data DockManagerUIMap.ClickOpenTabPage("Output"); var ctrl = DebugOutputUIMap.GetOutputWindow(); // View in Browser then refresh RibbonUIMap.ClickRibbonMenuItem("Home", "View in Browser"); Thread.Sleep(1000); ExternalUIMap.SendIERefresh(); // Close Internet Explorer ExternalUIMap.CloseAllInstancesOfIE(); // Check that the Output window only contains the Compiler message for successful service compilation // As it always does on View in Browser DockManagerUIMap.ClickOpenTabPage("Output"); UITestControlCollection actualOutputs = DebugOutputUIMap.GetOutputWindow(); Assert.AreEqual(1, actualOutputs.Count); } else { Assert.Fail("Unable to create workflow to test Debug Output on Browser Refresh"); } // All good - Cleanup time! new TestBase().DoCleanup("Unsaved 1", true); }
public void ChangeRoundingType_None_Expected_RoundingInputBecomesDisabledAndEmpty() { RibbonUIMap.CreateNewWorkflow(); UITestControl theTab = TabManagerUIMap.GetActiveTab(); UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); Point workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200); // Drag the tool onto the workflow ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.FormatNumber, workflowPoint1, "Format Number"); UITestControl ctrl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "NumberFormat"); FormatNumberUIMap.InputAllFormatNumberValues(ctrl, "1234.56", "Normal", "1", "3", "[[Result]]"); FormatNumberUIMap.SelectRoundingType("None"); WpfEdit inputControl = FormatNumberUIMap.GetRoudingInputBoxControl(); //Assert.IsFalse(ctrl.Enabled); Assert.IsFalse(inputControl.Enabled); Assert.AreEqual(inputControl.GetProperty("Text").ToString(), string.Empty); }
public void DebugOutput_ClickStep_ActivityIsHighlighted() { //Create testing workflow RibbonUIMap.CreateNewWorkflow(); var theTab = TabManagerUIMap.GetActiveTab(); //Drag on multiassign UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); var thePoint = new Point(theStartButton.BoundingRectangle.X + 30, theStartButton.BoundingRectangle.Y + 90); ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, thePoint); WorkflowDesignerUIMap.AssignControl_ClickLeftTextboxInRow(theTab, "Assign", 0); //Set up multi assign SendKeys.SendWait("[[AssignThis]]{TAB}Some Data"); //run and wait until debug output comes through RibbonUIMap.ClickRibbonMenuItem("Debug"); PopupDialogUIMap.WaitForDialog(); DebugUIMap.ClickExecute(); OutputUIMap.WaitForExecution(); //Click step var step = OutputUIMap.GetOutputWindow(); Playback.Wait(1500); Mouse.Click(step[2]); Playback.Wait(100); Mouse.Click(step[1]); Playback.Wait(100); Mouse.Click(step[2]); Playback.Wait(100); //Assert the design surface activity is highlighted var assign = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Assign"); Assert.IsTrue(WorkflowDesignerUIMap.IsControlSelected(assign), "Selecting a step in the debug output does not select the activity on the design surface"); }
public void UnsavedStar_UITest_WhenWorkflowIsChanged_ExpectStarIsShowing() { //------------Setup for test-------------------------- RibbonUIMap.CreateNewWorkflow(); // Get some data var tabName = TabManagerUIMap.GetActiveTabName(); UITestControl theTab = TabManagerUIMap.FindTabByName(tabName); UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); Point workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200); // Drag a Multi Assign on ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, workflowPoint1); // Click away MouseCommands.ClickPoint(new Point(workflowPoint1.X + 50, workflowPoint1.Y + 50), 500); //------------Execute Test--------------------------- var theUnsavedTab = TabManagerUIMap.GetActiveTab(); //------------Assert Results------------------------- Assert.IsNotNull(theUnsavedTab, "Editted workflow does not have the unsaved * after its name on the tab"); }
public void WorkflowDesigner_CodedUI_CopyAndPastingAndDeleteingActivity_CopyPasteAndDeleteWork() { //------------Setup for test-------------------------- RibbonUIMap.CreateNewWorkflow(); UITestControl theTab = TabManagerUIMap.GetActiveTab(); //Find the start point UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start"); Point workflowPoint1 = new Point(theStartButton.BoundingRectangle.X, theStartButton.BoundingRectangle.Y + 200); ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, workflowPoint1); WorkflowDesignerUIMap.AssignControl_ClickLeftTextboxInRow(theTab, "Assign", 0); SendKeys.SendWait("Hello"); //Get Large View button WorkflowDesignerUIMap.OpenCloseLargeView(ToolType.Assign, theTab); //------------Execute Test--------------------------- SendKeys.SendWait("^c"); SendKeys.SendWait("^v"); //------------Assert Results------------------------- UITestControlCollection allControlsOnDesignSurface = WorkflowDesignerUIMap.GetAllControlsOnDesignSurface(theTab); IEnumerable <UITestControl> uiTestControls = allControlsOnDesignSurface.Where(c => c.Name == "DsfMultiAssignActivity"); Assert.IsTrue(uiTestControls.Count() == 2); SendKeys.SendWait("{DELETE}"); allControlsOnDesignSurface = WorkflowDesignerUIMap.GetAllControlsOnDesignSurface(theTab); uiTestControls = allControlsOnDesignSurface.Where(c => c.Name == "DsfMultiAssignActivity"); Assert.IsTrue(uiTestControls.Count() == 1); }
public void AutoConnectorTests_DragADecisionOnALineBetweenConnectors_ASecondConnectorIsCreated() { var theTab = ExplorerUIMap.DoubleClickWorkflow("AutoConnectorResource", "UI Test Resources"); var control = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "MultiAssignDesigner"); //Drag a decision to the design surface //Note that this point is a position relative to the multi assign on the design surface. This is to ensure that the tool is dropped exactly on the line if (control != null) { var point = new Point(control.BoundingRectangle.X + 120, control.BoundingRectangle.Y - 150); ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, point); } else { throw new Exception("MultiAssignDesigner not found on active tab"); } DecisionWizardUIMap.CancelWizard(); var connectors = WorkflowDesignerUIMap.GetAllConnectors(); //Assert start auto connector worked Assert.IsTrue(connectors.Count == 2, "Connector line wasn't split"); }
public void Toolbox_UITest_OpenToolbox_IconsAreDisplayed() { RibbonUIMap.CreateNewWorkflow(); ToolboxUIMap.ClearSearch(); foreach (var tool in ToolboxUIMap.GetAllTools()) { var kids = tool.GetChildren(); if (kids.Count == 3) { var icon = kids[1]; var wValue = icon.BoundingRectangle.Width; var hValue = icon.BoundingRectangle.Height; Assert.AreEqual(18, wValue); Assert.AreEqual(18, hValue); } else { Assert.Fail(tool.FriendlyName + " is missing its icon in the toolbox"); } } }
public void DragToolOntoDesigner() { Activity = ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Assign, TheTab); }