diff --git a/Tests/MatterControl.AutomationTests/LocalLibraryTests.cs b/Tests/MatterControl.AutomationTests/LocalLibraryTests.cs index e78861f8d..6f657d7c7 100644 --- a/Tests/MatterControl.AutomationTests/LocalLibraryTests.cs +++ b/Tests/MatterControl.AutomationTests/LocalLibraryTests.cs @@ -213,7 +213,7 @@ namespace MatterHackers.MatterControl.Tests.Automation Assert.AreEqual(expectedCount, QueueData.Instance.ItemCount, "Queue item count should increase by one after add"); // Navigate to the PrintQueueContainer - testRunner.ClickByName("Bread Crumb Button Home"); + testRunner.NavigateToLibraryHome(); testRunner.NavigateToFolder("Print Queue Row Item Collection"); // Make sure that the item exists in the PrintQueueContainer @@ -251,7 +251,7 @@ namespace MatterHackers.MatterControl.Tests.Automation Assert.AreEqual(expectedCount, QueueData.Instance.ItemCount); // Navigate to the PrintQueueContainer - testRunner.ClickByName("Bread Crumb Button Home"); + testRunner.NavigateToLibraryHome(); testRunner.NavigateToFolder("Print Queue Row Item Collection"); // Make sure that the items exist in the PrintQueueContainer diff --git a/Tests/MatterControl.AutomationTests/PartPreviewTests.cs b/Tests/MatterControl.AutomationTests/PartPreviewTests.cs index a14765928..2fd92f987 100644 --- a/Tests/MatterControl.AutomationTests/PartPreviewTests.cs +++ b/Tests/MatterControl.AutomationTests/PartPreviewTests.cs @@ -242,7 +242,7 @@ namespace MatterHackers.MatterControl.Tests.Automation testRunner.SaveBedplateToFolder("Test PartA", "Print Queue Row Item Collection"); // Click Home -> Local Library - testRunner.ClickByName("Bread Crumb Button Home"); + testRunner.NavigateToLibraryHome(); testRunner.NavigateToFolder("Print Queue Row Item Collection"); view3D.CloseOnIdle(); diff --git a/Tests/MatterControl.AutomationTests/SqLiteLibraryProvider.cs b/Tests/MatterControl.AutomationTests/SqLiteLibraryProvider.cs index 5fdeae79a..dd9a62a0c 100644 --- a/Tests/MatterControl.AutomationTests/SqLiteLibraryProvider.cs +++ b/Tests/MatterControl.AutomationTests/SqLiteLibraryProvider.cs @@ -34,7 +34,7 @@ namespace MatterHackers.MatterControl.Tests.Automation testRunner.SaveBedplateToFolder("0Test Part", "Local Library Row Item Collection"); // Click Home -> Local Library - testRunner.ClickByName("Bread Crumb Button Home"); + testRunner.NavigateToLibraryHome(); testRunner.NavigateToFolder("Local Library Row Item Collection"); // ensure that it is now in the library folder (that the folder updated) diff --git a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs index d738061fe..b18d14ba0 100644 --- a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs +++ b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs @@ -393,6 +393,17 @@ namespace MatterHackers.MatterControl.Tests.Automation testRunner.Delay(.5); } + public static void NavigateToLibraryHome(this AutomationRunner testRunner) + { + while(!testRunner.NameExists("Local Library Row Item Collection", .5)) + { + testRunner.ClickByName("Library Up Button"); + testRunner.Delay(1); + } + + testRunner.Delay(.5); + } + public static void AddDefaultFileToBedplate(this AutomationRunner testRunner, string containerName = "Calibration Parts Row Item Collection", string partName = "Row Item Calibration - Box.stl") { testRunner.ClickByName("Library Tab");