Ejemplo n.º 1
0
        [NoLeak("MonoDevelop.TextEditor.CocoaTextViewContent")]                            // MD part of the chain.
        public void Run()
        {
            if (firstRun)
            {
                Workbench.OpenWorkspace(SolutionFileName);
                firstRun = false;
            }

            RunTypingTest();

            // Rebuild.
            WorkbenchExtensions.RebuildSolution();

            // Debug.
            WorkbenchExtensions.Debug();

            // Force focus of text editor. Otherwise the text editor is not
            // properly focused after the debug session finishes - the caret
            // does not blink and TextEditorCommands no longer work.
            // AutoTestClientSession.EnterText works without needing to
            // focus the workbench.
            WorkbenchExtensions.GrabDesktopFocus();

            // Close all documents.
            WorkbenchExtensions.CloseAllOpenFiles();
            UserInterfaceTests.Ide.WaitForIdeIdle();
        }
Ejemplo n.º 2
0
        public void Run()
        {
            if (firstRun)
            {
                Workbench.OpenWorkspace(SolutionFileName);
                firstRun = false;
            }

            // Open files.
            WorkbenchExtensions.OpenFiles(FilesToOpen);
            UserInterfaceTests.Ide.WaitForIdeIdle();

            // Make some changes to the active file and then remove the changes.
            TextEditor.MoveCaretToDocumentStart();
            UserInterfaceTests.Ide.WaitForIdeIdle();

            if (TextToEnter.Any())
            {
                TextEditor.EnterText(TextToEnter);
                UserInterfaceTests.Ide.WaitForIdeIdle();

                WorkbenchExtensions.SaveFile();
                UserInterfaceTests.Ide.WaitForIdeIdle();

                TextEditor.DeleteToLineStart();
                UserInterfaceTests.Ide.WaitForIdeIdle();

                WorkbenchExtensions.SaveFile();
                UserInterfaceTests.Ide.WaitForIdeIdle();
            }

            // Rebuild.
            WorkbenchExtensions.RebuildSolution();

            // Debug.
            WorkbenchExtensions.Debug();

            // Force focus of text editor. Otherwise the text editor is not
            // properly focused after the debug session finishes - the caret
            // does not blink and TextEditorCommands no longer work.
            // AutoTestClientSession.EnterText works without needing to
            // focus the workbench.
            WorkbenchExtensions.GrabDesktopFocus();

            // Close all documents.
            WorkbenchExtensions.CloseAllOpenFiles();
        }