public void ClickShowMapping_Expected_InputOutputAdornersAreDisplayed() { // 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); // Get a sample workflow ExplorerUIMap.EnterExplorerSearchText("TestFlow"); ExplorerUIMap.DragControlToWorkflowDesigner("localhost", "WORKFLOWS", "TEST", "TestFlow", workflowPoint1); // Click it UITestControl controlOnWorkflow = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "TestFlow"); Mouse.Click(controlOnWorkflow, new Point(65, 5)); }
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 AddSecondServiceToWorkFlowExpectedDisplayTitleNotDsfActivity() { RibbonUIMap.CreateNewWorkflow(); UITestControl theTab = TabManagerUIMap.GetActiveTab(); UITestControl startButton = WorkflowDesignerUIMap.FindStartNode(theTab); ExplorerUIMap.EnterExplorerSearchText("email service"); ExplorerUIMap.DragControlToWorkflowDesigner("localhost", "SERVICES", "Communication", "Email Service", new Point(startButton.BoundingRectangle.X + 50, startButton.BoundingRectangle.Y + 150)); WorkflowDesignerUIMap.TryCloseMappings("Email Service"); ExplorerUIMap.DragControlToWorkflowDesigner("localhost", "SERVICES", "Communication", "Email Service", new Point(startButton.BoundingRectangle.X + 50, startButton.BoundingRectangle.Y + 300)); Assert.IsFalse(WorkflowDesignerUIMap.DoesControlExistOnWorkflowDesigner(theTab, "DsfActivity(ServiceDesigner)"), "Dropped services display title was 'DsfActivity' rather than the name of the service"); }