From 2e93d43ccdacfac899b7cdf54d8df3d61c507ced Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Fri, 2 Dec 2016 18:06:29 -0800 Subject: [PATCH] Fixing up automation tests --- Submodules/agg-sharp | 2 +- Tests/MatterControl.AutomationTests/PartPreviewTests.cs | 6 +----- .../MatterControl/MatterControlUtilities.cs | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 5166299f1..933445b57 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 5166299f18f51cf49d507697f9dd6294db50246c +Subproject commit 933445b571f3cf042e44861de8a7b4f7023cd931 diff --git a/Tests/MatterControl.AutomationTests/PartPreviewTests.cs b/Tests/MatterControl.AutomationTests/PartPreviewTests.cs index 948deb142..3432373fd 100644 --- a/Tests/MatterControl.AutomationTests/PartPreviewTests.cs +++ b/Tests/MatterControl.AutomationTests/PartPreviewTests.cs @@ -71,7 +71,6 @@ namespace MatterHackers.MatterControl.Tests.Automation testRunner.Wait(1); testRunner.ClickByName("Row Item Calibration - Box"); MatterControlUtilities.LibraryEditSelectedItem(testRunner); - testRunner.Wait(1); //Get View3DWidget and count MeshGroups before Copy button is clicked GuiWidget partPreview = testRunner.GetWidgetByName("View3DWidget", out systemWindow, 3); @@ -128,7 +127,6 @@ namespace MatterHackers.MatterControl.Tests.Automation testRunner.Wait(1); testRunner.ClickByName("Row Item Calibration - Box"); MatterControlUtilities.LibraryEditSelectedItem(testRunner); - testRunner.Wait(1); //Get View3DWidget and count MeshGroups before Copy button is clicked GuiWidget partPreview = testRunner.GetWidgetByName("View3DWidget", out systemWindow, 3); @@ -180,7 +178,6 @@ namespace MatterHackers.MatterControl.Tests.Automation testRunner.Wait(1); testRunner.ClickByName("Row Item Calibration - Box"); MatterControlUtilities.LibraryEditSelectedItem(testRunner); - testRunner.Wait(1); //Get View3DWidget and count MeshGroups before Copy button is clicked GuiWidget partPreview = testRunner.GetWidgetByName("View3DWidget", out systemWindow, 3); @@ -250,8 +247,8 @@ namespace MatterHackers.MatterControl.Tests.Automation View3DWidget view3D = testRunner.GetWidgetByName("View3DWidget", out systemWindow, 3) as View3DWidget; // Click Edit button to make edit controls visible - testRunner.ClickByName("3D View Edit", 1); testRunner.WaitForName("3D View Copy", 3); + testRunner.Wait(1); // wait for window to finish opening Assert.AreEqual(1, view3D.MeshGroups.Count, "Should have 1 part before copy"); for (int i = 0; i <= 4; i++) @@ -296,7 +293,6 @@ namespace MatterHackers.MatterControl.Tests.Automation testRunner.Wait(1); testRunner.ClickByName("Row Item Calibration - Box"); MatterControlUtilities.LibraryEditSelectedItem(testRunner); - testRunner.Wait(1); //Click Edit button to make edit controls visible testRunner.ClickByName("3D View Edit"); diff --git a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs index 01d776602..ee19fa374 100644 --- a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs +++ b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs @@ -409,6 +409,7 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.ClickByName("LibraryActionMenu"); testRunner.ClickByName("Edit Menu Item", 1); + testRunner.Wait(1); // wait for the new window to open } public static void LibraryRenameSelectedItem(AutomationRunner testRunner)