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 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 ;("); }
// 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); }