Пример #1
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());
            }
        }
Пример #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 DsfActivityTests_CodedUI_GetAServiceWilALongDisplayName_TheDisplayNameBoxWidthSizeWillBe174()
 {
     using (var dsfActivityUiMap = new DsfActivityUiMap())
     {
         dsfActivityUiMap.DragWorkflowOntoDesigner("this name is so long the display name", "TEST");
         dsfActivityUiMap.ClickCloseMapping();
         Assert.AreEqual(178, dsfActivityUiMap.GetDisplayNameMaxWidth());
     }
 }
Пример #4
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");
            }
        }