Add NavigateToLibraryHome test helper

This commit is contained in:
John Lewin 2017-06-18 10:02:34 -07:00
parent 3d03130a2f
commit 82b07f3237
4 changed files with 15 additions and 4 deletions

View file

@ -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

View file

@ -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();

View file

@ -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)

View file

@ -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");