Пример #1
0
        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");
        }
Пример #2
0
        public void PluginServiceTests_CodedUI_EditService_ExpectErrorButton()
        {
            var newMapping = "ZZZ" + Guid.NewGuid().ToString().Replace("-", "").Substring(0, 6);
            //Drag the service onto the design surface
            UITestControl theTab = ExplorerUIMap.DoubleClickWorkflow("ErrorFrameworkTestWorkflow", "UI TEST");

            UITestControl service = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "DummyService");

            using (DsfActivityUiMap activityUiMap = new DsfActivityUiMap(false)
            {
                Activity = service, TheTab = theTab
            })
            {
                activityUiMap.ClickEdit();
                //Wizard actions
                PluginServiceWizardUIMap.ClickMappingTab();
                PluginServiceWizardUIMap.EnterDataIntoMappingTextBox(3, newMapping);
                PluginServiceWizardUIMap.ClickSaveButton(1);
                ResourceChangedPopUpUIMap.ClickCancel();
                //Assert the the error button is there
                Assert.IsTrue(activityUiMap.IsFixErrorButtonShowing());
                //Click the fix errors button
                activityUiMap.ClickFixErrors();
                activityUiMap.ClickCloseMapping();
                //Assert that the fix errors button isnt there anymore
                Assert.IsFalse(activityUiMap.IsFixErrorButtonShowing());
            }
        }
Пример #3
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 + " ]");
            }
        }
Пример #4
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 + " ]");
            }
        }
Пример #5
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" }));
        }
Пример #6
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);
        }
Пример #7
0
        public void PluginServiceTests_CodedUI_EditSource_FromEditService_ExceptNoNameError()
        {
            //------------Setup for test--------------------------

            //Drag the service onto the design surface
            UITestControl theTab = ExplorerUIMap.DoubleClickWorkflow("ErrorFrameworkTestWorkflow", "UI TEST");

            UITestControl service = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "DummyService");

            using (DsfActivityUiMap activityUiMap = new DsfActivityUiMap(false)
            {
                Activity = service, TheTab = theTab
            })
            {
                //------------Execute Test---------------------------
                activityUiMap.ClickEdit();
                PluginServiceWizardUIMap.EditSource();
                var contents = PluginServiceWizardUIMap.GetWindowContents();
                PluginServiceWizardUIMap.CancelEntireOperation();

                var result  = (contents.IndexOf("Name already exists.", StringComparison.Ordinal) >= 0);
                var isEmpty = (contents.Length == 0);

                //------------Assert Results-------------------------
                Assert.IsFalse(isEmpty, "Copy did not copy content of Edit Source Wizard!");
                Assert.IsFalse(result, "Plugin Source Window Contains Save Message?! Check your warewolf-utils.js - updateSaveValidationSpan method");
            }
        }
Пример #8
0
        public void DbServiceTests_CodedUI_EditService_ExpectErrorButton()
        {
            var newMapping = "ZZZ" + Guid.NewGuid().ToString().Replace("-", "").Substring(0, 6);
            //Drag the service onto the design surface
            UITestControl theTab = ExplorerUIMap.DoubleClickWorkflow("ErrorFrameworkTestWorkflow", "UI TEST");

            UITestControl service = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "TravsTestService");

            using (DsfActivityUiMap activityUiMap = new DsfActivityUiMap(false)
            {
                Activity = service, TheTab = theTab
            })
            {
                activityUiMap.ClickEdit();
                WizardsUIMap.WaitForWizard();

                //Wizard actions
                DatabaseServiceWizardUIMap.ClickMappingTab();
                DatabaseServiceWizardUIMap.EnterDataIntoMappingTextBox(0, newMapping);
                DatabaseServiceWizardUIMap.ClickSaveButton(4); // IT IS THE STRANGES THING. 3 IF RUN FROM DESKTOP, 4 FOR RDP SESSION?!
                ResourceChangedPopUpUIMap.ClickCancel();
                //Assert the the error button is there
                Assert.IsTrue(activityUiMap.IsFixErrorButtonShowing());
                //Click the fix errors button
                activityUiMap.ClickFixErrors();
                activityUiMap.ClickCloseMapping(5000);
                //Assert that the fix errors button isnt there anymore
                Assert.IsFalse(activityUiMap.IsFixErrorButtonShowing());
            }
        }
Пример #9
0
        public void RenameResource_WithDashes_ResourceRenamed()
        {
            const string NewTestResourceWithDashes = "New-Test-Resource-With-Dashes";
            const string OldResourceName           = "OldResourceName";

            ExplorerUIMap.RightClickRenameResource(OldResourceName, "Unassigned", NewTestResourceWithDashes);
            Assert.IsTrue(ExplorerUIMap.ValidateWorkflowExists(NewTestResourceWithDashes, "Unassigned"));
            ExplorerUIMap.DoubleClickWorkflow(NewTestResourceWithDashes, "Unassigned");
        }
Пример #10
0
        public void RemoteServerUITests_OpenWorkflowOnRemoteServerAndOpenWorkflowWithSameNameOnLocalHost_WorkflowIsOpened()
        {
            const string TextToSearchWith = "Find Records";

            var remoteTab = ExplorerUIMap.DoubleClickWorkflow(TextToSearchWith, "TESTS", RemoteServerName);

            Assert.IsNotNull(remoteTab);

            var localHostTab = ExplorerUIMap.DoubleClickWorkflow(TextToSearchWith, "TESTS");

            Assert.IsNotNull(localHostTab);
        }
Пример #11
0
        public void RemoteServerUITests_EditRemoteWorkFlow_WorkflowIsEdited()
        {
            UITestControl tab = ExplorerUIMap.DoubleClickWorkflow("Find Records", "TESTS", RemoteServerName);

            using (ActivityUiMapBase activityUiMapBase = new DsfActivityUiMap(false))
            {
                activityUiMapBase.TheTab = tab;
                activityUiMapBase.DragToolOntoDesigner(ToolType.Assign);
                var activeTabName = TabManagerUIMap.GetActiveTabName();
                StringAssert.Contains(activeTabName, "Find Records - Remote Connection Integration *");
            }
        }
Пример #12
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");
        }
Пример #13
0
        public void StudioTooling_StudioToolingUITest_CanToolsDisplay_IconIsVisible()
        {
            // Open the Workflow
            ExplorerUIMap.DoubleClickWorkflow("AllTools", "UI Test Resources");
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            // Assert all the icons are visible
            var designer = WorkflowDesignerUIMap.GetFlowchartDesigner(theTab);

            designer.GetChildren();

            #region Scroll All Items Into View

            var scrollBarV = WorkflowDesignerUIMap.ScrollViewer_GetVerticalScrollBar(theTab);
            WorkflowDesignerUIMap.ScrollViewer_GetHorizontalScrollBar(theTab);

            // Look low
            Mouse.StartDragging(scrollBarV);
            Mouse.StopDragging(WorkflowDesignerUIMap.ScrollViewer_GetScrollDown(theTab));

            // Look high
            Mouse.StartDragging(scrollBarV);
            Mouse.StopDragging(WorkflowDesignerUIMap.ScrollViewer_GetScrollUp(theTab));

            #endregion

            // Assert all the icons are visible
            designer = WorkflowDesignerUIMap.GetFlowchartDesigner(theTab);
            var toolCollection        = designer.GetChildren();
            HashSet <string> controls = new HashSet <string>();

            foreach (var child in toolCollection)
            {
                if (child.ControlType == "Custom" &&
                    child.ClassName != "Uia.ConnectorWithoutStartDot" &&
                    child.ClassName != "Uia.StartSymbol" &&
                    child.ClassName != "Uia.UserControl" &&
                    child.ClassName != "Uia.DsfWebPageActivityDesigner")
                {
                    Assert.IsTrue(WorkflowDesignerUIMap.IsActivityIconVisible(child),
                                  child.FriendlyName + " is missing its icon on the design surface");
                    controls.Add(child.ClassName);
                }
            }

            Assert.AreEqual(27, controls.Count, "Not all tools on the alls tools text workflow can be checked for icons");
        }
Пример #14
0
        public void DesignTimeErrorHandling_DesignTimeErrorHandlingUITest_FixErrorsButton_DbServiceMappingsFixed()
        {
            const string workflowToUse = "Bug_10011";
            const string serviceToUse  = "Bug_10011_DbService";
            var          newColumnName = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 8);

            Clipboard.Clear();

            // Open the Workflow
            var theTab = ExplorerUIMap.DoubleClickWorkflow(workflowToUse, "TestCategory");

            // Edit the DbService
            ExplorerUIMap.DoubleClickService(serviceToUse, "utility");

            //Test the service to get output mappings
            KeyboardCommands.SendTabs(11);
            KeyboardCommands.SendKey("a");
            KeyboardCommands.SendTabs(11);
            KeyboardCommands.SendEnter();
            Playback.Wait(2000);

            // Tab to mappings
            DatabaseServiceWizardUIMap.ClickMappingTab(320);

            KeyboardCommands.SendTabs(4);
            KeyboardCommands.SendKey(newColumnName);

            KeyboardCommands.SendTabs(4);
            KeyboardCommands.SendEnter();
            // Save
            if (ResourceChangedPopUpUIMap.WaitForDialog(5000))
            {
                ResourceChangedPopUpUIMap.ClickCancel();
            }

            using (DsfActivityUiMap activityUiMap = new DsfActivityUiMap(false))
            {
                activityUiMap.Activity = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, serviceToUse + "(ServiceDesigner)");
                Assert.IsTrue(activityUiMap.IsFixErrorButtonShowing(), "Error button should be showing");
                activityUiMap.ClickFixErrors();
                activityUiMap.ClickDoneButton();
                Assert.IsFalse(activityUiMap.IsFixErrorButtonShowing(), "Error button shouldn't be showing");
            }
        }
Пример #15
0
        public void AutoConnectorTests_DragAnActivityOnALineBetweenConnectors_ASecondConnectorIsCreated()
        {
            //Drag an activity to the design surface
            var theTab  = ExplorerUIMap.DoubleClickWorkflow("AutoConnectorResource", "UI Test Resources");
            var control = WorkflowDesignerUIMap.FindControlByAutomationId(TabManagerUIMap.GetActiveTab(), "MultiAssignDesigner");

            // slow it down so it works ;)
            Mouse.MouseMoveSpeed = 500;
            Mouse.MouseDragSpeed = 500;

            //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 - 140);
                ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, "Email Service", "Communication", "localhost", point);
                if (WorkflowDesignerUIMap.TryCloseMappings("Email Service"))
                {
                    //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 - 140);
                    if (point != newPoint)
                    {
                        WorkflowDesignerUIMap.DragControl("Email Service", new Point(control.BoundingRectangle.X + 120, control.BoundingRectangle.Y - 40));
                    }
                }
                else
                {
                    //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 - 140);
                    if (point != newPoint)
                    {
                        WorkflowDesignerUIMap.DragControl("Email Service", newPoint);
                    }
                }
            }
            else
            {
                throw new Exception("MultiAssignDesigner not found on active tab");
            }
            var connectors = WorkflowDesignerUIMap.GetAllConnectors();

            //Assert start auto connector worked
            Assert.IsTrue(connectors.Count >= 2, "Connector line wasn't split");
        }
Пример #16
0
        public void RemoteServerUITests_ViewRemoteWorkFlowInBrowser_WorkflowIsExecuted()
        {
            ExplorerUIMap.DoubleClickWorkflow("Find Records", "TESTS", RemoteServerName);
            KeyboardCommands.SendKey("{F7}");
            PopupDialogUIMap.WaitForDialog();
            //assert error dialog not showing
            var child = StudioWindow.GetChildren()[0];

            if (child != null)
            {
                Assert.IsNotInstanceOfType(child.GetChildren()[0], typeof(Window));
            }
            else
            {
                Assert.Fail("Cannot get studio window after remote workflow show in browser");
            }

            //Try close browser
            ExternalUIMap.CloseAllInstancesOfIE();
        }
Пример #17
0
        public void RemoteServerUITests_DebugARemoteWorkflowWhenLocalWorkflowWithSameNameIsOpen_WorkflowIsExecuted()
        {
            const string TextToSearchWith = "Find Records";

            var localTab = ExplorerUIMap.DoubleClickWorkflow(TextToSearchWith, "TESTS");

            Assert.IsNotNull(localTab);

            var remoteTab = ExplorerUIMap.DoubleClickWorkflow(TextToSearchWith, "TESTS", RemoteServerName);

            Assert.IsNotNull(remoteTab);

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

            var canidateTab = TabManagerUIMap.GetActiveTab();

            // verify the active tab is the remote tab
            Assert.AreEqual(remoteTab, canidateTab);
            Assert.IsTrue(OutputUIMap.IsExecutionRemote());
        }
Пример #18
0
        // Properly broken functionality
        public void DesignTimeErrorHandling_DesignTimeErrorHandlingUITest_FixErrorsButton_UserIsPromptedToAddRequiredDbServiceMappings()
        {
            const string workflowResourceName = "DesignTimeErrorHandlingRequiredMappingUITest";
            const string dbResourceName       = "UserIsPromptedToAddRequiredDbServiceMappingsTest";

            // Open the Workflow
            UITestControl theTab = ExplorerUIMap.DoubleClickWorkflow(workflowResourceName, "UI TEST");

            // Edit the DbService
            ExplorerUIMap.DoubleClickService(dbResourceName, "INTEGRATION TEST SERVICES");

            // Get wizard window
            DatabaseServiceWizardUIMap.ClickMappingTab(550); // over-ride cuz silly chickens like long names in test ;(

            //set the first input to required
            KeyboardCommands.SendTabs(2, 50);
            KeyboardCommands.SendSpace();

            // Save
            KeyboardCommands.SendTabs(4, 250);
            KeyboardCommands.SendEnter();
            ResourceChangedPopUpUIMap.ClickCancel();

            UITestControl activity = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, dbResourceName);

            using (DsfActivityUiMap activityUiMap = new DsfActivityUiMap(false)
            {
                TheTab = theTab, Activity = activity
            })
            {
                Assert.IsTrue(activityUiMap.IsFixErrorButtonShowing(), "'Fix Errors' button not visible");

                activityUiMap.ClickFixErrors();
                KeyboardCommands.SendKey("[[Name]]", 25);

                activityUiMap.ClickCloseMapping();
                Assert.IsFalse(activityUiMap.IsFixErrorButtonShowing(), "'Fix Errors' button is still visible");
            }
        }
Пример #19
0
        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");
        }
Пример #20
0
        public void DebugOutput_WhenUsingAColumnInput_ExecutesDataSplitCorrectly()
        {
            try
            {
                //------------Setup for test--------------------------

                ExplorerUIMap.DoubleClickWorkflow("12086", "Sprint12");

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



                RibbonUIMap.ClickDebug();

                DebugUIMap.ClickExecute();
                OutputUIMap.WaitForExecution(3000);
                UITestControl lastStep = OutputUIMap.GetLastStep();
                Assert.IsTrue(OutputUIMap.AssertDebugOutputContains(lastStep, new[] { "Outputs :", "[[moop]]", "=", "a" }));
            }
            catch (Exception e)
            {
                Assert.Fail("It appears there is a debug issue. [ " + e.Message + " ]");
            }
        }
Пример #21
0
        public void DebugOutput_WhenStopped_WaitsForRenderToCompleteBeforeStoppedMessage()
        {
            try
            {
                //------------Setup for test--------------------------
                //Open the correct workflow
                ExplorerUIMap.DoubleClickWorkflow("CodedUI_DebugOutputStop", "TESTS");
                string status = OutputUIMap.GetStatusBarStatus();
                Assert.AreEqual("Ready", status);
                UITestControl debugButton      = RibbonUIMap.ClickDebug();
                Point         debugButtonPoint = new Point(debugButton.BoundingRectangle.X + 5, debugButton.BoundingRectangle.Y + 5);
                DebugUIMap.ClickExecute(1500);
                MouseCommands.ClickPoint(debugButtonPoint, 500);

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

                status = OutputUIMap.GetStatusBarStatus();
                StringAssert.Contains(status, "Ready");
            }
            catch (Exception e)
            {
                Assert.Fail("It appears there is a debug issue. [ " + e.Message + " ]");
            }
        }
Пример #22
0
        public void CheckAddMissingIsWorkingWhenManuallyAddingVariableExpectedToShowVariablesAsUnUsed()
        {
            //Open the correct workflow

            ExplorerUIMap.DoubleClickWorkflow("CalculateTaxReturns", "MO");

            //ExplorerUIMap.EnterExplorerSearchText("CalculateTaxReturns");

            // flakey bit of code, we need to wait ;)
            //Playback.Wait(1500);

            //ExplorerUIMap.DoubleClickOpenProject("localhost", "WORKFLOWS", "MO", "CalculateTaxReturns");

            VariablesUIMap.ClickScalarVariableName(5);
            SendKeys.SendWait("codedUITestVar");
            VariablesUIMap.ClickScalarVariableName(4);

            Assert.IsFalse(VariablesUIMap.CheckIfVariableIsUsed(5));
            Assert.IsTrue(VariablesUIMap.CheckIfVariableIsUsed(1));
            Assert.IsTrue(VariablesUIMap.CheckIfVariableIsUsed(2));
            Assert.IsTrue(VariablesUIMap.CheckIfVariableIsUsed(3));
            Assert.IsTrue(VariablesUIMap.CheckIfVariableIsUsed(4));
            Playback.Wait(150);
        }
Пример #23
0
        public void DebugInput_WhenRun10Times_ExpectInputsPersistAndXMLRemainsLinked_InputsAndXMLRemainPersisted()
        {
            // 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();

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

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

                Assert.AreEqual("1", DebugUIMap.GetTextFromRow(0), "After executing " + i + " times the debug input dialog did not persist");
                Assert.AreEqual("2", DebugUIMap.GetTextFromRow(1), "After executing " + i + " times the debug input dialog did not persist");


                DebugUIMap.ClickExecute();
                OutputUIMap.WaitForExecution();
            }

            //Now check the XML tab works ;)

            RibbonUIMap.ClickDebug();
            DebugUIMap.ClickXMLTab();

            // flip back and forth to check persistence ;)
            DebugUIMap.ClickInputDataTab();
            DebugUIMap.ClickXMLTab();

            SendKeys.SendWait(KeyboardCommands.TabCommand);
            Playback.Wait(200);
            SendKeys.SendWait(KeyboardCommands.SelectAllCommand);
            Playback.Wait(200);
            Clipboard.Clear();
            SendKeys.SendWait(KeyboardCommands.CopyCommand);
            var actualXML = Clipboard.GetData(DataFormats.Text);

            actualXML = actualXML.ToString().Replace(Environment.NewLine, "").Replace(" ", "");

            //close the window ;)
            DebugUIMap.CloseDebugWindow_ByCancel();

            const string expectedXML = @"<DataList><countries><CountryID>1</CountryID><Description>2</Description></countries></DataList>";

            Assert.AreEqual(expectedXML, actualXML, "Got [ " + actualXML + " ]");
        }