Inheritance: UIWindow
        public void GenerateUIMap()
        {
            string baseUIMapFileName = @"C:\Users\yingzhu.SAGESGROUP\Documents\Visual Studio 2010\Projects\TestSln\CalenderDemo";
            string uimapFileName = System.IO.Path.Combine(baseUIMapFileName, "DownloadPerformanceWindow.uitest");

            UITest uiTest = UITest.Create(uimapFileName);
            UIMap newMap = new UIMap();
            newMap.Id = "UIMap";
            uiTest.Maps.Add(newMap);
            UITestControl root;
            string launchAppFileName = System.Configuration.ConfigurationManager.AppSettings["LaunchAppFileName"];
            if (!string.IsNullOrEmpty(launchAppFileName))
            {
                root = ApplicationUnderTest.Launch(System.Configuration.ConfigurationManager.AppSettings["LaunchAppFileName"]);
            }
            else
            {
                root = new UITestControl();
                root.TechnologyName = "MSAA";
                root.SearchProperties[WinWindow.PropertyNames.Name] = "Download Performance";
                root.SearchProperties[WinWindow.PropertyNames.ControlName] = "DownloadPerformanceDialog";
                root.WindowTitles.Add("Download Performance");
            }
            GetAllChildren(root, uiTest.Maps[0]);
            uiTest.Save(uimapFileName);
        }
 private void GetAllChildren(UITestControl root, UIMap uiMap)
 {
     foreach (UITestControl child in root.GetChildren())
     {
         uiMap.AddUIObject(child.GetProperty(UITestControl.PropertyNames.UITechnologyElement) as IUITechnologyElement);
         GetAllChildren(child, uiMap);
     }
 }
        public void GenerateUIMap()
        {
            string baseUIMapFileName = @"E:\AFPSourceCode\trunk\src_test\AFPTest\TestFramework\UIMaps\";
            string uimapFileName = System.IO.Path.Combine(baseUIMapFileName, "UIMap1.uitest");
            Microsoft.VisualStudio.TestTools.UITest.Common.UITest uiTest = Microsoft.VisualStudio.TestTools.UITest.Common.UITest.Create(uimapFileName);
            UIMap newMap = new UIMap();
            newMap.Id = "UIMap";
            uiTest.Maps.Add(newMap);

            UITestControl root;
            root = new UITestControl();
            root.TechnologyName = "MSAA";
            root.SearchProperties[WinWindow.PropertyNames.Name] = "[email protected] #348004880(USD) - Campaign - adSage for Performance";
            root.SearchProperties[WinWindow.PropertyNames.ControlName] = "RibbonForm";

            GetAllChildren(root, uiTest.Maps[0]);
            uiTest.Save(uimapFileName);
        }
 public RideShareWebAdapter(UIMap UIMap)
 {
     this.UIMap = UIMap;
 }
 public void MyTestInitialize()
 {
     UIMap.SetPlaybackSettings();
     UIMap.AssertStudioIsRunning();
 }
 public void Click_DB_Source_Wizard_Test_Connection_Button()
 {
     Mouse.Click(MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab.WorkSurfaceContext.TestConnectionButton, new Point(21, 16));
     UIMap.WaitForSpinner(MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab.WorkSurfaceContext.Spinner);
     Assert.IsTrue(MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab.WorkSurfaceContext.ManageDatabaseSourceControl.DatabaseComboxBox.Exists, "Database Combobox is not visible.");
 }
Example #7
0
 public void MyTestInitialize()
 {
     UIMap.SetPlaybackSettings();
     UIMap.AssertStudioIsRunning();
     UIMap.Click_NewWorkflow_RibbonButton();
 }
Example #8
0
 public void Click_Deploy_Tab_Source_Server_Combobox()
 {
     UIMap.WaitForSpinner(MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DeployTab.WorkSurfaceContext.DockManager.DeployView.SourceServerExplorer.ExplorerTree.LocalHost.Spinner);
     Mouse.Click(MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DeployTab.WorkSurfaceContext.DockManager.DeployView.SourceServerConectControl.Combobox.ToggleButton, new Point(230, 9));
     Assert.IsTrue(UIMap.MainStudioWindow.ComboboxListItemAsNewRemoteServer.Exists, "New Remote Server... option does not exist in Source server combobox.");
 }
        public void ParseAuroraEventLog()
        {
            var log = new LogEvaluator("log", Messages);

            new EvaluatorParameterizer().SetParameters(log, MessageType.Debug, "Parsing event log.");
            log.Execute();

            if (Settings.DatabasePassword == null)
            {
                new EventParser(UIMap, Settings, Database, Executor).ParseUsingEventWindow(UIMap.GetTime());
            }
            else
            {
                new EventParser(UIMap, Settings, Database, Executor).ParseUsingDatabase();
            }
        }
Example #10
0
 public void Filter_ServicePicker_Explorer(string FilterText)
 {
     ServicePickerDialog.Explorer.FilterTextbox.Text = FilterText;
     UIMap.WaitForControlVisible(ServicePickerDialog.Explorer.ExplorerTree.Localhost.TreeItem1);
     UIMap.WaitForSpinner(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.Spinner);
 }
 public void UnpinServerSourceWizardTab()
 {
     ExplorerUIMap.Click_NewServerButton_From_ExplorerConnectControl();
     UIMap.Unpin_Tab_With_Drag(ServerSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.ServerSourceTab);
 }
 public void UnpinSettingsWizardTab()
 {
     UIMap.Click_Settings_RibbonButton();
     UIMap.Unpin_Tab_With_Drag(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab);
 }
 public void UnpinSchedulerWizardTab()
 {
     UIMap.Click_Scheduler_RibbonButton();
     UIMap.Unpin_Tab_With_Drag(SchedulerUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SchedulerTab);
 }
 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);
 }
Example #15
0
 public void MyTestCleanup()
 {
     UIMap.Click_Close_Workflow_Tab_Button();
     UIMap.Click_MessageBox_No();
 }
Example #16
0
 public void CreateJSONTool_OpenQVIUITest()
 {
     UIMap.Open_Json_Tool_Qvi_Large_View();
 }
Example #17
0
 public void CreateJSONTool_OpenLargeViewUITest()
 {
     UIMap.Open_Json_Tool_Large_View();
 }
Example #18
0
 public void MyTestInitialize()
 {
     UIMap.SetPlaybackSettings();
     UIMap.AssertStudioIsRunning();
     _dependency = new Depends(Depends.ContainerType.PostGreSQL);
 }
 public void UnpinWebSourceWizardTab()
 {
     ExplorerUIMap.Click_NewWebSource_From_ExplorerContextMenu();
     UIMap.Unpin_Tab_With_Drag(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab);
 }
Example #20
0
 public void Click_Service_Picker_Dialog_Refresh_Button()
 {
     Mouse.Click(ServicePickerDialog.Explorer.Refresh, new Point(10, 11));
     UIMap.WaitForSpinner(ServicePickerDialog.Explorer.ExplorerTree.Localhost.Checkbox.Spinner);
 }
 public void UnpinDeployWizardTab()
 {
     UIMap.Click_Deploy_Ribbon_Button();
     UIMap.Unpin_Tab_With_Drag(DeployUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DeployTab);
 }
Example #22
0
 public void CreateTestFromDebugButtonDisabledForUnsavedWorkflows()
 {
     UIMap.Click_NewWorkflow_RibbonButton();
     WorkflowTabUIMap.Make_Workflow_Savable_By_Dragging_Start();
     Assert.IsFalse(WorkflowTabUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.ContentPane.ContentDockManager.SplitPaneRight.DebugOutput.CreateTestFromDebugButton.Enabled);
 }
 public void UnpinDependencyGraphWizardTab()
 {
     ExplorerUIMap.Select_ShowDependencies_In_ExplorerContextMenu("Hello World");
     UIMap.Unpin_Tab_With_Drag(DependencyGraphUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DependencyGraphTab);
 }
Example #24
0
        public void RefreshExplorerAfterDeletingResourceFromDiskUITest()
        {
            var resourcesFolder = Environment.ExpandEnvironmentVariables("%programdata%") + @"\Warewolf\Resources\Acceptance Testing Resources";
            var path            = resourcesFolder + @"\" + WorkflowName + ".bite";

            if (File.Exists(path))
            {
                File.Delete(path);
            }
            ExplorerUIMap.Filter_Explorer(WorkflowName);
            UIMap.WaitForControlVisible(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerRefreshButton);
            Mouse.Click(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerRefreshButton, new Point(10, 10));
            UIMap.WaitForSpinner(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.Spinner);
            Assert.IsFalse(UIMap.ControlExistsNow(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerTree.localhost.FirstItem.FirstSubItem) ? ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerTree.localhost.FirstItem.FirstSubItem.ItemEdit.Text.Contains(WorkflowName) : UIMap.ControlExistsNow(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerTree.localhost.FirstItem.FirstSubItem), "Workflow exists in explorer tree after deleting from disk.");
        }
Example #25
0
 public void MyTestInitialize()
 {
     UIMap.SetPlaybackSettings();
     UIMap.AssertStudioIsRunning();
     ExplorerUIMap.Open_Context_Menu_For_Service(MergeDecision);
 }
Example #26
0
 public void Click_EmailSource_TestConnection_Button()
 {
     Mouse.Click(MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.EmailSourceTab.SendTestModelsCustom.TestConnectionButton, new Point(58, 16));
     UIMap.WaitForSpinner(MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.EmailSourceTab.SendTestModelsCustom.Spinner);
 }
Example #27
0
        /// <summary>
        /// Move UI object from other UIMap into current UIMap
        /// </summary>
        /// <param name="srcUIMapFile">The source UIMap file.</param>
        /// <param name="srcElementPath">The source element path.</param>
        /// <param name="destParentPath">Path of destination parent.</param>
        public void MoveUIObject(UIMapFile srcUIMapFile, string srcElementPath, string destParentPath)
        {
            // source element
            UIObject srcElement = srcUIMapFile.FindUIObject(srcElementPath);

            if (srcElement == null)
            {
                throw new NullReferenceException(String.Format("Could not find source UIObject with path '{0}'", srcElementPath));
            }

            // source element parent
            string srcParentPath = srcElementPath.Substring(0, srcElementPath.LastIndexOf('.'));

            // not supported to move actions between different files
            if (srcUIMapFile != this)
            {
                // find references in actions
                foreach (UITestAction action in srcUIMapFile.UITest.ExecuteActions.Actions)
                {
                    if ((action.UIObjectName != null) && (action.UIObjectName.StartsWith(srcElementPath)))
                    {
                        throw new NotSupportedException("Your source UIMap file contains actions referencing elements that are moved. This is not supported");
                    }
                }
            }

            if (srcElement is TopLevelElement)
            {
                // can only be moved to root
                if (destParentPath.Contains('.'))
                {
                    throw new ArgumentException(String.Format("A top level element ({0}) can only be moved to UIMap root", srcElementPath));
                }

                TopLevelElement srcTopLevelElement = (TopLevelElement)srcElement;
                UIMap           destUIMap          = this.UITest.Maps.Where(m => m.Id == destParentPath).FirstOrDefault();
                if (destUIMap == null)
                {
                    throw new NullReferenceException(String.Format("Could not find UIMap '{0}' in destination UIMap file", destParentPath));
                }

                UIMap srcUIMap = srcUIMapFile.UITest.Maps.Where(m => m.Id == srcParentPath).FirstOrDefault();
                if (srcUIMap == null)
                {
                    throw new NullReferenceException(String.Format("Could not find UIMap '{0}' in source UIMap file", srcParentPath));
                }

                TopLevelElement destTopLevelElement = destUIMap.TopLevelWindows.Where(t => t.Id == srcTopLevelElement.Id).FirstOrDefault();
                if (destTopLevelElement == null)
                {
                    // doesn't exist in destination, so simply move it
                    destUIMap.TopLevelWindows.Add(srcTopLevelElement);
                    srcUIMap.TopLevelWindows.Remove(srcTopLevelElement);
                }
                else
                {
                    // a top level element with same id already exists in destination, so we need to merge
                    RecursivelyMergeElements(srcTopLevelElement, destTopLevelElement);

                    srcUIMapFile.DeleteUIObject(srcElementPath);
                }

                this.IsModified         = true;
                srcUIMapFile.IsModified = true;
            }
            else
            {
                // just a "normal" UIObject (not top-level)

                UIObject srcParent = srcUIMapFile.FindUIObject(srcParentPath);
                if (srcParent == null)
                {
                    throw new NullReferenceException(String.Format("Could not find source parent UIObject with path '{0}'", srcParentPath));
                }

                // destination element parent
                UIObject destParent = this.FindUIObject(destParentPath);
                if (destParent == null)
                {
                    throw new NullReferenceException(String.Format("Could not find destination parent UIObject with path '{0}'", destParentPath));
                }

                // find references in actions and move them
                string destElementPath = String.Format("{0}.{1}", destParentPath, srcElement.Id);
                foreach (UITestAction action in this.UITest.ExecuteActions.Actions)
                {
                    if ((action.UIObjectName != null) && (action.UIObjectName.StartsWith(srcElementPath)))
                    {
                        action.UIObjectName = action.UIObjectName.Replace(srcElementPath, destElementPath);
                    }
                }

                // see if element already exists in destination (if so, we need to merge)
                UIObject destObject = destParent.Descendants.Where(d => d.Id == srcElement.Id).FirstOrDefault();
                if (destObject == null)
                {
                    // just move it
                    destParent.Descendants.Add(srcElement);
                    srcParent.Descendants.Remove(srcElement);
                }
                else
                {
                    // we need to recursively move elements
                    RecursivelyMergeElements(srcElement, destObject);
                    srcUIMapFile.DeleteUIObject(srcElementPath);
                }

                this.IsModified         = true;
                srcUIMapFile.IsModified = true;
            }
        }
 public void UseDefaultPlaybackSettings()
 {
     UIMap.SetPlaybackSettings();
 }
Example #29
0
 public void MySQLDatabaseTool_Small_And_LargeView_Then_NewSource_UITest()
 {
     using (Depends _dependency = new Depends(Depends.ContainerType.MySQL))
     {
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.Exists,
             "My SQL Connector tool does not exist on design surface.");
         //Small View
         DatabaseToolsUIMap.MySqlDatabaseTool_ChangeView_With_DoubleClick();
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.SmallView.Exists,
             "My SQL Connector tool small view does not exist after collapsing large view with a double click.");
         //Large View
         DatabaseToolsUIMap.MySqlDatabaseTool_ChangeView_With_DoubleClick();
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.SourcesComboBox.Exists,
             "Sources combobox does not exist on My SQL database connector tool large view.");
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.EditSourceButton.Exists,
             "Edit Source button does not exist on My SQL database connector tool large view.");
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.NewSourceButton.Exists,
             "New Source button does not exist on My SQL database connector tool large view.");
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.ActionsComboBox.Exists,
             "Actions combobox does not exist on My SQL database connector tool large view.");
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.GenerateOutputsButton.Exists,
             "Generate Outputs button does not exist on My SQL database connector tool large view.");
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.OutputsMappingDataGrTable.Exists,
             "Outputs Mapping table does not exist on My SQL database connector tool large view.");
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.RecordSetTextBoxEdit.Exists,
             "Recordset textbox does not exist on My SQL database connector tool large view.");
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.OnErrorCustom.Exists,
             "OnError panel does not exist on My SQL database connector tool large view.");
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.DoneButton.Exists,
             "Done button does not exist on My SQL database connector tool large view.");
         //New Source
         DatabaseToolsUIMap.Click_NewSourceButton_From_MySQLTool();
         Assert.IsTrue(
             DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab
             .Exists, "MySQL Source Tab does not exist.");
         Assert.IsTrue(
             DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab
             .WorkSurfaceContext.ManageDatabaseSourceControl.ServerComboBox.Enabled,
             "MySQL Server Address combobox is disabled new MySQL Source wizard tab");
         Assert.IsTrue(
             DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab
             .WorkSurfaceContext.UserRadioButton.Enabled,
             "User authentification rabio button is not enabled.");
         Assert.IsTrue(
             DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab
             .WorkSurfaceContext.WindowsRadioButton.Enabled,
             "Windows authentification type radio button not enabled.");
         Assert.IsFalse(
             DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab
             .WorkSurfaceContext.TestConnectionButton.Enabled, "Test Connection Button is enabled.");
         DBSourceUIMap.Click_UserButton_On_DatabaseSource();
         Assert.IsTrue(DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan
                       .DBSourceTab.WorkSurfaceContext.UserNameTextBox.Exists);
         Assert.IsTrue(DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan
                       .DBSourceTab.WorkSurfaceContext.PasswordTextBox.Exists);
         DBSourceUIMap.Enter_Text_Into_DatabaseServer_Tab(_dependency.Container.IP);
         DBSourceUIMap.IEnterRunAsUserRootOnDatabaseSource();
         Assert.IsTrue(
             DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab
             .WorkSurfaceContext.TestConnectionButton.Enabled, "Test Connection Button is not enabled.");
         DBSourceUIMap.Click_DB_Source_Wizard_Test_Connection_Button();
         DBSourceUIMap.Select_mysql_From_DB_Source_Wizard_Database_Combobox();
         UIMap.Save_With_Ribbon_Button_And_Dialog(SourceName);
         DBSourceUIMap.Click_Close_DB_Source_Wizard_Tab_Button();
         //Edit Source
         DatabaseToolsUIMap.MySqlDatabaseTool_ChangeView_With_DoubleClick();
         DatabaseToolsUIMap.Select_Source_From_MySQLTool();
         Assert.IsTrue(
             DatabaseToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab
             .WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner
             .WorkflowItemPresenter.Flowchart.MySqlDatabase.LargeView.EditSourceButton.Enabled,
             "Edit Source Button is not enabled after selecting source.");
         DatabaseToolsUIMap.Click_EditSourceButton_On_MySQLTool();
         Assert.IsTrue(
             DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab
             .Exists, "MySql Source Tab does not exist");
         DBSourceUIMap.Select_test_From_DB_Source_Wizard_Database_Combobox();
         UIMap.Click_Save_Ribbon_Button_With_No_Save_Dialog();
         DBSourceUIMap.Click_Close_DB_Source_Wizard_Tab_Button();
         DatabaseToolsUIMap.MySqlDatabaseTool_ChangeView_With_DoubleClick();
         DatabaseToolsUIMap.Click_EditSourceButton_On_MySQLTool();
         Assert.AreEqual("test",
                         DBSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.DBSourceTab
                         .WorkSurfaceContext.ManageDatabaseSourceControl.DatabaseComboxBox.testText.DisplayText);
     }
 }
Example #30
0
 public void Delete_Assign_With_Context_Menu()
 {
     Mouse.Click(MainStudioWindow.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.WorkflowDesigner_Custom.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.MultiAssign, MouseButtons.Right, ModifierKeys.None, new Point(115, 10));
     Mouse.Click(UIMap.MainStudioWindow.DesignSurfaceContextMenu.Delete, new Point(27, 18));
     Assert.IsFalse(UIMap.ControlExistsNow(MainStudioWindow.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.WorkflowDesigner_Custom.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.MultiAssign.SmallView), "Assign tool still exists on design surface after deleting with context menu.");
 }
        public RideShareWebAssertion(UIMap UIMap)
        {
            this.UIMap = UIMap;

            initPageAssertions();
        }
Example #32
0
 public void Click_Decision_Dialog_Done_Button()
 {
     Mouse.Click(DecisionOrSwitchDialog.DoneButton, new Point(10, 14));
     Assert.IsFalse(UIMap.ControlExistsNow(DecisionOrSwitchDialog), "Decision large view dialog still exists after the done button is clicked.");
 }
Example #33
0
        private void ExportMaps()
        {
            SortedDictionary <(UIMap UIMap, Function Function), List <Achievement> > keyValuePairs = new();
            var uiMaps = uiMapDM.GetAll();

            foreach (var uiMap in uiMaps)
            {
                AddKeys(keyValuePairs, uiMap);
            }

            var categories = categoryDM.GetAll();

            foreach (var category in categories)
            {
                LinkAchievementsToMaps(keyValuePairs, category);
            }

            // At this point we have all data

            var sb = new StringBuilder();

            sb.AppendLine($"-- [[ Exported at {DateTime.Now:yyyy-MM-dd HH-mm-ss} ]] --");
            sb.AppendLine($"-- [[ This code is automatically generated as an export from ]] --");
            sb.AppendLine($"-- [[ an SQLite database and is not meant for manual edit. ]] --");
            sb.AppendLine("");
            sb.AppendLine("-- [[ Namespaces ]] --");
            sb.AppendLine("local _, addon = ...;");
            sb.AppendLine("local data = addon.Data;");
            sb.AppendLine("data.ExportedMaps = {};");
            sb.AppendLine("local exportedMaps = data.ExportedMaps;");
            sb.AppendLine("");
            sb.AppendLine("function exportedMaps.Load(m, a)");
            sb.AppendLineTabbed(1, "for i, _ in next, m do");
            sb.AppendLineTabbed(2, "m[i] = nil;");
            sb.AppendLineTabbed(1, "end");
            sb.AppendLine("");

            UIMap prevUIMap = null;

            foreach (var keyValuePair in keyValuePairs)
            {
                if (keyValuePair.Value.Any() && keyValuePair.Key.UIMap.ID > 0)
                {
                    if (prevUIMap != keyValuePair.Key.UIMap)
                    {
                        sb.AppendTabbed(1, $"m[{keyValuePair.Key.UIMap.ID}] = {{");
                    }
                    else
                    {
                        sb.AppendTabbed(1, $"m[{keyValuePair.Key.UIMap.ID}].");
                    }

                    sb.Append("Achievements");
                    if (keyValuePair.Key.Function == functionDM.Get10PlayerFunction())
                    {
                        sb.Append("10");
                    }
                    else if (keyValuePair.Key.Function == functionDM.Get25PlayerFunction())
                    {
                        sb.Append("25");
                    }
                    sb.Append(" = {");
                    foreach (var achievement in keyValuePair.Value)
                    {
                        sb.Append($"a[{achievement.ID}], ");
                    }
                    sb.Remove(sb.Length - 2, 2);
                    if (prevUIMap != keyValuePair.Key.UIMap)
                    {
                        sb.Append("}");
                    }
                    sb.Append("}");
                    sb.AppendLine($"; -- {keyValuePair.Key.UIMap.Name}");

                    prevUIMap = keyValuePair.Key.UIMap;
                }
            }

            sb.AppendLine("end");

            using var file = new StreamWriter(@"../../../../../../Krowi_AchievementFilter/Data/ExportedMaps.lua");
            file.WriteLine(sb.ToString());
        }
 public TaskSteps(TaskListContext tlc)
 {
     _tlc = tlc;
     _map = new UIMap();
 }
Example #35
0
 public void WaitForSaveDialogExplorerSpinner()
 {
     UIMap.WaitForSpinner(SaveDialogWindow.ExplorerView.ExplorerTree.localhost.Checkbox.Spinner);
 }
Example #36
0
 public void ExplorerItemsAppearOnTheSaveDialogExplorerTree()
 {
     Assert.IsTrue(UIMap.ControlExistsNow(SaveDialogWindow.ExplorerView.ExplorerTree.localhost.FirstItem));
     Assert.IsTrue(UIMap.ControlExistsNow(SaveDialogWindow.ExplorerView.ExplorerTree.localhost.SecondItem));
 }
Example #37
0
 private static void StartApplication()
 {
     var uiMap = new UIMap();
     uiMap.StartApplication();
     ScenarioContext.Current.Set(uiMap);
 }