[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(); }
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(); }
void RunTypingTest() { var openFile = filesToOpen.LastOrDefault(); if (openFile == null) { return; } // Open files. WorkbenchExtensions.OpenFiles(filesToOpen); // Wait for the text area to be available. var area = TestService.Session.WaitForElement(IdeQuery.TextAreaForFile(openFile), 30000); Assert.That(area, Has.Length.EqualTo(1)); UserInterfaceTests.Ide.WaitForIdeIdle(); // Go to the start of the document. TextEditor.MoveCaretToDocumentStart(); UserInterfaceTests.Ide.WaitForIdeIdle(); if (!TextToEnter.Any()) { return; } // Make some changes to the active file and then remove the changes. TextEditor.EnterText(TextToEnter); UserInterfaceTests.Ide.WaitForIdeIdle(); WorkbenchExtensions.SaveFile(); UserInterfaceTests.Ide.WaitForIdeIdle(); TextEditor.DeleteToLineStart(); UserInterfaceTests.Ide.WaitForIdeIdle(); WorkbenchExtensions.SaveFile(); UserInterfaceTests.Ide.WaitForIdeIdle(); }