diff --git a/PartPreviewWindow/NewTabButton.cs b/PartPreviewWindow/NewTabButton.cs index c86d1ccf5..76d0183c7 100644 --- a/PartPreviewWindow/NewTabButton.cs +++ b/PartPreviewWindow/NewTabButton.cs @@ -59,42 +59,4 @@ namespace MatterHackers.MatterControl.PartPreviewWindow base.OnDraw(graphics2D); } } - - public class NewTabButton : GuiWidget - { - private SimpleTabs parentTabControl; - private ThemeConfig theme; - - public NewTabButton(ImageBuffer imageBuffer, SimpleTabs parentTabControl, ThemeConfig theme) - { - this.parentTabControl = parentTabControl; - this.HAnchor = HAnchor.Fit; - this.theme = theme; - - IconButton = new IconButton(imageBuffer, theme) - { - HAnchor = HAnchor.Left, - Height = theme.MicroButtonHeight, - Width = theme.MicroButtonHeight, - Margin = new BorderDouble(left: 10), - Name = "Create New", - }; - - this.AddChild(IconButton); - } - - public ITab LastTab { get; set; } - - public IconButton IconButton { get; } - - public override void OnDraw(Graphics2D graphics2D) - { - ChromeTab.DrawTabLowerLeft( - graphics2D, - this.LocalBounds, - (parentTabControl.ActiveTab == this.LastTab) ? theme.ActiveTabColor : theme.InactiveTabColor); - - base.OnDraw(graphics2D); - } - } } \ No newline at end of file diff --git a/PartPreviewWindow/PartPreviewContent.cs b/PartPreviewWindow/PartPreviewContent.cs index bce12511b..ba2e515b9 100644 --- a/PartPreviewWindow/PartPreviewContent.cs +++ b/PartPreviewWindow/PartPreviewContent.cs @@ -134,7 +134,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow new ChromeTab("Start".Localize(), tabControl, tabControl.NewTabPage(), theme, hasClose: false) { MinimumSize = new Vector2(0, theme.TabButtonHeight), - Name = "Initial Plus Tab", + Name = "Start Tab", Padding = new BorderDouble(15, 0) }); } diff --git a/PartPreviewWindow/PlusTab/ExplorerBar.cs b/PartPreviewWindow/PlusTab/ExplorerBar.cs index f1f3ba0a1..36626dd2b 100644 --- a/PartPreviewWindow/PlusTab/ExplorerBar.cs +++ b/PartPreviewWindow/PlusTab/ExplorerBar.cs @@ -236,7 +236,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab Margin = new BorderDouble(right: 5), Selectable = true, BackgroundColor = theme.MinimalShade, - Name = "Create Part" + Name = "Create Part Button" }; emptyPlateButton.Click += async (s, e) => { diff --git a/PartPreviewWindow/Tabs.cs b/PartPreviewWindow/Tabs.cs index 5ee5e91dc..6263d8882 100644 --- a/PartPreviewWindow/Tabs.cs +++ b/PartPreviewWindow/Tabs.cs @@ -200,7 +200,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { VAnchor = VAnchor.Bottom, MinimumSize = new Vector2(16, theme.TabButtonHeight), - ToolTipText = "Create New".Localize() }; this.TabBar.ActionArea.AddChild(tabTrailer); diff --git a/Tests/MatterControl.AutomationTests/PrintingTests.cs b/Tests/MatterControl.AutomationTests/PrintingTests.cs index ba4403aa6..d415facbd 100644 --- a/Tests/MatterControl.AutomationTests/PrintingTests.cs +++ b/Tests/MatterControl.AutomationTests/PrintingTests.cs @@ -84,15 +84,13 @@ namespace MatterHackers.MatterControl.Tests.Automation // Cancel in this case is on the Leveling Wizard, results in ReloadAll and for consistency across devices, requires we wait till it completes testRunner.WaitForReloadAll(() => testRunner.ClickByName("Cancel Button")); - // switch to controls so we can see the heights - testRunner.SwitchToControlsTab(); - - // run the leveling wizard (only 4 next as there is no heated bed testRunner.ClickByName("Finish Setup Button"); - testRunner.ClickByName("Next Button"); - testRunner.ClickByName("Next Button"); - testRunner.ClickByName("Next Button"); - testRunner.ClickByName("Next Button"); + int numNextButtons = 5; + for (int i = 0; i < numNextButtons; i++) + { + testRunner.ClickByName("Next Button"); + } + for (int i = 0; i < 3; i++) { testRunner.ClickByName("Move Z positive"); diff --git a/Tests/MatterControl.AutomationTests/SliceSettingsTests.cs b/Tests/MatterControl.AutomationTests/SliceSettingsTests.cs index 5358488d1..44a7cb249 100644 --- a/Tests/MatterControl.AutomationTests/SliceSettingsTests.cs +++ b/Tests/MatterControl.AutomationTests/SliceSettingsTests.cs @@ -473,6 +473,8 @@ namespace MatterHackers.MatterControl.Tests.Automation // Check if Guest printer names exists in dropdown testRunner.OpenPrintersDropdown(); testRunner.ClickByName("Airwolf 3D HD Menu Item"); + testRunner.Delay(1000); + testRunner.ClickByName("Open Empty Plate Button"); printer = ApplicationController.Instance.ActivePrinter; diff --git a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs index 4cae559fb..8817e2166 100644 --- a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs +++ b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs @@ -47,6 +47,7 @@ using MatterHackers.MatterControl.PartPreviewWindow; using MatterHackers.MatterControl.PrinterCommunication; using MatterHackers.MatterControl.PrinterCommunication.Io; using MatterHackers.MatterControl.PrinterControls.PrinterConnections; +using MatterHackers.MatterControl.SettingsManagement; using MatterHackers.MatterControl.SlicerConfiguration; using MatterHackers.PrinterEmulator; using Newtonsoft.Json; @@ -170,7 +171,7 @@ namespace MatterHackers.MatterControl.Tests.Automation public static void WaitForFirstDraw(this AutomationRunner testRunner) { SystemWindow systemWindow; - testRunner.GetWidgetByName("PlusTabPage", out systemWindow, 10); + testRunner.GetWidgetByName("Start Tab", out systemWindow, 10); // make sure we wait for MC to be up and running testRunner.WaitforDraw(systemWindow); } @@ -219,7 +220,7 @@ namespace MatterHackers.MatterControl.Tests.Automation public static Emulator LaunchAndConnectToPrinterEmulator(this AutomationRunner testRunner, string make = "Airwolf 3D", string model = "HD", bool runSlow = false) { SystemWindow systemWindow; - testRunner.GetWidgetByName("PlusTabPage", out systemWindow, 10); + testRunner.GetWidgetByName("Start Tab", out systemWindow, 10); // make sure we wait for MC to be up and running testRunner.WaitforDraw(systemWindow); @@ -317,14 +318,20 @@ namespace MatterHackers.MatterControl.Tests.Automation public static void AddAndSelectPrinter(this AutomationRunner testRunner, string make, string model) { + SystemWindow systemWindow; + testRunner.GetWidgetByName("Start Tab", out systemWindow, 10); + // make sure we wait for MC to be up and running + testRunner.WaitforDraw(systemWindow); + // If SelectMake is not visible and the ConnectionWizard is, click Skip if (!testRunner.NameExists("Select Make", 0.1)) { - // Go to the new tab screen if (!testRunner.NameExists("Create Printer", 0.1)) { - testRunner.ClickByName("Create New"); + // go to the start page + testRunner.ClickByName("Start Tab"); } + testRunner.ClickByName("Create Printer"); } @@ -352,7 +359,7 @@ namespace MatterHackers.MatterControl.Tests.Automation public static void OpenPrintersDropdown(this AutomationRunner testRunner) { - testRunner.ClickByName("Create New"); + testRunner.ClickByName("Start Tab"); testRunner.ClickByName("Printers... Menu"); } @@ -641,6 +648,8 @@ namespace MatterHackers.MatterControl.Tests.Automation overrideWidth == -1 ? width : overrideWidth, overrideHeight == -1 ? height : overrideHeight); + OemSettings.Instance.ShowShopButton = false; + await AutomationRunner.ShowWindowAndExecuteTests( rootSystemWindow, testMethod, @@ -777,7 +786,7 @@ namespace MatterHackers.MatterControl.Tests.Automation { testRunner.SwitchToSliceSettings(); - if (!testRunner.NameExists("Printer Tab")) + if (!testRunner.NameExists("Printer Tab", 0.1)) { testRunner.ClickByName("Printer Overflow Menu"); testRunner.ClickByName("Configure Printer Menu Item");