Example #1
0
        public void Deploy_ResourceTree_DeployFromExplorer_AllServiceTypesVisibleAndDeployedItemNotFiltered()
        {
            ExplorerUIMap.EnterExplorerSearchText("PluginsReturningXMLFromComplexType");
            //------------Execute Test---------------------------
            ExplorerUIMap.RightClickDeployProject("INTEGRATION TEST SERVICES", "PluginsReturningXMLFromComplexType");
            var theTab = TabManagerUIMap.GetActiveTab();

            //wait for resource tree to load
            Playback.Wait(5000);

            // Assert All Service Types Visible
            var sourceResources = DeployUIMap.GetSourceNavigationTree();
            var environmentNode = (sourceResources.Nodes[0] as WpfTreeItem);

            Assert.IsNotNull(environmentNode, "Nothing in the deploy source resource navigation tree.");

            DeployUIMap.EnterTextInSourceServerFilterBox(theTab, "ldnslgnsdg"); // Random text

            var result = DeployUIMap.DoesSourceServerHaveDeployItems(theTab);

            TabManagerUIMap.CloseTab("Deploy");

            if (!result)
            {
                Assert.Fail("The deployed item has been removed with the filter - It should not be");
            }
        }
Example #2
0
        //This test could fail because of the really long time it takes to save a workflow and close the old tab
        public void TabManagerTests_CodedUI_CreateTwoWorkflowsSwitchBetween_ExpectStarNotShowingInName()
        {
            const string firstName  = "Bug_10528";
            const string secondName = "Bug_10528_InnerWorkFlow";

            ExplorerUIMap.EnterExplorerSearchText("Bug_10528");

            ExplorerUIMap.DoubleClickOpenProject("localhost", "INTEGRATION TEST SERVICES", firstName);

            var tab1 = TabManagerUIMap.GetActiveTab();

            ExplorerUIMap.DoubleClickOpenProject("localhost", "INTEGRATION TEST SERVICES", secondName);

            var tab2 = TabManagerUIMap.GetActiveTab();

            //Switch tabs a couple of times
            TabManagerUIMap.Click(tab1);
            TabManagerUIMap.Click(tab2);
            TabManagerUIMap.Click(tab1);

            //Check that the tabs names dont have stars in them

            var tabCount = TabManagerUIMap.GetTabCount();

            Assert.IsTrue(tabCount >= 2);
            for (int i = 0; i < tabCount; i++)
            {
                Assert.IsFalse(TabManagerUIMap.GetTabNameAtPosition(i).Contains("*"));
            }
        }
        public void ResizeAdornerMappings_Expected_AdornerMappingIsResized()
        {
            const string resourceToUse = "Bug_10528";
            const string innerResource = "Bug_10528_InnerWorkFlow";

            // Open the Explorer
            ExplorerUIMap.EnterExplorerSearchText(resourceToUse);

            ExplorerUIMap.DoubleClickOpenProject("localhost", "INTEGRATION TEST SERVICES", resourceToUse);
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            UITestControl controlOnWorkflow = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, innerResource);

            Mouse.Move(controlOnWorkflow, new Point(5, 5));
            Mouse.DoubleClick();

            UITestControlCollection controlCollection = controlOnWorkflow.GetChildren();
            Point initialResizerPoint = new Point();
            // Validate the assumption that the last child is the resizer
            var resizeThumb = controlCollection[controlCollection.Count - 1];

            if (resizeThumb.ControlType.ToString() == "Indicator")
            {
                if (resizeThumb.BoundingRectangle.X == -1)
                {
                    Assert.Fail("Resize indicator is not visible");
                }

                initialResizerPoint.X = resizeThumb.BoundingRectangle.X + 5;
                initialResizerPoint.Y = resizeThumb.BoundingRectangle.Y + 5;
            }
            else
            {
                Assert.Fail("Cannot find resize indicator");
            }

            // Drag
            Mouse.Move(new Point(resizeThumb.Left + 5, resizeThumb.Top + 5));
            Mouse.Click();
            Mouse.StartDragging();

            // Y - 50 since it starts at the lowest point
            Mouse.StopDragging(new Point(initialResizerPoint.X + 50, initialResizerPoint.Y + 50));

            // Check position to see it dragged
            Point newResizerPoint = new Point();

            if (resizeThumb.ControlType.ToString() == "Indicator")
            {
                newResizerPoint.X = resizeThumb.BoundingRectangle.X + 5;
                newResizerPoint.Y = resizeThumb.BoundingRectangle.Y + 5;
            }

            if (!(newResizerPoint.X > initialResizerPoint.X) || !(newResizerPoint.Y > initialResizerPoint.Y))
            {
                Assert.Fail("The control was not resized properly.");
            }
        }
Example #4
0
        // ReSharper disable InconsistentNaming
        public void StudioTooling_StudioToolingUITest_CanOpenLargeView_NoExceptionsThrown()
        // ReSharper restore InconsistentNaming
        {
            var toolsWithLargeView = new List <string>
            {
                "DsfPathCopy",
                "DsfPathCreate",
                "DsfPathDelete",
                "DsfWebGetRequestActivity",
                "DsfAssignActivity",
                "DsfPathRename",
                "DsfSqlBulkInsertActivity",
                "DsfPathMove",
                "DsfFileRead",
                "DsfFileWrite",
                "DsfFolderRead ",
                "DsfUnZip",
                "DsfZip"
            };

            // 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 => toolsWithLargeView.Contains(t.FriendlyName))
                                      .ToList();

            foreach (var child in toolsWithLargeViews)
            {
                //Some of the tools on the design surface are out of view, look for them...
                WorkflowDesignerUIMap.ScrollControlIntoView(theTab, child);

                Mouse.Move(child, new Point(15, 15));
                Playback.Wait(2500); // Sorted with framework ;)

                WorkflowDesignerUIMap.OpenCloseLargeView(child.Name, theTab);
                Playback.Wait(500);
                WorkflowDesignerUIMap.OpenCloseLargeView(child.Name, theTab);
                Playback.Wait(500);
            }
        }
Example #5
0
        public void DebugBuriedErrors_Expected_OnlyErrorStepIsInError()
        {
            //Open the correct workflow
            ExplorerUIMap.EnterExplorerSearchText("Bug8372");
            ExplorerUIMap.DoubleClickOpenProject("localhost", "TestCategory", "Bug8372");

            // Run debug
            RibbonUIMap.ClickRibbonMenuItem("Debug");
            PopupDialogUIMap.WaitForDialog();
            DebugUIMap.ClickExecute();
            OutputUIMap.WaitForExecution();

            var result = OutputUIMap.IsAnyStepsInError();

            // Get nested steps
            Assert.IsTrue(result, "Cannot see nested error steps in the debug output.");
        }
Example #6
0
        // Unstable
        public void DebugOutputWithLargeDataExpectedDebugOutputWindowUpdatedWithin5Seconds()
        {
            //Open LargeFileTesting workflow
            DockManagerUIMap.ClickOpenTabPage("Explorer");
            ExplorerUIMap.ClearExplorerSearchText();
            ExplorerUIMap.EnterExplorerSearchText("large");
            ExplorerUIMap.DoubleClickOpenProject("localhost", "WORKFLOWS", "TESTS", "LargeFileTesting");
            ExplorerUIMap.ClearExplorerSearchText();

            //Click debug
            SendKeys.SendWait("{F5}");
            Thread.Sleep(2000);
            SendKeys.SendWait("{F5}");

            //Assert the debug output window is responsive after 5 seconds
            // Get data split step
            DockManagerUIMap.ClickOpenTabPage("Output");
            DebugOutputUIMap.ClearSearch();
            Mouse.Click();
            Keyboard.SendKeys("Data Split");
            var getSteps = DebugOutputUIMap.GetOutputWindow();

            Assert.IsTrue(getSteps.Count == 1, "Debug output window took too long to respond");
            var dataSplitDebugOutput = getSteps[0];

            Assert.IsTrue(dataSplitDebugOutput.Exists, "Debug output window took too long to respond");

            //Assert recset node expands and the more data link within that recset node is visible
            var expander = dataSplitDebugOutput.GetChildren().Last(c => c.ControlType.Name == "Expander");

            Mouse.Move(expander, new Point(0, 0));
            Mouse.Move(new Point(Mouse.Location.X + 5, Mouse.Location.Y + 5));
            Mouse.Click();
            Mouse.Move(new Point(Mouse.Location.X - 25, Mouse.Location.Y - 25));
            Mouse.Click();
            for (var i = 0; i < 4; i++)
            {
                Mouse.MoveScrollWheel(-1);
            }
            // Get more data link
            var moreLink = expander.GetChildren()[1].GetChildren().Last(c => c.Name == "...");
            var moreLinkClickablePoint = new Point();

            Assert.IsTrue(moreLink.TryGetClickablePoint(out moreLinkClickablePoint), "Recordset did not expand properly");
            new TestBase().DoCleanup("LargeFileTesting");
        }
Example #7
0
        public void DebugAWorkFlow_EnsureSaveIsEnabledAfterCompletion()
        {
            ExplorerUIMap.EnterExplorerSearchText("ServiceExecutionTest");
            ExplorerUIMap.DoubleClickOpenProject("localhost", "TestCategory", "ServiceExecutionTest");

            PopupDialogUIMap.WaitForDialog();
            KeyboardCommands.SendKey("{F5}");
            PopupDialogUIMap.WaitForDialog();
            KeyboardCommands.SendKey("{F6}");
            PopupDialogUIMap.WaitForDialog();

            var uiControl = RibbonUIMap.GetControlByName("Save");

            uiControl.WaitForControlReady();

            Assert.IsTrue(uiControl.Enabled);
        }
Example #8
0
        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));
        }
Example #9
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 ;(");
        }
Example #10
0
        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");
        }
Example #11
0
        public void EnterFilterOnDestinationServer_Expected_DeployedItemsStillVisible()
        {
            ExplorerUIMap.EnterExplorerSearchText("CalculateTaxReturns");
            ExplorerUIMap.RightClickDeployProject("MO", "CalculateTaxReturns");

            // Set ourself as the destination server
            UITestControl deployTab = TabManagerUIMap.FindTabByName("Deploy");

            DeployUIMap.ChooseDestinationServer(deployTab, "localhost");

            // Make sure the Destination server has items
            Assert.IsTrue(DeployUIMap.DoesDestinationServerHaveItems(deployTab));

            // Enter a filter in the destination server
            DeployUIMap.EnterTextInDestinationServerFilterBox(deployTab, "zzzzzzzzz");

            var result = DeployUIMap.DoesDestinationServerHaveItems(deployTab);

            TabManagerUIMap.CloseTab("Deploy");
            // And make sure it still has items
            Assert.IsTrue(result, "After a filter was applied, the destination Server lost all its items!");
        }
Example #12
0
        // 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));
            }
        }
Example #13
0
        public void SqlBulkInsertTest_OpenLargeViewAndEnterAnInvalidBatchAndTimeoutSizeAndClickDone_CorrectingErrorsAndClickDoneWillReturnToSmallView()
        {
            // Open the Explorer
            ExplorerUIMap.EnterExplorerSearchText("Sql Bulk Insert Large View");

            // Open the Workflow
            ExplorerUIMap.DoubleClickOpenProject("localhost", "UI TEST", "Sql Bulk Insert Large View");
            var theTab = TabManagerUIMap.GetActiveTab();

            //Select a database
            var dbDropDown = GetControlById("UI__Database_AutoID", theTab) as WpfComboBox;

            Mouse.Click(dbDropDown, new Point(10, 10));
            WaitForControlLoad();
            if (dbDropDown != null)
            {
                var listOfDbNames = dbDropDown.Items.Select(i => i as WpfListItem).ToList();
                var databaseName  = listOfDbNames.SingleOrDefault(i => i.DisplayText.Contains(TestingDb));
                Mouse.Click(databaseName, new Point(5, 5));
            }
            WaitForControlLoad(5000);

            //Select a table
            var tableDropDown = GetControlById("UI__TableName_AutoID", theTab) as WpfComboBox;

            Mouse.Click(tableDropDown, new Point(10, 10));
            WaitForControlLoad(10000);
            if (tableDropDown != null)
            {
                var listOfTableNames = tableDropDown.Items.Select(i => i as WpfListItem).ToList();
                WaitForControlLoad();
                Mouse.Click(listOfTableNames[TableIndex], new Point(5, 5));
            }
            WaitForControlLoad(5000);

            UITestControl controlOnWorkflow = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "DsfSqlBulkInsertActivity");

            //Open the large view using context menu
            WorkflowDesignerUIMap.OpenCloseLargeViewUsingContextMenu(theTab, "DsfSqlBulkInsertActivity");

            WaitForControlLoad(5000);

            //Enter a few mappings

            // THIS IS FAULTY LOGIC!!!!
            var getFirstTextbox = WorkflowDesignerUIMap.GetSqlBulkInsertLargeViewFirstInputTextbox(controlOnWorkflow);

            if (getFirstTextbox == null)
            {
                throw new Exception("Failed to Locate Text Box");
            }

            Mouse.Click(getFirstTextbox);

            KeyboardCommands.SendKey("^a^xrecord().id");
            KeyboardCommands.SendTab();
            KeyboardCommands.SendKey("^a^xrecord().name");
            KeyboardCommands.SendTab();
            KeyboardCommands.SendKey("^a^xrecord().mail");
            KeyboardCommands.SendTab();
            WaitForControlLoad();

            var batchSize = GetControlById("UI__BatchSize_AutoID", theTab);

            MouseCommands.ClickControlAtPoint(batchSize, new Point(5, 5));
            KeyboardCommands.SendKey("^a^x-2");

            var timeout = GetControlById("UI__Timeout_AutoID", theTab);

            MouseCommands.ClickControlAtPoint(timeout, new Point(5, 5));
            KeyboardCommands.SendKey("^a^x-2");

            var result = GetControlById("UI__Result_AutoID", theTab);

            MouseCommands.ClickControlAtPoint(result, new Point(5, 5));
            KeyboardCommands.SendKey("^a^x-2");

            var done = GetControlById("DoneButton", theTab);

            MouseCommands.ClickControlAtPoint(done, new Point(5, 5));

            WaitForControlLoad();

            var batchErrorMessage = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Batch size must be a number");

            MouseCommands.MoveAndClick(new Point(batchErrorMessage.GetChildren()[0].BoundingRectangle.X + 5, batchErrorMessage.GetChildren()[0].BoundingRectangle.Y + 5));
            KeyboardCommands.SendKey("^a^x200");

            var timeoutErrorMessage = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Timeout must be a number");

            MouseCommands.MoveAndClick(new Point(timeoutErrorMessage.GetChildren()[0].BoundingRectangle.X + 5, timeoutErrorMessage.GetChildren()[0].BoundingRectangle.Y + 5));
            KeyboardCommands.SendKey("^a^x200");

            MouseCommands.ClickControlAtPoint(done, new Point(5, 5));
            batchErrorMessage   = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Batch size must be a number");
            timeoutErrorMessage = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Timeout must be a number");

            Assert.IsNull(batchErrorMessage);
            Assert.IsNull(timeoutErrorMessage);
        }