示例#1
0
文件: UITests.cs 项目: rsumner33/PTVS
        public void DragLeaveFolderTest()
        {
            DebugProject.OpenProject(@"Python.VS.TestData\DragDropTest.sln");

            var app = new VisualStudioApp(VsIdeTestHostContext.Dte);

            app.OpenSolutionExplorer();
            var window = app.SolutionExplorerTreeView;

            var folder  = window.FindItem("Solution 'DragDropTest' (1 project)", "DragDropTest", "TestFolder2", "SubFolder");
            var project = window.FindItem("Solution 'DragDropTest' (1 project)", "DragDropTest");

            // click on SubItem.py
            var point = folder.GetClickablePoint();

            Mouse.MoveTo(point);
            Mouse.Down(MouseButton.Left);

            // move to project and hover
            var projectPoint = project.GetClickablePoint();

            Mouse.MoveTo(projectPoint);
            System.Threading.Thread.Sleep(500);

            // move back and release
            Mouse.MoveTo(point);
            Mouse.Up(MouseButton.Left);

            Assert.AreNotEqual(null, window.FindItem("Solution 'DragDropTest' (1 project)", "DragDropTest", "TestFolder2", "SubFolder"));
        }
示例#2
0
文件: UITests.cs 项目: rsumner33/PTVS
        public void DragDropFileToContainingFolderTest()
        {
            DebugProject.OpenProject(@"Python.VS.TestData\DragDropTest.sln");

            var app = new VisualStudioApp(VsIdeTestHostContext.Dte);

            app.OpenSolutionExplorer();
            var window = app.SolutionExplorerTreeView;

            var folder = window.FindItem("Solution 'DragDropTest' (1 project)", "DragDropTest", "TestFolder", "SubItem2.py");
            var point  = folder.GetClickablePoint();

            Mouse.MoveTo(point);
            Mouse.Down(MouseButton.Left);

            var project = window.FindItem("Solution 'DragDropTest' (1 project)", "DragDropTest", "TestFolder");

            point = project.GetClickablePoint();
            Mouse.MoveTo(point);
            Mouse.Up(MouseButton.Left);

            Assert.AreNotEqual(null, window.WaitForItem("Solution 'DragDropTest' (1 project)", "DragDropTest", "TestFolder", "SubItem2.py"));
        }