Inheritance: UIMapBase
Ejemplo n.º 1
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 ;(");
            }
        }
Ejemplo n.º 2
0
        public void WizardUiTests_EmailSourceWizard_CreateNewSource_ExpectedSourceCreated()
        {
            //Initialization
            var startEmailServer = TestUtils.StartEmailServer();

            var sourceName = Guid.NewGuid().ToString().Substring(0, 5);
            var name       = "codeduitest" + sourceName;

            //Open wizard
            EmailSourceWizardUIMap.OpenWizard();

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

            //Create Email Source
            EmailSourceWizardUIMap.CreateEmailSource(name);

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

            //Assert
            Assert.IsTrue(ExplorerUIMap.ValidateSourceExists(name, "Unassigned"), "Email source was not created.");

            TestUtils.StopEmailServer(startEmailServer);
        }
Ejemplo n.º 3
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));
        }
Ejemplo n.º 4
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"));
        }
Ejemplo n.º 5
0
        public void NewWebServiceShortcutKeyExpectedWebServiceOpens()
        {
            StudioWindow.WaitForControlReady(1000);
            Keyboard.SendKeys(StudioWindow, "{CTRL}{SHIFT}W");
            if (!WizardsUIMap.TryWaitForWizard())
            {
                Assert.Fail("New web service shortcut key doesnt work");
            }

            StudioWindow.SetFocus();
            WebServiceWizardUIMap.Cancel();
        }
Ejemplo n.º 6
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");
            }
        }
Ejemplo n.º 7
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);
        }