Use single string for control names
This commit is contained in:
parent
499e501356
commit
362b269dff
5 changed files with 47 additions and 49 deletions
|
|
@ -51,7 +51,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.NavigateToFolder("Local Library Row Item Collection");
|
||||
|
||||
SystemWindow systemWindow;
|
||||
string itemName = "Row Item " + "Calibration - Box";
|
||||
string itemName = "Row Item Calibration - Box";
|
||||
|
||||
GuiWidget rowItem = testRunner.GetWidgetByName(itemName, out systemWindow, 3);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
|
||||
string itemName = "Row Item " + "Fennec Fox";
|
||||
string itemName = "Row Item Fennec Fox";
|
||||
|
||||
//Navigate to Local Library
|
||||
testRunner.ClickByName("Library Tab");
|
||||
|
|
@ -53,8 +53,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
//Names of Items to be added
|
||||
string firstItemName = "Row Item " + "Fennec Fox";
|
||||
string secondItemName = "Row Item " + "Batman";
|
||||
string firstItemName = "Row Item Fennec Fox";
|
||||
string secondItemName = "Row Item Batman";
|
||||
|
||||
//Navigate to Local Library
|
||||
testRunner.ClickByName("Library Tab");
|
||||
|
|
@ -97,7 +97,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
|
||||
string itemName = "Row Item " + "Rook";
|
||||
string itemName = "Row Item Rook";
|
||||
|
||||
//Navigate to Local Library
|
||||
testRunner.ClickByName("Library Tab");
|
||||
|
|
@ -134,8 +134,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.CloseSignInAndPrinterSelect();
|
||||
|
||||
//Items in Batman.zip
|
||||
string firstItemName = "Row Item " + "Batman";
|
||||
string secondItemName = "Row Item " + "2013-01-25 Mouthpiece v2";
|
||||
string firstItemName = "Row Item Batman";
|
||||
string secondItemName = "Row Item 2013-01-25 Mouthpiece v2";
|
||||
|
||||
//Navigate to Local Library
|
||||
testRunner.ClickByName("Library Tab");
|
||||
|
|
@ -181,7 +181,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
testRunner.Wait(1);
|
||||
|
||||
string rowItemToRename = "Row Item " + "Calibration - Box";
|
||||
string rowItemToRename = "Row Item Calibration - Box";
|
||||
testRunner.ClickByName("Library Edit Button");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName(rowItemToRename);
|
||||
|
|
@ -193,7 +193,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
testRunner.ClickByName("Rename Button");
|
||||
|
||||
string renamedRowItem = "Row Item " + "Library Item Renamed";
|
||||
string renamedRowItem = "Row Item Library Item Renamed";
|
||||
bool libraryItemWasRenamed = testRunner.WaitForName(renamedRowItem, 2);
|
||||
bool libraryItemBeforeRenameExists = testRunner.WaitForName(rowItemToRename, 2);
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
testRunner.Wait(1);
|
||||
|
||||
string rowItem = "Row Item " + "Calibration - Box";
|
||||
string rowItem = "Row Item Calibration - Box";
|
||||
testRunner.ClickByName("Library Edit Button");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName(rowItem);
|
||||
|
|
@ -286,7 +286,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
testRunner.Wait(1);
|
||||
|
||||
string rowItem = "Row Item " + "Calibration - Box";
|
||||
string rowItem = "Row Item Calibration - Box";
|
||||
testRunner.ClickByName("Library Edit Button");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName(rowItem);
|
||||
|
|
@ -328,10 +328,10 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Type("{Enter}");
|
||||
testRunner.Wait(1);
|
||||
|
||||
string rowItemOne = "Row Item " + "Calibration - Box";
|
||||
string rowItemOne = "Row Item Calibration - Box";
|
||||
testRunner.ClickByName(rowItemOne, 1);
|
||||
|
||||
string rowItemTwo = "Row Item " + "Fennec Fox";
|
||||
string rowItemTwo = "Row Item Fennec Fox";
|
||||
testRunner.ClickByName(rowItemTwo, 1);
|
||||
|
||||
testRunner.Wait(1);
|
||||
|
|
@ -370,7 +370,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(1);
|
||||
|
||||
//Select Library Item
|
||||
string rowItemOne = "Row Item " + "Calibration - Box";
|
||||
string rowItemOne = "Row Item Calibration - Box";
|
||||
testRunner.ClickByName(rowItemOne);
|
||||
|
||||
testRunner.Wait(1);
|
||||
|
|
@ -393,7 +393,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(1);
|
||||
|
||||
//Make sure that the Print Item was added
|
||||
string queueItem = "Queue Item " + "Calibration - Box";
|
||||
string queueItem = "Queue Item Calibration - Box";
|
||||
bool queueItemWasAdded = testRunner.WaitForName(queueItem, 2);
|
||||
Assert.IsTrue(queueItemWasAdded == true);
|
||||
|
||||
|
|
@ -430,10 +430,10 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
int queueCountBeforeAdd = QueueData.Instance.Count;
|
||||
|
||||
//Select both Library Items
|
||||
string rowItemOne = "Row Item " + "Calibration - Box";
|
||||
string rowItemOne = "Row Item Calibration - Box";
|
||||
testRunner.ClickByName(rowItemOne);
|
||||
|
||||
string rowItemTwo = "Row Item " + "Fennec Fox";
|
||||
string rowItemTwo = "Row Item Fennec Fox";
|
||||
testRunner.ClickByName(rowItemTwo);
|
||||
|
||||
//Click the Add To Queue button
|
||||
|
|
@ -451,8 +451,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(1);
|
||||
|
||||
//Test that both added print items exist
|
||||
string queueItemOne = "Queue Item " + "Calibration - Box";
|
||||
string queueItemTwo = "Queue Item " + "Fennec_Fox";
|
||||
string queueItemOne = "Queue Item Calibration - Box";
|
||||
string queueItemTwo = "Queue Item Fennec_Fox";
|
||||
bool queueItemOneWasAdded = testRunner.WaitForName(queueItemOne, 2);
|
||||
bool queueItemTwoWasAdded = testRunner.WaitForName(queueItemTwo, 2);
|
||||
|
||||
|
|
@ -482,7 +482,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(1);
|
||||
|
||||
// Click Library Item View Button
|
||||
testRunner.ClickByName("Row Item " + "Calibration - Box" + " View Button");
|
||||
testRunner.ClickByName("Row Item Calibration - Box View Button");
|
||||
|
||||
Assert.IsTrue(testRunner.WaitForName("Part Preview Window", 2), "Part Preview Window should be open after View button is clicked");
|
||||
testRunner.Wait(.2);
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Type("{Enter}");
|
||||
|
||||
//Make sure single part is added and queue count increases by one
|
||||
bool fennecFoxPartWasAdded = testRunner.WaitForName("Queue Item " + "Fennec_Fox", 2);
|
||||
bool fennecFoxPartWasAdded = testRunner.WaitForName("Queue Item Fennec_Fox", 2);
|
||||
Assert.IsTrue(fennecFoxPartWasAdded == true);
|
||||
|
||||
int queueCountAfterAdd = QueueData.Instance.Count;
|
||||
|
|
@ -260,8 +260,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
Assert.IsTrue(QueueData.Instance.Count == queueCountBeforeAdd + 2);
|
||||
|
||||
bool firstQueueItemWasAdded = testRunner.WaitForName("Queue Item " + "Fennec_Fox", 2);
|
||||
bool secondQueueItemWasAdded = testRunner.WaitForName("Queue Item " + "Batman", 2);
|
||||
bool firstQueueItemWasAdded = testRunner.WaitForName("Queue Item Fennec_Fox", 2);
|
||||
bool secondQueueItemWasAdded = testRunner.WaitForName("Queue Item Batman", 2);
|
||||
|
||||
Assert.IsTrue(firstQueueItemWasAdded == true);
|
||||
Assert.IsTrue(secondQueueItemWasAdded == true);
|
||||
|
|
@ -295,7 +295,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
Assert.IsTrue(queueItemCount - 1 == queueItemCountAfterRemove);
|
||||
|
||||
bool queueItemExists = testRunner.WaitForName("Queue Item " + "2013-01-25_Mouthpiece_v2", 2);
|
||||
bool queueItemExists = testRunner.WaitForName("Queue Item 2013-01-25_Mouthpiece_v2", 2);
|
||||
|
||||
Assert.IsTrue(queueItemExists == false);
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsTrue(QueueData.Instance.Count == 4);
|
||||
|
||||
SystemWindow systemWindow;
|
||||
string itemName = "Queue Item " + "2013-01-25_Mouthpiece_v2";
|
||||
string itemName = "Queue Item 2013-01-25_Mouthpiece_v2";
|
||||
|
||||
GuiWidget queueItem = testRunner.GetWidgetByName(itemName, out systemWindow, 3);
|
||||
SearchRegion queueItemRegion = testRunner.GetRegionByName(itemName, 3);
|
||||
|
|
@ -369,7 +369,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
int queueItemCount = QueueData.Instance.Count;
|
||||
|
||||
string itemName = "Queue Item " + "2013-01-25_Mouthpiece_v2";
|
||||
string itemName = "Queue Item 2013-01-25_Mouthpiece_v2";
|
||||
SystemWindow systemWindow;
|
||||
GuiWidget queueItem = testRunner.GetWidgetByName(itemName, out systemWindow, 3);
|
||||
SearchRegion queueItemRegion = testRunner.GetRegionByName(itemName, 3);
|
||||
|
|
@ -409,7 +409,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
testRunner.ClickByName("Queue Edit Button", 2);
|
||||
|
||||
testRunner.ClickByName("Queue Item " + "Batman", 2);
|
||||
testRunner.ClickByName("Queue Item Batman", 2);
|
||||
|
||||
testRunner.ClickByName("Queue Remove Button", 2);
|
||||
|
||||
|
|
@ -419,8 +419,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
Assert.IsTrue(queueItemCount - 2 == queueItemCountAfterRemove);
|
||||
|
||||
bool queueItemExists = testRunner.WaitForName("Queue Item " + "Batman", 2);
|
||||
bool secondQueueItemExists = testRunner.WaitForName("Queue Item " + "2013-01-25_Mouthpiece_v2", 2);
|
||||
bool queueItemExists = testRunner.WaitForName("Queue Item Batman", 2);
|
||||
bool secondQueueItemExists = testRunner.WaitForName("Queue Item 2013-01-25_Mouthpiece_v2", 2);
|
||||
|
||||
Assert.IsTrue(queueItemExists == false);
|
||||
Assert.IsTrue(secondQueueItemExists == false);
|
||||
|
|
@ -535,7 +535,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
AutomationTest testToRun = (testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
Assert.IsTrue(QueueData.Instance.Count == 4, "Queue has expected 3 items, including default Coin");
|
||||
Assert.IsTrue(QueueData.Instance.Count == 4, "Queue has expected 4 items, including default Coin");
|
||||
|
||||
// Assert that widgets exists
|
||||
Assert.IsTrue(testRunner.WaitForName("Queue Item Batman"), "Batman part exists");
|
||||
|
|
@ -544,6 +544,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
// Act - remove all print queue items
|
||||
testRunner.ClickByName("Queue... Menu", 2);
|
||||
testRunner.Wait(.2);
|
||||
|
||||
testRunner.ClickByName(" Remove All Menu Item", 2);
|
||||
testRunner.Wait(2);
|
||||
|
||||
|
|
@ -567,11 +569,6 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
AutomationTest testToRun = (testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
/*
|
||||
*Tests that when the Remove All menu item is clicked
|
||||
*1. Queue Item count is set to zero
|
||||
*2. All queue row items that were previously in the queue are removed
|
||||
*/
|
||||
|
||||
bool queueEmpty = true;
|
||||
int queueItemCount = QueueData.Instance.Count;
|
||||
|
|
@ -583,6 +580,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
Assert.IsTrue(queueEmpty == false);
|
||||
testRunner.ClickByName("Queue... Menu", 2);
|
||||
testRunner.Wait(.2);
|
||||
testRunner.ClickByName(" Create Part Sheet Menu Item", 2);
|
||||
testRunner.Wait(2);
|
||||
|
||||
|
|
@ -628,27 +626,27 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(2);
|
||||
int currentQueueItemCount = QueueData.Instance.Count;
|
||||
|
||||
Assert.IsTrue(testRunner.WaitForName("Queue Item " + "Batman", 1));
|
||||
Assert.IsTrue(testRunner.WaitForName("Queue Item " + "2013-01-25_Mouthpiece_v2", 1));
|
||||
Assert.IsTrue(testRunner.WaitForName("Queue Item Batman", 1));
|
||||
Assert.IsTrue(testRunner.WaitForName("Queue Item 2013-01-25_Mouthpiece_v2", 1));
|
||||
|
||||
testRunner.ClickByName("Queue Item " + "Batman", 1);
|
||||
testRunner.ClickByName("Queue Item " + "Batman" + " Remove");
|
||||
testRunner.ClickByName("Queue Item Batman", 1);
|
||||
testRunner.ClickByName("Queue Item Batman Remove");
|
||||
testRunner.Wait(2);
|
||||
|
||||
int queueItemCountAfterRemove = QueueData.Instance.Count;
|
||||
|
||||
Assert.IsTrue(currentQueueItemCount - 1 == queueItemCountAfterRemove);
|
||||
|
||||
bool batmanQueueItemExists = testRunner.WaitForName("Queue Item " + "Batman", 1);
|
||||
bool batmanQueueItemExists = testRunner.WaitForName("Queue Item Batman", 1);
|
||||
Assert.IsTrue(batmanQueueItemExists == false);
|
||||
|
||||
bool partPreviewWindowExists1 = testRunner.WaitForName("Queue Item " + "2013-01-25_Mouthpiece_v2" + " Part Preview", 1);
|
||||
bool partPreviewWindowExists1 = testRunner.WaitForName("Queue Item 2013-01-25_Mouthpiece_v2 Part Preview", 1);
|
||||
Assert.IsTrue(partPreviewWindowExists1 == false);
|
||||
testRunner.ClickByName("Queue Item " + "2013-01-25_Mouthpiece_v2", 1);
|
||||
testRunner.ClickByName("Queue Item 2013-01-25_Mouthpiece_v2", 1);
|
||||
testRunner.Wait(2);
|
||||
testRunner.ClickByName("Queue Item " + "2013-01-25_Mouthpiece_v2" + " View", 1);
|
||||
testRunner.ClickByName("Queue Item 2013-01-25_Mouthpiece_v2 View", 1);
|
||||
|
||||
bool partPreviewWindowExists2 = testRunner.WaitForName("Queue Item " + "2013-01-25_Mouthpiece_v2" + " Part Preview", 2);
|
||||
bool partPreviewWindowExists2 = testRunner.WaitForName("Queue Item 2013-01-25_Mouthpiece_v2 Part Preview", 2);
|
||||
Assert.IsTrue(partPreviewWindowExists2 == true);
|
||||
|
||||
return Task.FromResult(0);
|
||||
|
|
@ -687,7 +685,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsTrue(queueCountAfterAMFIsAdded == queueCountBeforeTest + 1);
|
||||
|
||||
//Make sure amf queue item is added
|
||||
bool firstQueueItemExists = testRunner.WaitForName("Queue Item " + "Rook", 1);
|
||||
bool firstQueueItemExists = testRunner.WaitForName("Queue Item Rook", 1);
|
||||
Assert.IsTrue(firstQueueItemExists == true);
|
||||
|
||||
return Task.FromResult(0);
|
||||
|
|
@ -725,7 +723,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsTrue(queueCountAfterSTLIsAdded == queueCountBeforeTest + 1);
|
||||
|
||||
//stl queue item is added to the queue
|
||||
bool firstQueueItemExists = testRunner.WaitForName("Queue Item " + "Batman", 1);
|
||||
bool firstQueueItemExists = testRunner.WaitForName("Queue Item Batman", 1);
|
||||
Assert.IsTrue(firstQueueItemExists == true);
|
||||
|
||||
return Task.FromResult(0);
|
||||
|
|
@ -758,7 +756,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsTrue(queueCountAfterGcodeIsAdded == queueCountBeforeTest + 1);
|
||||
|
||||
//stl queue item is added to the queue
|
||||
bool firstQueueItemExists = testRunner.WaitForName("Queue Item " + "chichen-itza_pyramid", 1);
|
||||
bool firstQueueItemExists = testRunner.WaitForName("Queue Item chichen-itza_pyramid", 1);
|
||||
Assert.IsTrue(firstQueueItemExists == true);
|
||||
|
||||
return Task.FromResult(0);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
Assert.IsTrue(testRunner.ClickByName("General Tab", 1));
|
||||
Assert.IsTrue(testRunner.ClickByName("Single Print Tab", 1));
|
||||
Assert.IsTrue(testRunner.ClickByName("Layer(s) To Pause:" + " Edit"));
|
||||
Assert.IsTrue(testRunner.ClickByName("Layer(s) To Pause: Edit"));
|
||||
testRunner.Type("4;2;a;not;6");
|
||||
|
||||
Assert.IsTrue(testRunner.ClickByName("Layer View Tab"));
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(.5);
|
||||
|
||||
// ensure that it is now in the library folder (that the folder updated)
|
||||
Assert.IsTrue(testRunner.WaitForName("Row Item " + "0Test Part", 5), "The part we added should be in the library");
|
||||
Assert.IsTrue(testRunner.WaitForName("Row Item 0Test Part", 5), "The part we added should be in the library");
|
||||
|
||||
testRunner.Wait(.5);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue