Account for new Library container b4 calibrate/library/queue tests

- Issue MatterHackers/MCCentral#3300
Many tests failing due to moved library containers
This commit is contained in:
John Lewin 2018-05-04 12:58:38 -07:00
parent cf6cc6a9b6
commit e62e53f3b0
3 changed files with 20 additions and 5 deletions

View file

@ -170,8 +170,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
public static void WaitForFirstDraw(this AutomationRunner testRunner)
{
SystemWindow systemWindow;
testRunner.GetWidgetByName("Start Tab", out systemWindow, 10);
testRunner.GetWidgetByName("Start Tab", out SystemWindow systemWindow, 10);
// make sure we wait for MC to be up and running
testRunner.WaitforDraw(systemWindow);
}
@ -447,7 +446,23 @@ namespace MatterHackers.MatterControl.Tests.Automation
public static void NavigateToFolder(this AutomationRunner testRunner, string libraryRowItemName)
{
EnsureFoldersVisible(testRunner);
testRunner.EnsureFoldersVisible();
switch (libraryRowItemName)
{
case "Calibration Parts Row Item Collection":
case "Cloud Library Row Item Collection":
case "Print Queue Row Item Collection":
case "Local Library Row Item Collection":
// If visible, navigate into Libraries container before opening target
if(testRunner.NameExists("Library Row Item Collection"))
{
testRunner.DoubleClickByName("Library Row Item Collection");
}
break;
}
testRunner.DoubleClickByName(libraryRowItemName);
}