示例#1
0
        public void DragDropFileToContainingFolderTest(PythonVisualStudioApp app)
        {
            var project = app.OpenProject(@"TestData\DragDropTest.sln");
            var window  = app.OpenSolutionExplorer();

            Mouse.MoveTo(window.FindChildOfProject(project, "TestFolder", "SubItem2.py").Element.GetClickablePoint());
            Mouse.Down(MouseButton.Left);

            Mouse.MoveTo(window.FindChildOfProject(project, "TestFolder").Element.GetClickablePoint());
            Mouse.Up(MouseButton.Left);

            using (var dlg = AutomationDialog.WaitForDialog(app)) { }
            window.WaitForChildOfProject(project, "TestFolder", "SubItem2.py");
        }
示例#2
0
        public void DragDropTest(PythonVisualStudioApp app)
        {
            var project = app.OpenProject(@"TestData\DragDropTest.sln");

            var window = app.OpenSolutionExplorer();

            var folder = window.FindChildOfProject(project, "TestFolder", "SubItem.py");
            var point  = folder.Element.GetClickablePoint();

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

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

            window.WaitForChildOfProject(project, "SubItem.py");
        }
示例#3
0
        public void DjangoIncludeInProject(PythonVisualStudioApp app)
        {
            app.OpenProject(@"TestData\DjangoApplication.sln");

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

            app.Dte.ExecuteCommand("Project.ShowAllFiles"); // start showing all

            var folderNode = window.WaitForItem("Solution 'DjangoApplication' (1 of 1 project)", "DjangoApplication", "Folder");

            Mouse.MoveTo(folderNode.GetClickablePoint());
            Mouse.Click(MouseButton.Right);

            Keyboard.Type("j");                             // Exclude from Project
            app.Dte.ExecuteCommand("Project.ShowAllFiles"); // stop showing all

            Assert.IsNull(window.WaitForItemRemoved("Solution 'DjangoApplication' (1 of 1 project)", "DjangoApplication", "notinproject.py"));
            Assert.IsNotNull(window.WaitForItem("Solution 'DjangoApplication' (1 of 1 project)", "DjangoApplication", "Folder", "test.py"));
        }
示例#4
0
        public void DragLeaveFolderTest(PythonVisualStudioApp app)
        {
            var project = app.OpenProject(@"TestData\DragDropTest.sln");
            var window  = app.OpenSolutionExplorer();

            // click on SubItem.py
            var point = window.FindChildOfProject(project, "TestFolder2", "SubFolder").Element.GetClickablePoint();

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

            // move to project and hover
            Mouse.MoveTo(window.FindChildOfProject(project).Element.GetClickablePoint());
            System.Threading.Thread.Sleep(500);

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

            window.WaitForChildOfProject(project, "TestFolder2", "SubFolder");
        }
示例#5
0
        public void DjangoMultiSelectContextMenu(PythonVisualStudioApp app)
        {
            app.OpenProject(@"TestData\DjangoApplication.sln");

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

            var manageNode = window.FindItem("Solution 'DjangoApplication' (1 of 1 project)", "DjangoApplication", "manage.py");

            Mouse.MoveTo(manageNode.GetClickablePoint());
            Mouse.Click(MouseButton.Left);

            Keyboard.Press(Key.LeftShift);
            Keyboard.PressAndRelease(Key.Down);
            Keyboard.Release(Key.LeftShift);

            Mouse.MoveTo(manageNode.GetClickablePoint());
            Mouse.Click(MouseButton.Right);

            Keyboard.Type("j"); // Exclude from Project
            Assert.IsNull(window.WaitForItemRemoved("Solution 'DjangoApplication' (1 of 1 project)", "DjangoApplication", "manage.py"));
        }