Пример #1
0
 public void Clear_Filter_With_Esc_Key()
 {
     ExplorerUIMap.Filter_Explorer("Hello World");
     Keyboard.SendKeys("{ESCAPE}");
     Assert.AreEqual(string.Empty, ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.SearchTextBox.Text, "Filter textbox not cleared by ESC key.");
 }
Пример #2
0
 public void OpenMerge_For_Workflow(string workflow)
 {
     ExplorerUIMap.Open_Context_Menu_For_Service(workflow);
     Keyboard.SendKeys("{Enter}");
 }
Пример #3
0
 public void MyTestCleanup()
 {
     ExplorerUIMap.ClickServerInServerDDL(LocalServerName);
     TabManagerUIMap.CloseAllTabs();
     Halt();
 }
Пример #4
0
 public void Search_ExplorerFolder()
 {
     ExplorerUIMap.Filter_Explorer("Acceptance Testing Resources");
     Assert.IsTrue(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerTree.localhost.FirstItem.Exists);
     Assert.IsFalse(UIMap.ControlExistsNow(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerTree.localhost.SecondItem), "Second Item exists in the Explorer Exists");
 }
Пример #5
0
 public void UnpinServerSourceWizardTab()
 {
     ExplorerUIMap.Click_NewServerButton_From_ExplorerConnectControl();
     UIMap.Unpin_Tab_With_Drag(ServerSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.ServerSourceTab);
 }
Пример #6
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 + " ]");
        }
Пример #7
0
 public void UnpinDependencyGraphWizardTab()
 {
     ExplorerUIMap.Select_ShowDependencies_In_ExplorerContextMenu("Hello World");
     UIMap.Unpin_Tab_With_Drag(DependencyGraphUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DependencyGraphTab);
 }
Пример #8
0
 public void Server_DropDown_Has_Remote_Servers_UITest()
 {
     ExplorerUIMap.Click_Explorer_Remote_Server_Dropdown_List();
     Assert.IsTrue(UIMap.MainStudioWindow.ComboboxListItemAsRemoteConnectionIntegration.Exists);
 }
Пример #9
0
 public void ShowSwagger_ForResource()
 {
     ExplorerUIMap.Filter_Explorer("Hello World");
     ExplorerUIMap.Click_ViewSwagger_From_ExplorerContextMenu();
 }
Пример #10
0
 public void UnpinWebSourceWizardTab()
 {
     ExplorerUIMap.Click_NewWebSource_From_ExplorerContextMenu();
     UIMap.Unpin_Tab_With_Drag(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab);
 }
Пример #11
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));
            }
        }
Пример #12
0
        public void ResizeAdornerMappingsOnDrop_Expected_AdornerMappingIsResized()
        {
            const string resourceToUse = "NewForeachUpgradeDifferentExecutionTests";

            RibbonUIMap.CreateNewWorkflow();

            UITestControl theTab         = TabManagerUIMap.GetActiveTab();
            UITestControl theStartButton = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, "Start");

            // Get a point underneath the start button for the workflow
            // ReSharper disable ObjectCreationAsStatement
            new Point(theStartButton.BoundingRectangle.X - 100,
                      // ReSharper restore ObjectCreationAsStatement
                      theStartButton.BoundingRectangle.Y + 100);

            // Get a sample workflow
            ExplorerUIMap.DragResourceOntoWorkflowDesigner(theTab, resourceToUse, "INTEGRATION TEST SERVICES");

            UITestControl controlOnWorkflow = WorkflowDesignerUIMap.FindControlByAutomationId(theTab, resourceToUse, 100);

            Mouse.Click(controlOnWorkflow, new Point(5, 5));

            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.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.");
            }
        }
Пример #13
0
 public void DragServiceOntoDesigner(string serviceName, string categoryName, string serverName = "localhost", Point pointToDragTo = new Point())
 {
     Activity = ExplorerUIMap.DragResourceOntoWorkflowDesigner(TheTab, serviceName, categoryName, serverName, pointToDragTo);
 }
Пример #14
0
 public void MyTestInitialize()
 {
     UIMap.SetPlaybackSettings();
     UIMap.AssertStudioIsRunning();
     ExplorerUIMap.Open_Context_Menu_For_Service(MergeDecision);
 }
Пример #15
0
 public void UnpinTestsWizardTab()
 {
     ExplorerUIMap.Filter_Explorer("Hello World");
     ExplorerUIMap.Open_ExplorerFirstItemTests_With_ExplorerContextMenu();
     UIMap.Unpin_Tab_With_Drag(WorkflowServiceTestingUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.TestsTab);
 }
Пример #16
0
 public void Shortcut_Cntr_Shift_F_Opens_Search_View()
 {
     ExplorerUIMap.Click_Explorer_Refresh_Button();
     Keyboard.SendKeys("^+F");
     Assert.IsTrue(SearchUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SearchTab.Exists, "Search View Window did not Open after using shortcut Cntr+Shift+F.");
 }
Пример #17
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);
        }