/// <summary> /// https://nodejstools.codeplex.com/workitem/194 /// /// Verifies that we deliver the right set of track events to the source /// when we move a folder with a file in it. /// /// The right set of events are based upon matching the same events the C# /// project system delivers. Those can be using the TestSccPackage with a /// C# project. Once enables in Tools->Options->Source Control you can get /// the list of events from Tools->Show Scc Track Document Events. /// </summary> // Currently Fails: https://pytools.codeplex.com/workitem/2609 public void MoveFolderWithItem(VisualStudioApp app, ProjectGenerator pg) { // close any projects before switching source control... app.Dte.Solution.Close(); app.SelectSourceControlProvider("Test Source Provider"); ExpectSourceControl(); foreach (var projectType in pg.ProjectTypes) { var testDef = new ProjectDefinition("SourceControl", projectType, ProjectGenerator.PropertyGroup( ProjectGenerator.Property("SccProjectName", "HelloWorld"), ProjectGenerator.Property("SccLocalPath", "LocalPath"), ProjectGenerator.Property("SccAuxPath", "AuxPath"), ProjectGenerator.Property("SccProvider", "TestProvider") ), ProjectGenerator.ItemGroup( ProjectGenerator.Folder("Fob"), ProjectGenerator.Folder("Fob\\Oar"), ProjectGenerator.Compile("Program"), ProjectGenerator.Compile("Fob\\Oar\\Quox") ) ); using (var solution = testDef.Generate()) { TestSccProvider.DocumentEvents.Clear(); var project = app.OpenProject(solution.Filename, onDialog: OnNoSccDialog); var window = app.SolutionExplorerTreeView; var folder = window.WaitForItem("Solution 'SourceControl' (1 project)", "SourceControl", "Fob", "Oar"); var point = folder.GetClickablePoint(); Mouse.MoveTo(point); Mouse.Down(MouseButton.Left); var destFolder = window.WaitForItem("Solution 'SourceControl' (1 project)", "SourceControl"); Mouse.MoveTo(destFolder.GetClickablePoint()); Mouse.Up(MouseButton.Left); app.MaybeCheckMessageBox(MessageBoxButton.Ok, "One or more files will be"); window.AssertFileExists(Path.GetDirectoryName(solution.Filename), "Solution 'SourceControl' (1 project)", "SourceControl", "Oar", "Quox" + projectType.CodeExtension); var projectDir = Path.GetDirectoryName(project.FullName); AssertDocumentEvents(projectDir, OnQueryRenameFiles(projectType.Code("Fob\\Oar\\Quox"), projectType.Code("Oar\\Quox"), VSQUERYRENAMEFILEFLAGS_NoFlags), OnQueryRenameFiles("Fob\\Oar\\", "Oar", VSQUERYRENAMEFILEFLAGS_Directory), OnAfterRenameFiles(projectType.Code("Fob\\Oar\\Quox"), projectType.Code("Oar\\Quox"), VSRENAMEFILEFLAGS_NoFlags), OnAfterRenameFiles("Fob\\Oar\\", "Oar", VSRENAMEFILEFLAGS_Directory) ); } } }
public void MoveFileFromFolderToLinkedFolderMouse(VisualStudioApp app, ProjectGenerator pg) { MoveFileFromFolderToLinkedFolder(app, pg, MoveByMouse); app.MaybeCheckMessageBox(TestUtilities.MessageBoxButton.Ok, "One or more files will be"); }