Added a edit selected utility function.

This commit is contained in:
Lars Brubaker 2016-08-01 14:22:16 -07:00
parent 1340e875d3
commit 472b26ac34
3 changed files with 12 additions and 3 deletions

View file

@ -337,6 +337,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
testRunner.Wait(1);
testRunner.ClickByName(rowItem);
MatterControlUtilities.LibraryEditSelectedItem(testRunner);
testRunner.ClickByName("Library Edit Item Button");
//Make sure that Export Item Window exists after Export button is clicked

View file

@ -29,7 +29,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection");
testRunner.Wait(1);
testRunner.ClickByName("Row Item Calibration - Box");
testRunner.ClickByName("Row Item Calibration - Box Print Button");
testRunner.ClickByName("Row Item Calibration - Box View Button");
testRunner.Wait(1);
//Get View3DWidget and count MeshGroups before Copy button is clicked
@ -47,16 +47,18 @@ namespace MatterHackers.MatterControl.Tests.Automation
//Click Copy button and count MeshGroups
testRunner.ClickByName(copyButtonName);
System.Threading.Thread.Sleep(2000);
System.Threading.Thread.Sleep(500);
int partCountAfterCopy = view3D.MeshGroups.Count();
resultsHarness.AddTestResult(partCountAfterCopy == 2);
testRunner.Wait(1);
//Click Copy button a second time and count MeshGroups again
testRunner.ClickByName(copyButtonName);
System.Threading.Thread.Sleep(2000);
System.Threading.Thread.Sleep(500);
int partCountAfterSecondCopy = view3D.MeshGroups.Count();
resultsHarness.AddTestResult(partCountAfterSecondCopy == 3);
view3D.CloseOnIdle();
System.Threading.Thread.Sleep(500);
MatterControlUtilities.CloseMatterControl(testRunner);

View file

@ -337,6 +337,12 @@ namespace MatterHackers.MatterControl.Tests.Automation
testRunner.ClickByName("LibraryActionMenu");
testRunner.ClickByName("Add to Queue Menu Item", 1);
}
public static void LibraryEditSelectedItem(AutomationRunner testRunner)
{
testRunner.ClickByName("LibraryActionMenu");
testRunner.ClickByName("Edit Menu Item", 1);
}
}
/// <summary>