Example #1
0
        public void SwitchTool_EditSwitchCase_UITest()
        {
            UIMap.InitializeABlankWorkflow();
            WorkflowTabUIMap.Drag_Toolbox_Switch_Onto_DesignSurface();
            DialogsUIMap.Click_Switch_Dialog_Done_Button();

            Mouse.DoubleClick(ControlFlowToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.Switch);
            Assert.IsTrue(DialogsUIMap.DecisionOrSwitchDialog.DoneButton.Exists, "Switch dialog done button does not exist after dragging switch tool in from the toolbox.");
            DialogsUIMap.Click_Switch_Dialog_Done_Button();

            WorkflowTabUIMap.Drag_Toolbox_MultiAssign_Connect_ToDefaultSwitch();
            WorkflowTabUIMap.Drag_Toolbox_MultiAssign_Connect_SwitchFirstArm();
            Assert.IsTrue(UIMap.ControlExistsNow(DialogsUIMap.ActivityDefaultWindow));
            DialogsUIMap.ActivityDefaultWindow.TextboxHost.SwitchArmCaseTextbox.TextInput.Text = "1";
            Mouse.Click(DialogsUIMap.ActivityDefaultWindow.DoneButton);
            Assert.IsFalse(UIMap.ControlExistsNow(DialogsUIMap.ActivityDefaultWindow));
            WorkflowTabUIMap.DoubleClickSwitchFirstArm();
            Assert.IsTrue(UIMap.ControlExistsNow(DialogsUIMap.ActivityDefaultWindow));
            DialogsUIMap.ActivityDefaultWindow.TextboxHost.SwitchArmCaseTextbox.TextInput.Text = "2";
            Mouse.Click(DialogsUIMap.ActivityDefaultWindow.DoneButton);
            Assert.IsFalse(UIMap.ControlExistsNow(DialogsUIMap.MessageBoxWindow));

            WorkflowTabUIMap.DoubleClickSwitchFirstArm();
            Assert.IsTrue(UIMap.ControlExistsNow(DialogsUIMap.ActivityDefaultWindow));
            DialogsUIMap.ActivityDefaultWindow.TextboxHost.SwitchArmCaseTextbox.TextInput.Text = "2";
            Mouse.Click(DialogsUIMap.ActivityDefaultWindow.DoneButton);
            Assert.IsTrue(UIMap.ControlExistsNow(DialogsUIMap.MessageBoxWindow));
            Mouse.Click(DialogsUIMap.MessageBoxWindow.OKButton);
            Assert.IsFalse(UIMap.ControlExistsNow(DialogsUIMap.MessageBoxWindow));
        }
Example #2
0
 public void SwitchTool_DragOnWorkflow_UITest()
 {
     Assert.IsTrue(DialogsUIMap.DecisionOrSwitchDialog.VariableComboBox.Exists, "Varaible Combobox does not exist after dragging switch tool in from the toolbox.");
     Assert.IsTrue(DialogsUIMap.DecisionOrSwitchDialog.DisplayText.Exists, "Display Text Textbox does not exist after dragging switch tool in from the toolbox.");
     Assert.IsTrue(DialogsUIMap.DecisionOrSwitchDialog.OnErrorGroup.Exists, "On Error Pane does not exist after dragging switch tool in from the toolbox.");
     Assert.IsTrue(DialogsUIMap.DecisionOrSwitchDialog.DoneButton.Exists, "Switch dialog done button does not exist after dragging switch tool in from the toolbox.");
     Assert.IsTrue(DialogsUIMap.DecisionOrSwitchDialog.CancelButton.Exists, "Switch dialog cancel button does not exist after dragging switch tool in from the toolbox.");
     DialogsUIMap.Click_Switch_Dialog_Done_Button();
     Assert.IsTrue(WorkflowTabUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.Connector1.Exists, "No connectors exist on design surface after dragging tool onto start node autoconnector.");
 }