Пример #1
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"));
        }
Пример #2
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"));
        }