Ejemplo n.º 1
0
        public void RemoteServerUITests_EditRemotePluginService_PluginServiceIsEdited()
        {
            // NOTE :
            // Requires PluginSource points the correct location as set below...

            // Requires a Plugin Directory on server with :
            // Plugins\PrimativesTestDLL.dll
            // And Plugins\PrimativesTestDLL - Copy.dll

            const string TextToSearchWith = "PluginService";

            //Edit remote plugin service
            ExplorerUIMap.DoubleClickService(TextToSearchWith, "REMOTEUITESTS", RemoteServerName);
            PluginServiceWizardUIMap.ClickActionAtIndex(4);
            KeyboardCommands.SendTabs(8, 250);
            KeyboardCommands.SendEnter(500); // test it

            KeyboardCommands.SendTabs(5, 250);
            KeyboardCommands.SendEnter(500); // save it

            //Change it back
            ExplorerUIMap.DoubleClickService(TextToSearchWith, "REMOTEUITESTS", RemoteServerName);
            string actionName = PluginServiceWizardUIMap.GetActionName();

            PluginServiceWizardUIMap.ClickActionAtIndex(13);
            KeyboardCommands.SendTabs(8, 250);
            KeyboardCommands.SendEnter(500); // test it

            KeyboardCommands.SendTabs(5, 250);
            KeyboardCommands.SendEnter(500); // save it

            StringAssert.Contains(actionName, "FetchCharVal");
        }
Ejemplo n.º 2
0
        public void RemoteServerUITests_EditRemoteDbService_DbServiceIsEdited()
        {
            // NOTE : Needs to use Dev2TestingDB
            // IF RemoteServerUITests_EditRemoteDbSource_DbSourceIsEdited breaks it will also break this test

            const string TextToSearchWith = "RemoteDBService";

            //Edit remote db service
            ExplorerUIMap.DoubleClickService(TextToSearchWith, "REMOTEUITESTS", RemoteServerName);
            DatabaseServiceWizardUIMap.ClickScrollActionListUp();
            DatabaseServiceWizardUIMap.ClickFourthAction();
            DatabaseServiceWizardUIMap.ClickTestAction();
            KeyboardCommands.SendTabs(5);
            KeyboardCommands.SendEnter();

            //Change it back
            ExplorerUIMap.DoubleClickService(TextToSearchWith, "REMOTEUITESTS", RemoteServerName);
            string actionName = DatabaseServiceWizardUIMap.GetActionName();

            DatabaseServiceWizardUIMap.ClickThirdAction();
            DatabaseServiceWizardUIMap.ClickTestAction();
            KeyboardCommands.SendTabs(5);
            KeyboardCommands.SendEnter();
            //Assert remote db service changed its action
            StringAssert.Contains(actionName, "dbo.FetchHtmlFr");
        }
Ejemplo n.º 3
0
        public void RemoteServerUITests_EditRemoteWebSource_WebSourceIsEdited()
        {
            const string TextToSearchWith = "Dev2GetCountriesWebService";

            //Edit remote web source
            ExplorerUIMap.DoubleClickSource(TextToSearchWith, "WEB SRC", RemoteServerName);

            var actualLeftTitleText  = WebSourceWizardUIMap.GetLeftTitleText();
            var actualRightTitleText = WebSourceWizardUIMap.GetRightTitleText();

            Assert.AreEqual("Edit - Dev2GetCountriesWebService", actualLeftTitleText);
            Assert.AreEqual(remoteConnectionString, actualRightTitleText);

            WebSourceWizardUIMap.EnterTextIntoWizardTextBox(3, "?extension=json&prefix=b");
            WebSourceWizardUIMap.PressButtonOnWizard(3);
            SaveDialogUIMap.ClickSave();

            //Change it back
            ExplorerUIMap.DoubleClickSource(TextToSearchWith, "WEB SRC", RemoteServerName);
            //Get textbox text
            var persistClipboard = Clipboard.GetText();

            KeyboardCommands.SendTabs(3);
            WebSourceWizardUIMap.PressCtrlC();
            WebSourceWizardUIMap.EnterTextIntoWizardTextBox(0, "?extension=json&prefix=a");
            WebSourceWizardUIMap.PressButtonOnWizard(3);
            string query = Clipboard.GetText();

            Clipboard.SetText(persistClipboard);
            SaveDialogUIMap.ClickSave();

            Assert.AreEqual("?extension=json&prefix=b", query, "Cannot change remote web source");
        }
Ejemplo n.º 4
0
        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]]");
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
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");
            }
        }
Ejemplo n.º 7
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();
        }
Ejemplo n.º 8
0
        public void RemoteServerUITests_EditRemotePluginSource_PluginSourceIsEdited()
        {
            // NOTE :
            // Requires a Plugin Directory on server with :
            // Plugins\PrimativesTestDLL.dll
            // And Plugins\PrimativesTestDLL - Copy.dll

            const string TextToSearchWith = "PluginSource";

            //Edit remote plugin source
            ExplorerUIMap.DoubleClickSource(TextToSearchWith, "REMOTETESTS", RemoteServerName);

            var actualLeftTitleText  = PluginSourceMap.GetLeftTitleText();
            var actualRightTitleText = PluginSourceMap.GetRightTitleText();

            Assert.AreEqual("Edit - PluginSource", actualLeftTitleText);
            Assert.AreEqual(remoteConnectionString, actualRightTitleText);

            KeyboardCommands.SendTabs(2, 250);
            KeyboardCommands.SelectAll();
            KeyboardCommands.SendDel();
            KeyboardCommands.SendKey("Plugins\\PrimativesTestDLL - Copy.dll");
            PluginServiceWizardUIMap.PressButtonOnWizard(1);
            SaveDialogUIMap.ClickSave();

            // Change it back
            ExplorerUIMap.DoubleClickSource(TextToSearchWith, "REMOTETESTS", RemoteServerName);
            KeyboardCommands.SendTabs(2, 250);
            KeyboardCommands.SelectAll();

            // get the path to see what it saved as ;)
            var path = KeyboardCommands.SendCopy();

            KeyboardCommands.SendDel();
            KeyboardCommands.SendKey("Plugins\\PrimativesTestDLL.dll");
            PluginServiceWizardUIMap.PressButtonOnWizard(1);
            SaveDialogUIMap.ClickSave();

            Assert.AreEqual(path, @"Plugins\PrimativesTestDLL - Copy.dll", "Cannot change remote plugin source");
        }
Ejemplo n.º 9
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");
            }
        }
Ejemplo n.º 10
0
        public void ToolDesigners_RenameLargeView_TabOrderAndDestinationUserNameAndPassword_UiRepondingFine()
        {
            const string   ToolName = "Rename";
            const ToolType ToolType = ToolType.Rename;

            // Create the workflow
            RibbonUIMap.CreateNewWorkflow();

            // Get some variables
            UITestControl theTab = TabManagerUIMap.GetActiveTab();

            #region Test entering text into the textboxes

            //Enter test data into all the textboxes in the large view
            LargeViewUtilMethods.LargeViewTextboxesEnterTestData(ToolType, theTab);

            //Get all the textboxes off the large view
            List <UITestControl> allTextBoxesFromLargeView = LargeViewUtilMethods.GetAllTextBoxesFromLargeView(ToolName, theTab);

            //Click the done button
            LargeViewUtilMethods.ClickDoneButton(theTab, ToolName);

            //Get the first error control
            var errorControl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab,
                                                                               "Password must have a value");

            //Get the second error control
            var desErrorControl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab,
                                                                                  "Destination Password must have a value");

            //Make sure that the error controls arnt null
            Assert.IsNotNull(errorControl, "The error didnt show up");
            Assert.IsNotNull(desErrorControl, "The error didnt show up");

            //Enter data into the password boxes
            LargeViewUtilMethods.EnterDataIntoPasswordBoxes(allTextBoxesFromLargeView);

            //Click the done button
            LargeViewUtilMethods.ClickDoneButton(theTab, ToolName);

            WorkflowDesignerUIMap.OpenCloseLargeView(ToolType, theTab);

            //Try get the error controls
            errorControl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab,
                                                                           "Password must have a value");
            desErrorControl = WorkflowDesignerUIMap.FindControlByAutomationId(theTab,
                                                                              "Destination Password must have a value");

            //Make sure that the error controls are null
            Assert.IsNull(errorControl, "The error showed up");
            Assert.IsNull(desErrorControl, "The error didnt showed up");


            //Check each textbox contains the right text
            int counter = 0;
            foreach (var uiTestControl in allTextBoxesFromLargeView)
            {
                WpfEdit textbox = uiTestControl as WpfEdit;
                if (textbox != null && !textbox.IsPassword)
                {
                    Assert.AreEqual("[[theVar" + counter.ToString(CultureInfo.InvariantCulture) + "]]", textbox.Text, "the wrong text was in the textbox");
                }

                counter++;
            }

            #endregion

            #region Test tabbing

            //Set the focus into the first textbox
            allTextBoxesFromLargeView[0].SetFocus();

            //Tab through the controlls
            int numberOfTabsToLastTextbox = 7;
            for (int i = 0; i < numberOfTabsToLastTextbox; i++)
            {
                KeyboardCommands.SendTab(50);
            }
            //Assert that the focus is in the last textbox
            Assert.IsTrue(allTextBoxesFromLargeView[allTextBoxesFromLargeView.Count - 1].HasFocus, "The tabbing is out of order");

            #endregion
        }
Ejemplo n.º 11
0
 public void PressButtonOnWizard(int numberOfTabsToGetToButton, int waitAfterButtonPress = 0)
 {
     KeyboardCommands.SendTabs(numberOfTabsToGetToButton, 250);
     Keyboard.SendKeys("{ENTER}");
     Playback.Wait(waitAfterButtonPress);
 }
Ejemplo n.º 12
0
 public void EnterTextIntoWizardTextBox(int numTabs, string textToEnter, int waitAftertextEntered = 0)
 {
     KeyboardCommands.SendTabs(numTabs, 250);
     Keyboard.SendKeys(textToEnter);
     Playback.Wait(waitAftertextEntered);
 }
Ejemplo n.º 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);
        }