Example #1
0
        public void Debug_GatherSystemInfo_UsingASameVariableInTwoActivities_DebugIsCorrect()
        {
            // Remove the PersistSettings.dat ;)
            var appData     = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).Replace("Roaming", "");
            var settingPath = Path.Combine(appData, @"Local\Warewolf\DebugData\PersistSettings.dat");

            if (File.Exists(settingPath))
            {
                File.Delete(settingPath);
            }

            ExplorerUIMap.DoubleClickWorkflow("11330_Integration tests", "SPINT 7");

            RibbonUIMap.DebugShortcutKeyPress();
            OutputUIMap.WaitForExecution(3000);

            var step3 = OutputUIMap.GetStep(2);

            Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(step3, new[] { "[[date]]", "=", "Date & Time" }));
            Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(step3, new[] { "[[cpu]]", "=", "CPU Available" }));

            var step4 = OutputUIMap.GetStep(3);

            Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(step4, new[] { "[[date]]", "=", "Date & Time" }));
            Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(step4, new[] { "[[cpu]]", "=", "CPU Available" }));

            Assert.IsFalse(OutputUIMap.AssertDebugOutputContains(step4, new[] { "% CPU Available" }));
        }
Example #2
0
        public void Debug_WhenUsingQuickDebugCommand_ExpectSavedInputsUsedInExecution()
        {
            // Remove the PersistSettings.dat ;)
            var appData     = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).Replace("Roaming", "");
            var settingPath = Path.Combine(appData, @"Local\Warewolf\DebugData\PersistSettings.dat");

            if (File.Exists(settingPath))
            {
                File.Delete(settingPath);
            }

            //------------Setup for test--------------------------
            //Open the correct workflow
            ExplorerUIMap.DoubleClickWorkflow("Bug9394", "TestCategory");

            // prime the values ;)
            RibbonUIMap.ClickDebug();

            DebugUIMap.EnterTextIntoRow(0, "1");
            DebugUIMap.EnterTextIntoRow(1, "2");

            DebugUIMap.ClickExecute();
            OutputUIMap.WaitForExecution();
            RibbonUIMap.ClickDebug();
            DebugUIMap.CloseDebugWindow_ByCancel();
            //---------------Execute------------------------------
            SendKeys.SendWait(KeyboardCommands.QuickDebug);
            //------------Assert Results-------------------------
            OutputUIMap.WaitForExecution();
            UITestControl lastStep         = OutputUIMap.GetLastStep();
            string        workflowStepName = OutputUIMap.GetStepName(lastStep);

            Assert.AreEqual("Bug9394", workflowStepName);
        }
Example #3
0
        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);
        }
Example #4
0
        public void DragASwitchIntoForEachExpectNotAddedToForEach()
        {
            // 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, 20);

            // Drag a ForEach onto the Workflow
            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.ForEach, workflowPoint1, "For Each");

            // Open the toolbox, and drag the control onto the Workflow
            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Switch, requiredPoint);
            // Cancel Decision Wizard
            if (WizardsUIMap.TryWaitForWizard(3000))
            {
                KeyboardCommands.SendTab();
                KeyboardCommands.SendTab();
                KeyboardCommands.SendEnter(100);

                Assert.Fail("Got dropped ;(");
            }
        }
Example #5
0
        public void DebugOutput_WhenRun10Times_NormalExecution_CloseTagsReturned10Times()
        {
            try
            {
                //------------Setup for test--------------------------
                //Open the correct workflow
                ExplorerUIMap.DoubleClickWorkflow("TravsTestFlow", "Trav");

                //------------Assert Results-------------------------

                // Check for valid input in the input boxes ;)
                for (int i = 0; i < 9; i++)
                {
                    RibbonUIMap.ClickDebug();

                    DebugUIMap.ClickExecute();
                    OutputUIMap.WaitForExecution(3000);
                    UITestControl lastStep         = OutputUIMap.GetLastStep();
                    string        workflowStepName = OutputUIMap.GetStepName(lastStep);
                    Assert.AreEqual("TravsTestFlow", workflowStepName);
                }
            }
            catch (Exception e)
            {
                Assert.Fail("It appears there is a debug issue. [ " + e.Message + " ]");
            }
        }
Example #6
0
        public void WizardUiTests_WebServiceWizard_WebServiceInputMappingsDeleteAll_ExpectedNoInputMappings()
        {
            string    newGuid           = Guid.NewGuid().ToString();
            string    remove            = newGuid.Remove(8);
            string    newWebserviceName = "WebService" + remove;
            const int WaitMs            = 50;

            //Open wizard
            RibbonUIMap.ClickNewWebService();
            KeyboardCommands.SendTabs(2, WaitMs);
            KeyboardCommands.SendDownArrows(1, WaitMs);
            KeyboardCommands.SendTabs(8, WaitMs);
            KeyboardCommands.SendDownArrows(1, WaitMs);
            KeyboardCommands.SendTabs(4, WaitMs);
            KeyboardCommands.SendDel();
            KeyboardCommands.SendTabs(2, WaitMs);
            KeyboardCommands.SendEnter(5000);
            KeyboardCommands.SendTabs(1, WaitMs);
            KeyboardCommands.SendEnter(1000);
            KeyboardCommands.SendTabs(3, WaitMs);
            KeyboardCommands.SendKey(newWebserviceName, WaitMs);
            KeyboardCommands.SendTabs(1, WaitMs);
            KeyboardCommands.SendEnter(2000);

            UITestControl theTab          = RibbonUIMap.CreateNewWorkflow(1500);
            UITestControl activityControl = ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, newWebserviceName, "Unassigned");

            using (var activity = new DsfActivityUiMap(false)
            {
                Activity = activityControl, TheTab = theTab
            })
            {
                Assert.AreEqual(0, activity.GetInputMappingRows().Count);
            }
        }
Example #7
0
        public void DebugOutput_WhenRunWithOutputs_ContainsWorkflowInput()
        {
            try
            {
                //------------Setup for test--------------------------
                //Open the correct workflow
                ExplorerUIMap.DoubleClickWorkflow("TravsTestFlow", "Trav");

                //------------Assert Results-------------------------

                // Check for valid input in the input boxes ;)

                RibbonUIMap.ClickDebug();

                DebugUIMap.ClickExecute();
                OutputUIMap.WaitForExecution(3000);
                UITestControl lastStep         = OutputUIMap.GetStep(1);
                string        workflowStepName = OutputUIMap.GetStepName(lastStep);
                Assert.AreEqual("TravsTestFlow", workflowStepName);
                Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(lastStep, new[] { "Inputs :", "[[a]]", "=" }));
            }
            catch (Exception e)
            {
                Assert.Fail("It appears there is a debug issue. [ " + e.Message + " ]");
            }
        }
Example #8
0
        public void WizardUiTests_DbServiceWizard_CreateNewService_ExpectedServiceCreated()
        {
            //Initialization
            var          sourceNameID  = Guid.NewGuid().ToString().Substring(0, 5);
            var          serviceNameID = Guid.NewGuid().ToString().Substring(0, 5);
            const string cat           = "UNASSIGNED";
            var          serviceName   = "codeduitest" + serviceNameID;
            var          sourceName    = "codeduitest" + sourceNameID;
            const string sourcePath    = "RSAKLFSVRGENDEV";

            //Open wizard
            RibbonUIMap.ClickNewDbWebService();

            Assert.AreEqual("localhost (http://localhost:3142/dsf)", WizardsUIMap.GetRightTitleText());

            //Click New Db Source button
            DatabaseServiceWizardUIMap.ClickNewDbSource();

            //Create the new Db Source
            DatabaseServiceWizardUIMap.CreateDbSource(sourcePath, sourceName);

            //Create the Db Service
            DatabaseServiceWizardUIMap.CreateDbService(serviceName);

            // clean up ;)
            Bootstrap.DeleteService(serviceName);
            Bootstrap.DeleteSource(sourceName);

            //Assert
            Assert.IsTrue(ExplorerUIMap.ValidateServiceExists(serviceName, cat));
            Assert.IsTrue(ExplorerUIMap.ValidateSourceExists(sourceName, cat));
        }
Example #9
0
        public void WizardUiTests_WebServiceWizard_CreateServiceAndSource_ExpectedServiceAndSourceCreated()
        {
            //Initialization
            var sourceNameId = Guid.NewGuid().ToString().Substring(0, 5);
            var sourceName   = "codeduitest" + sourceNameId;

            var          serviceNameId = Guid.NewGuid().ToString().Substring(0, 5);
            var          serviceName   = "codeduitest" + serviceNameId;
            const string sourceUrl     = "http://RSAKLFSVRTFSBLD/IntegrationTestSite/proxy.ashx";

            //Open wizard
            RibbonUIMap.ClickNewWebService();

            Assert.AreEqual("localhost (http://localhost:3142/dsf)", WizardsUIMap.GetRightTitleText());

            //Click new web source
            WebServiceWizardUIMap.ClickNewWebSource();

            WebServiceWizardUIMap.CreateWebSource(sourceUrl, sourceName);

            WebServiceWizardUIMap.SaveWebService(serviceName);

            // clean up ;)
            Bootstrap.DeleteService(serviceName);
            Bootstrap.DeleteSource(sourceName);

            //Assert
            Assert.IsTrue(ExplorerUIMap.ValidateServiceExists(serviceName, "Unassigned"));

            Assert.IsTrue(ExplorerUIMap.ValidateSourceExists(sourceName, "Unassigned"));
        }
Example #10
0
        public void ClickHelpFeedback_Expected_FeedbackWindowOpens()
        {
            RibbonUIMap.ClickRibbonMenuItem("Feedback", 600);
            var dialogPrompt = StudioWindow.GetChildren()[0];

            if (dialogPrompt.GetType() != typeof(WpfWindow))
            {
                Assert.Fail("Error - Clicking the Feedback button does not create the Feedback Window");
            }

            KeyboardCommands.SendEnter();
            KeyboardCommands.SendEnter();

            // Wait for the init, then click around a bit

            // Click stop, then make sure the Feedback window has appeared.
            FeedbackUIMap.ClickStartStopRecordingButton();

            if (!FeedbackUIMap.DoesFeedbackWindowExist())
            {
                Assert.Fail("The Feedback window did not appear after the recording has been stopped.");
            }

            FeedbackUIMap.FeedbackWindow_ClickCancel();
        }
Example #11
0
        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");
        }
Example #12
0
        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);
        }
Example #13
0
 protected ActivityUiMapBase(bool createNewtab = true, int waitAmt = 1000)
 {
     if (createNewtab)
     {
         Playback.Wait(waitAmt);
         _theTab = RibbonUIMap.CreateNewWorkflow(waitAmt);
     }
 }
Example #14
0
        public void RemoteServerUITests_CreateRemoteWorkFlow_WorkflowIsCreated()
        {
            RibbonUIMap.CreateNewWorkflow();
            var activeTabName = TabManagerUIMap.GetActiveTabName();

            Assert.IsTrue(activeTabName.Contains("Unsaved"));
            Assert.IsTrue(activeTabName.Contains("Remote Connection"));
        }
        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]]");
        }
Example #16
0
        public void ClickNewPluginServiceExpectedPluginServiceOpens()
        {
            RibbonUIMap.ClickNewPlugin();
            UITestControl uiTestControl = PluginServiceWizardUIMap.GetWizardWindow();

            if (uiTestControl == null)
            {
                Assert.Fail("Error - Clicking the new plugin service button does not create the new plugin service window");
            }

            StudioWindow.SetFocus();
            PluginServiceWizardUIMap.ClickCancel();
        }
Example #17
0
        // 05/11 - Failure is Intermittent ;)
        public void DecisionWizard_Save_WhenMouseUsedToSelect2ndAnd3rdInputFields_FieldDataSavedCorrectly()
        {
            //------------Setup for test--------------------------
            RibbonUIMap.CreateNewWorkflow();

            var theTab = TabManagerUIMap.GetActiveTab();

            //------------Execute Test---------------------------
            VariablesUIMap.EnterTextIntoScalarName(0, "VariableName");

            var pt = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, pt);
            WizardsUIMap.WaitForWizard();
            Assert.AreEqual("Decision Flow", WizardsUIMap.GetLeftTitleText());
            _decisionWizardUiMap.SendTabs(5, 500);
            _decisionWizardUiMap.SelectMenuItem(17, 100); // select between ;)

            _decisionWizardUiMap.SendTabs(11, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(100, 120));

            _decisionWizardUiMap.SendTabs(2, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(400, 120));
            _decisionWizardUiMap.SendTabs(1, 500);
            _decisionWizardUiMap.GetFirstIntellisense("[[V", false, new Point(600, 120));

            _decisionWizardUiMap.SendTabs(6, 500);
            KeyboardCommands.SendEnter();

            //------------Assert Results-------------------------

            const string expected = "If [[VariableName]] Is Between [[VariableName]] and [[VariableName]]";

            var getDecision = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "FlowDecisionDesigner");

            getDecision.WaitForControlEnabled();
            var getDecisionText = getDecision.GetChildren()[0] as WpfEdit;

            if (getDecisionText != null)
            {
                var displayValue = getDecisionText.Text;

                Assert.AreEqual(expected, displayValue,
                                "Decision intellisense doesnt work when using the mouse to select intellisense results");
            }
            else
            {
                Assert.Fail("Null decision");
            }
        }
        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);
            }
        }
Example #19
0
        public void CheckIfDebugProcessingBarIsShowingDurningExecutionExpectedToShowDuringExecutionOnly()
        {
            //Open the correct workflow
            ExplorerUIMap.DoubleClickWorkflow("LargeFileTesting", "TESTS");

            RibbonUIMap.ClickDebug();

            DebugUIMap.ClickExecute();

            var status   = OutputUIMap.GetStatusBarStatus();
            var spinning = OutputUIMap.IsSpinnerSpinning();

            Assert.AreEqual("Executing", status, "Debug output status text does not say executing when executing");
            Assert.IsTrue(spinning, "Debug output spinner not spinning during execution");
        }
        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());
        }
Example #21
0
        public void Decision_Intellisense_KeyboardSelect_DecisionTitleUpdatesCorrectly()
        {
            RibbonUIMap.CreateNewWorkflow();
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            VariablesUIMap.ClickScalarVariableName(0);
            SendKeys.SendWait("VariableName");

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, WorkflowDesignerUIMap.GetPointUnderStartNode(theTab));
            Playback.Wait(5000);
            //------------Execute Test---------------------------
            _decisionWizardUiMap.SendTabs(5, 1000);
            _decisionWizardUiMap.SelectMenuItem(17, 2000);
            _decisionWizardUiMap.SendTabs(11, 1000);

            //First field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(2, 1000);

            //Second field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(1, 1000);

            //Third field
            _decisionWizardUiMap.GetFirstIntellisense("[[V");
            _decisionWizardUiMap.SendTabs(6, 1000);

            //Wait for wizard to close
            KeyboardCommands.SendEnter(1500);

            // Assert Decision Title Updates Correctly
            const string Expected = "If [[VariableName]] Is Between [[VariableName]] and [[VariableName]]";

            var getDecision     = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "FlowDecisionDesigner");
            var getDecisionText = getDecision.GetChildren()[0] as WpfEdit;

            if (getDecisionText != null)
            {
                var displayValue = getDecisionText.Text;

                Assert.AreEqual(Expected, displayValue, "Decision intellisense doesnt work when using the keyboard to select intellisense results");
            }
            else
            {
                Assert.Fail();
            }
        }
        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);
            }
        }
Example #23
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 #24
0
        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);
        }
Example #25
0
        public void CopyDecisionsWithContextMenuAndPasteExpectedNoWizardsDisplayed()
        {
            //Initialize
            Clipboard.SetText(" ");
            RibbonUIMap.CreateNewWorkflow();
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            //Drag on two decisions
            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, WorkflowDesignerUIMap.GetPointUnderStartNode(theTab));
            WizardsUIMap.WaitForWizard();

            _decisionWizardUiMap.HitDoneWithKeyboard();
            var newPoint = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            newPoint.Y = newPoint.Y + 200;

            var clickPoint = new Point(newPoint.X, newPoint.Y);

            ToolboxUIMap.DragControlToWorkflowDesigner(ToolType.Decision, newPoint);
            WizardsUIMap.WaitForWizard(7000);

            _decisionWizardUiMap.HitDoneWithKeyboard();

            //Rubber-band select them
            var startDragPoint = WorkflowDesignerUIMap.GetPointUnderStartNode(theTab);

            startDragPoint.X = startDragPoint.X - 100;
            startDragPoint.Y = startDragPoint.Y - 100;
            Mouse.Move(startDragPoint);
            newPoint.X = newPoint.X + 100;
            newPoint.Y = newPoint.Y + 100;
            Mouse.StartDragging();
            Mouse.StopDragging(newPoint);
            startDragPoint.X = startDragPoint.X + 150;
            startDragPoint.Y = startDragPoint.Y + 150;
            Mouse.Click(MouseButtons.Right, ModifierKeys.None, clickPoint);
            var designSurface = WorkflowDesignerUIMap.GetFlowchartDesigner(theTab);

            SendKeys.SendWait("{DOWN}{DOWN}{ENTER}");
            Mouse.Click(designSurface);
            SendKeys.SendWait("^v");
            UITestControl uIItemImage = DatabaseServiceWizardUIMap.UIBusinessDesignStudioWindow.GetChildren()[0].GetChildren()[0];

            // Assert
            Assert.AreEqual("System Menu Bar", uIItemImage.FriendlyName);
        }
Example #26
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 #27
0
        public void WizardUiTests_WebServiceWizard_WebServiceInputMappings_ExpectedInputMappingsCreated()
        {
            string newGuid           = Guid.NewGuid().ToString();
            string remove            = newGuid.Remove(8);
            string newWebserviceName = "WebService" + remove;

            //Open wizard
            const int tabWait = 200;

            RibbonUIMap.ClickNewWebService();
            KeyboardCommands.SendTabs(2, tabWait);
            KeyboardCommands.SendDownArrows(1);
            KeyboardCommands.SendTabs(8, tabWait);
            KeyboardCommands.SendDownArrows(1); // first resource is faulty, we need the second ;)
            KeyboardCommands.SendTabs(4, tabWait);
            KeyboardCommands.SelectAllText();
            KeyboardCommands.SendDel();
            KeyboardCommands.SendKey("?[[a]]=[[b]][[c]]&[[d]]=[[f]]");
            KeyboardCommands.SendLeftArrows(2);
            KeyboardCommands.SendKey("e");
            KeyboardCommands.SendTabs(2, tabWait);
            KeyboardCommands.SendEnter(8000);
            KeyboardCommands.SendTabs(1, tabWait); // Test
            KeyboardCommands.SendEnter(5000);
            KeyboardCommands.SendTabs(3, tabWait);
            KeyboardCommands.SendKey(newWebserviceName);
            KeyboardCommands.SendTabs(1, tabWait);
            KeyboardCommands.SendEnter(2000);

            UITestControl theTab          = RibbonUIMap.CreateNewWorkflow(1500);
            UITestControl activityControl = ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, newWebserviceName, "Unassigned");

            using (var activity = new DsfActivityUiMap(false)
            {
                Activity = activityControl, TheTab = theTab
            })
            {
                StringAssert.Contains(activity.GetInputMappingToServiceValue(1), "a");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(2), "b");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(3), "c");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(4), "d");
                StringAssert.Contains(activity.GetInputMappingToServiceValue(5), "fe");
            }
        }
Example #28
0
        public void CopyWorkFlowWithContextMenuCopyAndPasteToAnotherWorkflowExpectedNothingCopied()
        {
            Clipboard.SetText(" ");

            RibbonUIMap.CreateNewWorkflow();
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            WorkflowDesignerUIMap.CopyWorkflowXamlWithContextMenu(theTab);
            Assert.IsTrue(string.IsNullOrWhiteSpace(Clipboard.GetText()),
                          "Able to copy workflow Xaml using context menu");
            RibbonUIMap.CreateNewWorkflow();
            theTab = TabManagerUIMap.GetActiveTab();
            var startButton = WorkflowDesignerUIMap.FindStartNode(theTab);

            Mouse.Click(new Point(startButton.BoundingRectangle.X - 5, startButton.BoundingRectangle.Y - 5));
            SendKeys.SendWait("^V");
            Assert.IsFalse(WorkflowDesignerUIMap.DoesControlExistOnWorkflowDesigner(theTab,
                                                                                    "Unsaved 1(FlowchartDesigner)"));
        }
Example #29
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 #30
0
        // 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);
        }