diff --git a/PartPreviewWindow/PlusTab/ExplorerBar.cs b/PartPreviewWindow/PlusTab/ExplorerBar.cs index 5c9ce0595..8b9c06b2f 100644 --- a/PartPreviewWindow/PlusTab/ExplorerBar.cs +++ b/PartPreviewWindow/PlusTab/ExplorerBar.cs @@ -226,6 +226,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab var createPart = new TextButton("Create Part".Localize(), theme) { + Name = "Create Part Button", Margin = theme.ButtonSpacing, BackgroundColor = theme.MinimalShade }; diff --git a/Tests/MatterControl.AutomationTests/PartPreviewTests.cs b/Tests/MatterControl.AutomationTests/PartPreviewTests.cs index 6a187eeba..9b8a57505 100644 --- a/Tests/MatterControl.AutomationTests/PartPreviewTests.cs +++ b/Tests/MatterControl.AutomationTests/PartPreviewTests.cs @@ -26,6 +26,8 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.CloseSignInAndPrinterSelect(); + testRunner.OpenEmptyPartTab(); + testRunner.AddItemToBedplate(); // Get View3DWidget @@ -59,6 +61,8 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.CloseSignInAndPrinterSelect(); + testRunner.OpenEmptyPartTab(); + testRunner.AddItemToBedplate(); // Get View3DWidget and count Scene.Children before Copy button is clicked @@ -106,6 +110,8 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.CloseSignInAndPrinterSelect(); + testRunner.OpenEmptyPartTab(); + testRunner.AddItemToBedplate(); var view3D = testRunner.GetWidgetByName("View3DWidget", out _) as View3DWidget; @@ -141,6 +147,8 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.CloseSignInAndPrinterSelect(); + testRunner.OpenEmptyPartTab(); + testRunner.AddItemToBedplate(); var view3D = testRunner.GetWidgetByName("View3DWidget", out _) as View3DWidget; diff --git a/Tests/MatterControl.AutomationTests/PrintQueueTests.cs b/Tests/MatterControl.AutomationTests/PrintQueueTests.cs index 3f9f51bb2..81497f854 100644 --- a/Tests/MatterControl.AutomationTests/PrintQueueTests.cs +++ b/Tests/MatterControl.AutomationTests/PrintQueueTests.cs @@ -167,6 +167,8 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.CloseSignInAndPrinterSelect(); + testRunner.OpenEmptyPartTab(); + testRunner.AddTestAssetsToLibrary("Batman.stl"); var view3D = testRunner.GetWidgetByName("View3DWidget", out _) as View3DWidget; diff --git a/Tests/MatterControl.AutomationTests/PrintingTests.cs b/Tests/MatterControl.AutomationTests/PrintingTests.cs index 7fb4ec0da..ba4403aa6 100644 --- a/Tests/MatterControl.AutomationTests/PrintingTests.cs +++ b/Tests/MatterControl.AutomationTests/PrintingTests.cs @@ -292,7 +292,7 @@ namespace MatterHackers.MatterControl.Tests.Automation // Dismiss pause dialog testRunner.WaitForName("No Button", 90); // the no button is 'Resume' - + // validate the current layer Assert.AreEqual(1, ApplicationController.Instance.ActivePrinter.Connection.CurrentlyPrintingLayer); testRunner.ClickByName("No Button"); @@ -301,7 +301,7 @@ namespace MatterHackers.MatterControl.Tests.Automation // close the pause dialog pop-up do not resume ClickDialogButton(testRunner, "Yes Button", 3); - // Disconnect + // Disconnect testRunner.ClickByName("Disconnect from printer button"); // Reconnect @@ -472,7 +472,7 @@ namespace MatterHackers.MatterControl.Tests.Automation scrollable.Width = width - 1; scrollable.Width = width; - // Tuning values should match + // Tuning values should match ConfirmExpectedSpeeds(testRunner, initialExtrusionRate, initialFeedRate); testRunner.Delay(); @@ -578,7 +578,7 @@ namespace MatterHackers.MatterControl.Tests.Automation testRunner.AddItemToBedplate(); testRunner.StartPrint(); - + int fanChangedCount = 0; emulator.FanSpeedChanged += (s, e) => { @@ -589,7 +589,7 @@ namespace MatterHackers.MatterControl.Tests.Automation emulator.WaitForLayer(printer.Settings, 2); emulator.RunSlow = true; - + // Click close but cancel testRunner.CloseMatterControl(); testRunner.ClickByName("No Button"); diff --git a/Tests/MatterControl.AutomationTests/SqLiteLibraryProvider.cs b/Tests/MatterControl.AutomationTests/SqLiteLibraryProvider.cs index 1b1167bc0..1e64e11ac 100644 --- a/Tests/MatterControl.AutomationTests/SqLiteLibraryProvider.cs +++ b/Tests/MatterControl.AutomationTests/SqLiteLibraryProvider.cs @@ -15,6 +15,8 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.CloseSignInAndPrinterSelect(); + testRunner.OpenEmptyPartTab(); + testRunner.AddItemToBedplate(); var view3D = testRunner.GetWidgetByName("View3DWidget", out _) as View3DWidget; diff --git a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs index 223dcf91e..1e4cfff80 100644 --- a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs +++ b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs @@ -179,7 +179,7 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.WaitForFirstDraw(); - // If there is a auth pannel make sure we try and close it + // If there is an auth panel make sure we try and close it // Non-MCCentral builds won't have the plugin. Reduce the wait time for these cases if (testRunner.WaitForName("Connection Wizard Skip Sign In Button", 1)) { @@ -190,14 +190,11 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.ClickByName("Cancel Wizard Button"); } + } - if (closeInitialPlusTab) - { - var plusTabRegion = testRunner.GetRegionByName("Initial Plus Tab"); - testRunner.ClickByName("Close Tab Button", plusTabRegion); - - testRunner.WaitForWidgetDisappear("Initial Plus Tab", 2); - } + public static void OpenEmptyPartTab(this AutomationRunner testRunner, bool closeInitialPlusTab = true) + { + testRunner.ClickByName("Create Part Button"); } public static void ChangeToQueueContainer(this AutomationRunner testRunner)