Example #1
0
        // Unstable
        public void DebugOutputWithLargeDataExpectedDebugOutputWindowUpdatedWithin5Seconds()
        {
            //Open LargeFileTesting workflow
            DockManagerUIMap.ClickOpenTabPage("Explorer");
            ExplorerUIMap.ClearExplorerSearchText();
            ExplorerUIMap.EnterExplorerSearchText("large");
            ExplorerUIMap.DoubleClickOpenProject("localhost", "WORKFLOWS", "TESTS", "LargeFileTesting");
            ExplorerUIMap.ClearExplorerSearchText();

            //Click debug
            SendKeys.SendWait("{F5}");
            Thread.Sleep(2000);
            SendKeys.SendWait("{F5}");

            //Assert the debug output window is responsive after 5 seconds
            // Get data split step
            DockManagerUIMap.ClickOpenTabPage("Output");
            DebugOutputUIMap.ClearSearch();
            Mouse.Click();
            Keyboard.SendKeys("Data Split");
            var getSteps = DebugOutputUIMap.GetOutputWindow();

            Assert.IsTrue(getSteps.Count == 1, "Debug output window took too long to respond");
            var dataSplitDebugOutput = getSteps[0];

            Assert.IsTrue(dataSplitDebugOutput.Exists, "Debug output window took too long to respond");

            //Assert recset node expands and the more data link within that recset node is visible
            var expander = dataSplitDebugOutput.GetChildren().Last(c => c.ControlType.Name == "Expander");

            Mouse.Move(expander, new Point(0, 0));
            Mouse.Move(new Point(Mouse.Location.X + 5, Mouse.Location.Y + 5));
            Mouse.Click();
            Mouse.Move(new Point(Mouse.Location.X - 25, Mouse.Location.Y - 25));
            Mouse.Click();
            for (var i = 0; i < 4; i++)
            {
                Mouse.MoveScrollWheel(-1);
            }
            // Get more data link
            var moreLink = expander.GetChildren()[1].GetChildren().Last(c => c.Name == "...");
            var moreLinkClickablePoint = new Point();

            Assert.IsTrue(moreLink.TryGetClickablePoint(out moreLinkClickablePoint), "Recordset did not expand properly");
            new TestBase().DoCleanup("LargeFileTesting");
        }