3 Commits b753e56284 ... d6c5b8c503

Author SHA1 Message Date
  Martin Edlund d6c5b8c503 Merge branch 'develop' into userstory13 5 years ago
  m-edlund aee756b8f8 Hotfix (#15) 5 years ago
  Martin Edlund 4f5a35360d Fixed Runtime Error 5 years ago

+ 12 - 11
SketchAssistant/SketchAssistantWPF/MVP_Presenter.cs

@@ -27,7 +27,7 @@ namespace SketchAssistantWPF
         /// </summary>
         Dictionary<int, Shape> rightPolyLines;
 
-        ImageDimension CanvasSizeLeft = new ImageDimension(0,0);
+        ImageDimension CanvasSizeLeft = new ImageDimension(0, 0);
 
         ImageDimension CanvasSizeRight = new ImageDimension(0, 0);
 
@@ -213,11 +213,11 @@ namespace SketchAssistantWPF
                     programModel.MouseDown();
                     break;
                 case MouseAction.Up:
-                    if(strokes.Count > 0)
+                    if (strokes.Count > 0)
                     {
                         StylusPointCollection sPoints = strokes.First().StylusPoints;
                         List<Point> points = new List<Point>();
-                        foreach(StylusPoint p in sPoints)
+                        foreach (StylusPoint p in sPoints)
                             points.Add(new Point(p.X, p.Y));
                         programModel.MouseUp(points);
                     }
@@ -263,7 +263,7 @@ namespace SketchAssistantWPF
         /// </summary>
         public void UpdateRightLines(List<Tuple<bool, InternalLine>> lines)
         {
-            foreach(Tuple<bool, InternalLine> tup in lines)
+            foreach (Tuple<bool, InternalLine> tup in lines)
             {
                 var status = tup.Item1;
                 var line = tup.Item2;
@@ -287,17 +287,17 @@ namespace SketchAssistantWPF
             }
             //Calculate similarity scores 
             UpdateSimilarityScore(Double.NaN); var templist = lines.Where(tup => tup.Item1).ToList();
-            if(LeftLines.Count > 0)
+            if (LeftLines.Count > 0)
             {
-                for(int i = 0; i < LeftLines.Count; i++)
+                for (int i = 0; i < LeftLines.Count; i++)
                 {
                     if (templist.Count == i) break;
                     UpdateSimilarityScore(GeometryCalculator.CalculateSimilarity(templist[i].Item2, LeftLines[i]));
                 }
             }
-            else if(templist.Count > 1)
+            else if (templist.Count > 1)
             {
-                UpdateSimilarityScore(GeometryCalculator.CalculateSimilarity(templist[templist.Count-2].Item2, templist[templist.Count-1].Item2));
+                UpdateSimilarityScore(GeometryCalculator.CalculateSimilarity(templist[templist.Count - 2].Item2, templist[templist.Count - 1].Item2));
             }
         }
 
@@ -460,11 +460,12 @@ namespace SketchAssistantWPF
         public void SetOverlayStatus(String name, bool visible, Point pos1, Point pos2)
         {
             Shape shape = new Ellipse();
-            switch (name.Substring(0,7))
+            switch (name.Substring(0, 7))
             {
                 case "dotLine":
                     if (((MainWindow)programView).OverlayDictionary.ContainsKey(name))
-                    { shape = ((MainWindow)programView).OverlayDictionary[name];
+                    {
+                        shape = ((MainWindow)programView).OverlayDictionary[name];
                         break;
                     }
                     goto default;
@@ -503,7 +504,7 @@ namespace SketchAssistantWPF
             MainWindow main = (MainWindow)programView;
             double xDif = (main.CanvasLeftEdge.ActualWidth + main.LeftCanvas.ActualWidth + main.CanvasSeperator.ActualWidth);
             double yDif = (main.ButtonToolbar.ActualHeight);
-            return new Point(p.X + xDif,p.Y + yDif);
+            return new Point(p.X + xDif, p.Y + yDif);
         }
 
         /// <summary>

+ 9 - 13
SketchAssistant/SketchAssistantWPF/MainWindow.xaml

@@ -1,11 +1,9 @@
-<Window x:Class="SketchAssistantWPF.MainWindow"
-        xmlns:local="clr-namespace:SketchAssistantWPF"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        mc:Ignorable="d"
-        Title="Sketch Assistant" Height="612" Width="914" SizeChanged="Window_SizeChanged">
+<Window x:Class="SketchAssistantWPF.MainWindow" 
+    xmlns:local="clr-namespace:SketchAssistantWPF" 
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Title="Sketch Assistant" Height="612" Width="914" SizeChanged="Window_SizeChanged">
     <Grid x:Name="RootGrid">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="5"/>
@@ -20,7 +18,7 @@
             <RowDefinition Height="auto"/>
         </Grid.RowDefinitions>
         <StackPanel x:Name="MenuToolbar" Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Background="LightGray">
-            <Menu Background="LightGray"   VerticalAlignment="Center" Padding="5,0,0,0">
+            <Menu Background="LightGray" VerticalAlignment="Center" Padding="5,0,0,0">
                 <MenuItem x:Name="LoadMenuButton" Header="Load">
                     <MenuItem x:Name="SVGMenuButton" Header="Import SVG File" Click="SVGMenuItem_Click"/>
                 </MenuItem>
@@ -176,13 +174,11 @@
         <Canvas Name="CanvasLeftEdge" Grid.Column="0" Grid.Row="1" Background="LightGray" />
         <Canvas x:Name="LeftCanvas" Background="SlateGray" Grid.Column="1" Grid.Row="1" Height="auto" Grid.ColumnSpan="1"/>
         <Canvas Name="CanvasSeperator" Grid.Column="2" Grid.Row="1" Background="LightGray" />
-        <InkCanvas x:Name="RightCanvas" Background="SlateGray" Grid.Column="3" Grid.Row="1" Height="auto"
-            PreviewMouseDown="RightCanvas_MouseDown" MouseUp="RightCanvas_MouseUp" MouseMove="RightCanvas_MouseMove" Grid.ColumnSpan="2" 
-                    StrokeCollected="RightCanvas_StrokeCollection" EditingMode="None" IsStylusCapturedChanged="RightCanvas_IsStylusCapturedChanged"/>
+        <InkCanvas x:Name="RightCanvas" Background="SlateGray" Grid.Column="3" Grid.Row="1" Height="auto" PreviewMouseDown="RightCanvas_MouseDown" MouseUp="RightCanvas_MouseUp" MouseMove="RightCanvas_MouseMove" Grid.ColumnSpan="2" StrokeCollected="RightCanvas_StrokeCollection" EditingMode="None" IsStylusCapturedChanged="RightCanvas_IsStylusCapturedChanged"/>
         <Canvas Name="CanvasRightEdge" Grid.Column="4" Grid.Row="1" Background="LightGray" />
 
         <DockPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="8">
-            <StatusBar DockPanel.Dock="Bottom" Name="StatusBar"  Background="LightGray">
+            <StatusBar DockPanel.Dock="Bottom" Name="StatusBar" Background="LightGray">
                 <TextBox Name="LoadStatusBox" Text="nothing loaded" Background="LightGray"/>
                 <Separator/>
                 <TextBox Name="LastActionBox" Text="none" Background="LightGray"/>

+ 20 - 28
SketchAssistant/SketchAssistantWPF/MainWindow.xaml.cs

@@ -40,7 +40,7 @@ namespace SketchAssistantWPF
                     InDebugMode = true;
                 }
             }
-            if(!InDebugMode)
+            if (!InDebugMode)
             {
                 DebugMode.Visibility = Visibility.Collapsed;
             }
@@ -138,7 +138,7 @@ namespace SketchAssistantWPF
         /// </summary>
         private void UndoButton_Click(object sender, RoutedEventArgs e)
         {
-            if(!IsMousePressed()) ProgramPresenter.Undo();
+            if (!IsMousePressed()) ProgramPresenter.Undo();
         }
 
         /// <summary>
@@ -172,7 +172,7 @@ namespace SketchAssistantWPF
         /// </summary>
         private void RightCanvas_MouseUp(object sender, MouseButtonEventArgs e)
         {
-            if(strokeCollection.Count == 0)
+            if (strokeCollection.Count == 0)
             {
                 ProgramPresenter.MouseEvent(MVP_Presenter.MouseAction.Up_Invalid, strokeCollection);
             }
@@ -195,7 +195,7 @@ namespace SketchAssistantWPF
             {
                 if (strokeCollection.Count == 0)
                 {
-                    ProgramPresenter.MouseEvent(MVP_Presenter.MouseAction.Up_Invalid,strokeCollection);
+                    ProgramPresenter.MouseEvent(MVP_Presenter.MouseAction.Up_Invalid, strokeCollection);
                 }
                 else
                 {
@@ -239,7 +239,7 @@ namespace SketchAssistantWPF
         /// </summary>
         private void SVGMenuItem_Click(object sender, RoutedEventArgs e)
         {
-            if(ProgramPresenter.SVGToolStripMenuItemClick())
+            if (ProgramPresenter.SVGToolStripMenuItemClick())
                 RightCanvas.EditingMode = InkCanvasEditingMode.Ink;
         }
 
@@ -262,8 +262,10 @@ namespace SketchAssistantWPF
         /// <returns>Whether or not the mouse is pressed.</returns>
         public bool IsMousePressed()
         {
-            if (!debugRunning) {
-                return (Mouse.LeftButton.Equals(MouseButtonState.Pressed) || Mouse.RightButton.Equals(MouseButtonState.Pressed)); }
+            if (!debugRunning)
+            {
+                return (Mouse.LeftButton.Equals(MouseButtonState.Pressed) || Mouse.RightButton.Equals(MouseButtonState.Pressed));
+            }
             else return true;
         }
 
@@ -336,7 +338,7 @@ namespace SketchAssistantWPF
             newPoint.Height = 3; newPoint.Width = 3;
             newPoint.Fill = Brushes.Black;
             RightCanvas.Children.Add(newPoint);
-            newPoint.Margin = new Thickness(line.point.X - 1.5, line.point.Y - 1.5, 0,0);
+            newPoint.Margin = new Thickness(line.point.X - 1.5, line.point.Y - 1.5, 0, 0);
         }
 
         /// <summary>
@@ -509,24 +511,12 @@ namespace SketchAssistantWPF
             switch (canvasName)
             {
                 case ("LeftCanvas"):
-                    if (active)
-                    {
-                        LeftCanvas.Background = Brushes.White;
-                    }
-                    else
-                    {
-                        LeftCanvas.Background = Brushes.SlateGray;
-                    }
+                    if (active) LeftCanvas.Background = Brushes.White;
+                    else LeftCanvas.Background = Brushes.SlateGray;
                     break;
                 case ("RightCanvas"):
-                    if (active)
-                    {
-                        RightCanvas.Background = Brushes.White;
-                    }
-                    else
-                    {
-                        RightCanvas.Background = Brushes.SlateGray;
-                    }
+                    if (active) RightCanvas.Background = Brushes.White;
+                    else RightCanvas.Background = Brushes.SlateGray;
                     break;
                 default:
                     throw new InvalidOperationException("Unknown canvas name, Check that the canvas passed is either LeftCanvas or RightCanvas");
@@ -552,17 +542,17 @@ namespace SketchAssistantWPF
             OverlayDictionary.Add("startpoint", StartPointOverlay);
             //Endpoint of a line to be redrawn
             Ellipse EndPointOverlay = new Ellipse();
-            EndPointOverlay.Height = markerRadius * 2; StartPointOverlay.Width = markerRadius * 2;
+            EndPointOverlay.Height = markerRadius * 2; EndPointOverlay.Width = markerRadius * 2;
             EndPointOverlay.Fill = Brushes.Green;
             EndPointOverlay.Effect = effect;
-            OverlayDictionary.Add("endpoint", StartPointOverlay);
+            OverlayDictionary.Add("endpoint", EndPointOverlay);
             //Pointer of the optitrack system
             Ellipse OptitrackMarker = new Ellipse(); OptitrackMarker.Height = 5; OptitrackMarker.Width = 5;
             OptitrackMarker.Fill = Brushes.LightGray;
             OptitrackMarker.Effect = effect;
             OverlayDictionary.Add("optipoint", OptitrackMarker);
             //10 Dotted Lines for debugging (if more are needed simply extend the for-loop
-            for(int x = 0; x < 10; x++)
+            for (int x = 0; x < 10; x++)
             {
                 Line dotLine = new Line();
                 dotLine.Stroke = Brushes.Red;
@@ -572,7 +562,7 @@ namespace SketchAssistantWPF
             }
 
             //Common features of all overlay items
-            foreach (KeyValuePair<String, Shape> s  in OverlayDictionary)
+            foreach (KeyValuePair<String, Shape> s in OverlayDictionary)
             {
                 OverlayCanvas.Children.Add(s.Value);
                 s.Value.Opacity = 0.00001;
@@ -619,6 +609,8 @@ namespace SketchAssistantWPF
             Debug(4);
         }
 
+
+
         /// <summary>
         /// A function which simulates canvas input for debugging.
         /// </summary>

+ 174 - 174
SketchAssistant/WhiteTests/UITest.cs

@@ -102,11 +102,11 @@ namespace WhiteTests
         {
             Window mainWindow = setupapp();
             InputSimulator inputSimulator = new InputSimulator();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             string[] files = Directory.GetFiles(getSketchAssistantDirectory() + @"\whitelisted", "*.svg", SearchOption.AllDirectories);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("LoadMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("SVGMenuButton")).Click();
             Thread.Sleep(1000);
             inputSimulator.Keyboard.TextEntry(getSketchAssistantDirectory() + @"whitelisted\" + filename + ".svg");
@@ -122,21 +122,21 @@ namespace WhiteTests
         public void DrawLineOnCanvasTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             InputSimulator inputSimulator = new InputSimulator();
             MouseSimulator mouseSimulator = new MouseSimulator(inputSimulator);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(100,100);
             inputSimulator.Mouse.LeftButtonDown();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(100, 100);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -146,23 +146,23 @@ namespace WhiteTests
         public void UndoLineOnCanvasTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             InputSimulator inputSimulator = new InputSimulator();
             MouseSimulator mouseSimulator = new MouseSimulator(inputSimulator);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(0, 200);
             inputSimulator.Mouse.LeftButtonDown();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(500, 300);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
             Thread.Sleep(100);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -174,31 +174,31 @@ namespace WhiteTests
         public void InvalidLineTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             InputSimulator inputSimulator = new InputSimulator();
             MouseSimulator mouseSimulator = new MouseSimulator(inputSimulator);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DrawButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonDown();
             inputSimulator.Mouse.MoveMouseBy(0, 200);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(500, 300);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.MoveMouseBy(-1000, 0);
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonDown();
             inputSimulator.Mouse.MoveMouseBy(1000, 0);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -208,7 +208,7 @@ namespace WhiteTests
         public void PointsOnCanvasSimilarityTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             InputSimulator inputSimulator = new InputSimulator();
             MouseSimulator mouseSimulator = new MouseSimulator(inputSimulator);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -216,24 +216,24 @@ namespace WhiteTests
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
             inputSimulator.Mouse.MoveMouseBy(0, 200);
             inputSimulator.Mouse.LeftButtonDown();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Assert.AreEqual("-", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LineSimilarityBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonDown();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             inputSimulator.Mouse.LeftButtonUp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Assert.AreEqual("1", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LineSimilarityBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Assert.AreEqual("-", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LineSimilarityBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Assert.AreEqual("1", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LineSimilarityBox")).Text.ToString());
             mainWindow.Close();
@@ -244,10 +244,10 @@ namespace WhiteTests
         public void CreateCanvasTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -257,15 +257,15 @@ namespace WhiteTests
         public void DrawLineTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -277,27 +277,27 @@ namespace WhiteTests
         public void DeleteLineTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DrawButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DeleteButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -309,21 +309,21 @@ namespace WhiteTests
         public void UndoTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -333,25 +333,25 @@ namespace WhiteTests
         public void RedoTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Close();
         }
@@ -361,27 +361,27 @@ namespace WhiteTests
         public void DrawSeveralLinesTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(30000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -390,35 +390,35 @@ namespace WhiteTests
         public void DeleteSeveralLinesTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(24000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DeleteButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugThree")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             Thread.Sleep(10000);
             Assert.AreEqual("Last Action: Line number 0 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
@@ -430,35 +430,35 @@ namespace WhiteTests
         public void UndoSeveralLinesTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(30000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -467,43 +467,43 @@ namespace WhiteTests
         public void RedoSeveralLinesTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(24000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -512,57 +512,57 @@ namespace WhiteTests
         public void UndoAndRedoTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugOne")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugTwo")).Click();
             Thread.Sleep(24000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("RedoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DeleteButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugThree")).Click();
             Thread.Sleep(7000);
             Assert.AreEqual("Last Action: Line number 0 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 1 was deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -571,31 +571,31 @@ namespace WhiteTests
         public void UndoAndDrawTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("UndoButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -604,37 +604,37 @@ namespace WhiteTests
         public void DeleteSeveralLinesAtOnceTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Line number 1 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("DeleteButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(2000);
             Assert.AreEqual("Last Action: Several Lines were deleted.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -643,19 +643,19 @@ namespace WhiteTests
         public void PointDrawTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugFour")).Click();
             Thread.Sleep(4000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
 
@@ -664,43 +664,43 @@ namespace WhiteTests
         public void NewCanvasAfterDrawTest()
         {
             Window mainWindow = setupapp();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("none", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("EditMenuButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugMode")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("DebugThree")).Click();
             Thread.Sleep(4000);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             // Click on No button in warning
             Window messageBox0 = mainWindow.MessageBox("Warning");
             messageBox0.Get<Button>(SearchCriteria.ByText("No")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             // close warning
             Window messageBox1 = mainWindow.MessageBox("Warning");
             messageBox1.Close();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: Line number 0 was drawn.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Get<Button>(SearchCriteria.ByAutomationId("CanvasButton")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             // click yes button on warning
             Window messageBox2 = mainWindow.MessageBox("Warning");
             messageBox2.Get<Button>(SearchCriteria.ByText("Yes")).Click();
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             Assert.AreEqual("Last Action: A new canvas was created.", mainWindow.Get<TextBox>(SearchCriteria.ByAutomationId("LastActionBox")).Text.ToString());
-            Thread.Sleep(20);
+            Thread.Sleep(30);
             mainWindow.Close();
         }
     }