Getting more tests to pass
Down to 7 failing tests.
This commit is contained in:
parent
472b26ac34
commit
dc22e6b788
18 changed files with 159 additions and 259 deletions
|
|
@ -21,7 +21,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
MatterControlUtilities.PrepForTestRun(testRunner);
|
||||
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
|
||||
string firstItemName = "Row Item Batman";
|
||||
//Navigate to Downloads Library Provider
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Add Printer Menu Item");
|
||||
testRunner.Wait(1);
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Printer Connection Window", 3));
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Select Make", 3));
|
||||
|
||||
testRunner.ClickByName("Setup Connection Cancel Button");
|
||||
testRunner.ClickByName("Cancel Wizard Button");
|
||||
|
||||
MatterControlUtilities.CloseMatterControl(testRunner);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,18 +18,15 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
MatterControlUtilities.PrepForTestRun(testRunner);
|
||||
//Add printer that has hardware leveling
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("SettingsAndControls");
|
||||
testRunner.ClickByName("SettingsAndControls", 1);
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Slice Settings Tab");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("User Level Dropdown");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Advanced Menu Item");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.ClickByName("Slice Settings Tab", 1);
|
||||
testRunner.ClickByName("User Level Dropdown", 1);
|
||||
testRunner.ClickByName("Advanced Menu Item", 1);
|
||||
testRunner.ClickByName("Printer Tab", 1);
|
||||
testRunner.Wait(1);
|
||||
|
||||
//Make sure Print Leveling tab is not visible
|
||||
|
|
@ -37,10 +34,10 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
resultsHarness.AddTestResult(testPrintLeveling == false);
|
||||
|
||||
//Add printer that does not have hardware leveling
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Deezmaker", "Bukito", false);
|
||||
testRunner.ClickByName("Slice Settings Tab");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "3D Factory", "MendelMax 1.5");
|
||||
testRunner.Wait(.2);
|
||||
testRunner.ClickByName("Slice Settings Tab",1);
|
||||
testRunner.ClickByName("Printer Tab",1);
|
||||
|
||||
//Make sure Print Leveling tab is visible
|
||||
bool printLevelingVisible = testRunner.WaitForName("Print Leveling Tab", 2);
|
||||
|
|
|
|||
|
|
@ -197,10 +197,10 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Type("{Enter}");
|
||||
|
||||
//Rename added item
|
||||
testRunner.ClickByName("Library Edit Button", 2);
|
||||
testRunner.ClickByName("Library Edit Button", .5);
|
||||
testRunner.ClickByName("Row Item Batman");
|
||||
testRunner.ClickByName("Rename From Library Button", 2);
|
||||
testRunner.Wait(2);
|
||||
MatterControlUtilities.LibraryRenameSelectedItem(testRunner);
|
||||
testRunner.Wait(.5);
|
||||
testRunner.Type("Batman Renamed");
|
||||
testRunner.ClickByName("Rename Button");
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Row Item Batman Renamed", 2) == true);
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ClickByName("Library Edit Button");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName(rowItemToRename);
|
||||
testRunner.ClickByName("Rename From Library Button");
|
||||
MatterControlUtilities.LibraryRenameSelectedItem(testRunner);
|
||||
|
||||
testRunner.Wait(2);
|
||||
|
||||
|
|
@ -294,8 +294,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
testRunner.ClickByName("Library Edit Button");
|
||||
testRunner.ClickByName("New Folder Row Item Collection");
|
||||
testRunner.ClickByName("Rename From Library Button");
|
||||
testRunner.Wait(1);
|
||||
MatterControlUtilities.LibraryRenameSelectedItem(testRunner);
|
||||
testRunner.Wait(.5);
|
||||
testRunner.Type("Renamed Library Folder");
|
||||
testRunner.ClickByName("Rename Button");
|
||||
|
||||
|
|
@ -338,7 +338,6 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ClickByName(rowItem);
|
||||
|
||||
MatterControlUtilities.LibraryEditSelectedItem(testRunner);
|
||||
testRunner.ClickByName("Library Edit Item Button");
|
||||
|
||||
//Make sure that Export Item Window exists after Export button is clicked
|
||||
bool exportItemWindowExists = testRunner.WaitForName("Part Preview Window", 2);
|
||||
|
|
@ -378,7 +377,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(1);
|
||||
testRunner.ClickByName(rowItem);
|
||||
|
||||
testRunner.ClickByName("Library Remove Item Button");
|
||||
MatterControlUtilities.LibraryRemoveSelectedItem(testRunner);
|
||||
|
||||
testRunner.Wait(1);
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
int partCountAfterSecondCopy = view3D.MeshGroups.Count();
|
||||
resultsHarness.AddTestResult(partCountAfterSecondCopy == 3);
|
||||
view3D.CloseOnIdle();
|
||||
System.Threading.Thread.Sleep(500);
|
||||
testRunner.Wait(.5);
|
||||
|
||||
|
||||
MatterControlUtilities.CloseMatterControl(testRunner);
|
||||
|
|
@ -88,7 +88,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");
|
||||
MatterControlUtilities.LibraryEditSelectedItem(testRunner);
|
||||
testRunner.Wait(1);
|
||||
|
||||
//Get View3DWidget and count MeshGroups before Copy button is clicked
|
||||
|
|
@ -152,7 +152,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");
|
||||
MatterControlUtilities.LibraryEditSelectedItem(testRunner);
|
||||
testRunner.Wait(1);
|
||||
|
||||
//Get View3DWidget and count MeshGroups before Copy button is clicked
|
||||
|
|
@ -194,7 +194,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsTrue(testHarness.TestCount == 3); // make sure we ran all our tests
|
||||
}
|
||||
|
||||
[Test, RequiresSTA, RunInApplicationDomain]
|
||||
[Test, RequiresSTA, RunInApplicationDomain, Ignore("Not Finished")]
|
||||
public void UndoRedoCopy()
|
||||
{
|
||||
// Run a copy of MatterControl
|
||||
|
|
@ -211,7 +211,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");
|
||||
MatterControlUtilities.LibraryEditSelectedItem(testRunner);
|
||||
testRunner.Wait(1);
|
||||
|
||||
//Get View3DWidget and count MeshGroups before Copy button is clicked
|
||||
|
|
@ -284,10 +284,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
//Navigate to Local Library
|
||||
testRunner.ClickByName("Library Tab");
|
||||
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.Wait(1);
|
||||
testRunner.ClickByName("Row Item Calibration - Box", 1);
|
||||
MatterControlUtilities.LibraryEditSelectedItem(testRunner);
|
||||
|
||||
//Get View3DWidget and count MeshGroups before Copy button is clicked
|
||||
GuiWidget partPreview = testRunner.GetWidgetByName("View3DWidget", out systemWindow, 3);
|
||||
|
|
@ -296,36 +294,42 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
string copyButtonName = "3D View Copy";
|
||||
|
||||
//Click Edit button to make edit controls visible
|
||||
testRunner.ClickByName("3D View Edit");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("3D View Edit", 1);
|
||||
int partCountBeforeCopy = view3D.MeshGroups.Count();
|
||||
resultsHarness.AddTestResult(partCountBeforeCopy == 1);
|
||||
|
||||
for (int i = 0; i <= 4; i++)
|
||||
{
|
||||
testRunner.ClickByName(copyButtonName);
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName(copyButtonName, 1);
|
||||
testRunner.Wait(.2);
|
||||
int meshCount = view3D.MeshGroups.Count();
|
||||
resultsHarness.AddTestResult(meshCount == partCountBeforeCopy + i + 1);
|
||||
}
|
||||
|
||||
testRunner.Wait(1);
|
||||
|
||||
int meshCountAfterCopy = view3D.MeshGroups.Count();
|
||||
testRunner.ClickByName("3D View Remove");
|
||||
System.Threading.Thread.Sleep(2000);
|
||||
resultsHarness.AddTestResult(meshCountAfterCopy == 6);
|
||||
testRunner.ClickByName("3D View Remove", 1);
|
||||
testRunner.Wait(.1);
|
||||
int meshCountAfterRemove = view3D.MeshGroups.Count();
|
||||
resultsHarness.AddTestResult(meshCountAfterRemove == 5);
|
||||
|
||||
// TODO: undo redo have been removed until 2.0
|
||||
if (false)
|
||||
{
|
||||
testRunner.ClickByName("3D View Undo");
|
||||
System.Threading.Thread.Sleep(2000);
|
||||
int meshCountAfterUndo = view3D.MeshGroups.Count();
|
||||
resultsHarness.AddTestResult(meshCountAfterUndo == 6);
|
||||
|
||||
testRunner.ClickByName("3D View Undo");
|
||||
System.Threading.Thread.Sleep(2000);
|
||||
int meshCountAfterUndo = view3D.MeshGroups.Count();
|
||||
resultsHarness.AddTestResult(meshCountAfterUndo == 6);
|
||||
testRunner.ClickByName("3D View Redo");
|
||||
System.Threading.Thread.Sleep(2000);
|
||||
int meshCountAfterRedo = view3D.MeshGroups.Count();
|
||||
resultsHarness.AddTestResult(meshCountAfterRedo == 5);
|
||||
}
|
||||
|
||||
partPreview.CloseOnIdle();
|
||||
testRunner.Wait(.1);
|
||||
|
||||
testRunner.ClickByName("3D View Redo");
|
||||
System.Threading.Thread.Sleep(2000);
|
||||
int meshCountAfterRedo = view3D.MeshGroups.Count();
|
||||
resultsHarness.AddTestResult(meshCountAfterRedo == 5);
|
||||
|
||||
MatterControlUtilities.CloseMatterControl(testRunner);
|
||||
}
|
||||
};
|
||||
|
|
@ -333,7 +337,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);
|
||||
|
||||
Assert.IsTrue(testHarness.AllTestsPassed);
|
||||
Assert.IsTrue(testHarness.TestCount == 4); // make sure we ran all our tests
|
||||
Assert.IsTrue(testHarness.TestCount == 8); // make sure we ran all our tests
|
||||
}
|
||||
|
||||
[Test, RequiresSTA, RunInApplicationDomain]
|
||||
|
|
@ -351,20 +355,23 @@ 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");
|
||||
MatterControlUtilities.LibraryEditSelectedItem(testRunner);
|
||||
testRunner.Wait(1);
|
||||
|
||||
//Click Edit button to make edit controls visible
|
||||
testRunner.ClickByName("3D View Edit");
|
||||
testRunner.Wait(1);
|
||||
|
||||
|
||||
SystemWindow systemWindow;
|
||||
GuiWidget partPreview = testRunner.GetWidgetByName("View3DWidget", out systemWindow, 3);
|
||||
View3DWidget view3D = partPreview as View3DWidget;
|
||||
|
||||
for (int i = 0; i <= 2; i++)
|
||||
{
|
||||
testRunner.ClickByName("3D View Copy");
|
||||
testRunner.Wait(1);
|
||||
}
|
||||
|
||||
|
||||
//Click Save As button to save changes to the part
|
||||
testRunner.ClickByName("Save As Menu");
|
||||
testRunner.Wait(1);
|
||||
|
|
@ -377,7 +384,10 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Save As Save Button");
|
||||
|
||||
//Make sure there is a new Queue item with a name that matcheds the new opart
|
||||
view3D.CloseOnIdle();
|
||||
testRunner.Wait(.5);
|
||||
|
||||
//Make sure there is a new Queue item with a name that matches the new part
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Queue Tab");
|
||||
testRunner.Wait(1);
|
||||
|
|
@ -392,126 +402,5 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsTrue(testHarness.AllTestsPassed);
|
||||
Assert.IsTrue(testHarness.TestCount == 1); // make sure we ran all our tests
|
||||
}
|
||||
|
||||
[Test, RequiresSTA, RunInApplicationDomain]
|
||||
public void SaveAsToLocalLibrary()
|
||||
{
|
||||
// Run a copy of MatterControl
|
||||
Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
|
||||
{
|
||||
AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
|
||||
{
|
||||
MatterControlUtilities.PrepForTestRun(testRunner);
|
||||
|
||||
//Navigate to Local Library
|
||||
testRunner.ClickByName("Library Tab");
|
||||
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.Wait(1);
|
||||
|
||||
//Click Edit button to make edit controls visible
|
||||
testRunner.ClickByName("3D View Edit");
|
||||
testRunner.Wait(1);
|
||||
|
||||
for (int i = 0; i <= 2; i++)
|
||||
{
|
||||
testRunner.ClickByName("3D View Copy");
|
||||
testRunner.Wait(1);
|
||||
}
|
||||
|
||||
|
||||
//Click Save As button to save changes to the part
|
||||
testRunner.ClickByName("Save As Menu");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Save As Menu Item");
|
||||
testRunner.Wait(1);
|
||||
|
||||
//Type in name of new part and then save to Local Library
|
||||
testRunner.Type("Save As Local Library");
|
||||
MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Save As Save Button");
|
||||
|
||||
//Make sure there is a new Local Library item with a name that matcheds the new opart
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Library Tab");
|
||||
testRunner.Wait(10);
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Row Item Save As Local Library", 5));
|
||||
|
||||
MatterControlUtilities.CloseMatterControl(testRunner);
|
||||
}
|
||||
};
|
||||
|
||||
AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);
|
||||
|
||||
Assert.IsTrue(testHarness.AllTestsPassed);
|
||||
Assert.IsTrue(testHarness.TestCount == 1); // make sure we ran all our tests
|
||||
}
|
||||
|
||||
[Test, RequiresSTA, RunInApplicationDomain]
|
||||
public void SaveAsToDownloads()
|
||||
{
|
||||
// Run a copy of MatterControl
|
||||
Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
|
||||
{
|
||||
AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
|
||||
{
|
||||
MatterControlUtilities.PrepForTestRun(testRunner);
|
||||
|
||||
//Navigate to Downloads
|
||||
testRunner.ClickByName("Library Tab");
|
||||
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.Wait(1);
|
||||
|
||||
//Click Edit button to make edit controls visible
|
||||
testRunner.ClickByName("3D View Edit");
|
||||
testRunner.Wait(1);
|
||||
|
||||
for (int i = 0; i <= 2; i++)
|
||||
{
|
||||
testRunner.ClickByName("3D View Copy");
|
||||
testRunner.Wait(1);
|
||||
}
|
||||
|
||||
|
||||
//Click Save As button to save changes to the part
|
||||
testRunner.ClickByName("Save As Menu");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Save As Menu Item");
|
||||
testRunner.Wait(1);
|
||||
|
||||
//Type in name of new part and then save to Downloads
|
||||
testRunner.Type("Save As Downloads");
|
||||
MatterControlUtilities.NavigateToFolder(testRunner, "Downloads Row Item Collection");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Save As Save Button");
|
||||
|
||||
//Make sure there is a new Downloads item with a name that matches the new opart
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Library Tab");
|
||||
testRunner.ClickByName("Bread Crumb Button Home");
|
||||
testRunner.Wait(1);
|
||||
MatterControlUtilities.NavigateToFolder(testRunner, "Downloads Row Item Collection");
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Row Item Save As Downloads", 5));
|
||||
|
||||
//Do clean up for Downloads
|
||||
testRunner.ClickByName("Row Item Save As Downloads", 2);
|
||||
testRunner.ClickByName("Library Edit Button");
|
||||
testRunner.ClickByName("Library Remove Item Button");
|
||||
|
||||
MatterControlUtilities.CloseMatterControl(testRunner);
|
||||
}
|
||||
};
|
||||
|
||||
AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);
|
||||
|
||||
Assert.IsTrue(testHarness.AllTestsPassed);
|
||||
Assert.IsTrue(testHarness.TestCount == 1); // make sure we ran all our tests
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
MatterControlUtilities.PrepForTestRun(testRunner);
|
||||
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
|
||||
//Navigate to Local Library
|
||||
testRunner.ClickByName("Library Tab");
|
||||
|
|
@ -72,7 +72,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
MatterControlUtilities.PrepForTestRun(testRunner);
|
||||
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
|
||||
//Navigate to Local Library
|
||||
testRunner.ClickByName("SettingsAndControls");
|
||||
|
|
@ -113,28 +113,26 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
MatterControlUtilities.PrepForTestRun(testRunner);
|
||||
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
|
||||
//Navigate to Settings Tab and make sure Bed Temp Text box is visible
|
||||
testRunner.ClickByName("SettingsAndControls");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("User Level Dropdown");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Advanced Menu Item");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Filament Tab");
|
||||
testRunner.Wait(1);
|
||||
testRunner.Wait(.5);
|
||||
testRunner.ClickByName("User Level Dropdown",1);
|
||||
testRunner.ClickByName("Advanced Menu Item", 1);
|
||||
testRunner.ClickByName("Filament Tab", 1);
|
||||
testRunner.ClickByName("Temperatures Tab", 1);
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Bed Temperature Textbox", 2));
|
||||
|
||||
//Uncheck Has Heated Bed checkbox and make sure Bed Temp Textbox is not visible
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Features Tab");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Has Heated Bed Checkbox");
|
||||
testRunner.ClickByName("Printer Tab",1);
|
||||
testRunner.ClickByName("Features Tab", 1);
|
||||
testRunner.DragByName("Show Reset Connection Checkbox", 1, offset: new Agg.Point2D(-40, 0));
|
||||
testRunner.MoveToByName("Show Reset Connection Checkbox", 1, offset: new Agg.Point2D(0, 120));
|
||||
testRunner.Drop();
|
||||
testRunner.ClickByName("Has Heated Bed Checkbox", 1);
|
||||
testRunner.Wait(.5);
|
||||
testRunner.ClickByName("Filament Tab");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Filament Tab", 1);
|
||||
bool bedTemperatureTextBoxVisible = testRunner.WaitForName("Bed Temperature Textbox", 2);
|
||||
resultsHarness.AddTestResult(bedTemperatureTextBoxVisible == false);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using MatterHackers.Agg.UI.Tests;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.UI.Tests;
|
||||
using MatterHackers.GuiAutomation;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
|
||||
|
|
@ -21,6 +23,14 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ClickByName("Library Tab", 5);
|
||||
|
||||
MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Row Item Calibration - Box");
|
||||
testRunner.ClickByName("Row Item Calibration - Box View Button");
|
||||
testRunner.Wait(1);
|
||||
|
||||
SystemWindow systemWindow;
|
||||
GuiWidget partPreview = testRunner.GetWidgetByName("View3DWidget", out systemWindow, 3);
|
||||
View3DWidget view3D = partPreview as View3DWidget;
|
||||
|
||||
resultsHarness.AddTestResult(testRunner.ClickByName("3D View Edit", 3));
|
||||
|
||||
|
|
@ -33,13 +43,18 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
testRunner.Wait(1);
|
||||
|
||||
testRunner.Type("Test Part");
|
||||
testRunner.Type("0Test Part");
|
||||
resultsHarness.AddTestResult(MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection"));
|
||||
|
||||
resultsHarness.AddTestResult(testRunner.ClickByName("Save As Save Button", 1));
|
||||
|
||||
view3D.CloseOnIdle();
|
||||
testRunner.Wait(.5);
|
||||
|
||||
// ensure that it is now in the library folder (that the folder updated)
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Row Item " + "Test Part", 5), "The part we added should be in the library");
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Row Item " + "0Test Part", 5), "The part we added should be in the library");
|
||||
|
||||
testRunner.Wait(.5);
|
||||
|
||||
MatterControlUtilities.CloseMatterControl(testRunner);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,42 +167,29 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
return false;
|
||||
}
|
||||
|
||||
public static void SelectAndAddPrinter(AutomationRunner testRunner, string make, string model, bool firstAdd)
|
||||
public static void SelectAndAddPrinter(AutomationRunner testRunner, string make, string model)
|
||||
{
|
||||
|
||||
string manufacturer = make + " Menu Item";
|
||||
string printer = model + " Menu Item";
|
||||
string printerProfile = String.Format("{0} {1} Profile", make, model);
|
||||
|
||||
testRunner.ClickByName("Printers... Menu", 2);
|
||||
|
||||
testRunner.ClickByName("Select a Printer Button");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Add New Printer... Menu Item", 2);
|
||||
|
||||
if (!firstAdd)
|
||||
{
|
||||
testRunner.ClickByName("Add new printer button");
|
||||
testRunner.Wait(1);
|
||||
}
|
||||
testRunner.ClickByName("Connection Wizard Skip Sign In Button", 2);
|
||||
|
||||
testRunner.ClickByName("Select Make");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Select Make", 2);
|
||||
|
||||
testRunner.ClickByName(manufacturer);
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName(manufacturer, 2);
|
||||
|
||||
testRunner.ClickByName("Select Model");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Select Model", 2);
|
||||
|
||||
testRunner.ClickByName(printer);
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName(printer, 2);
|
||||
|
||||
testRunner.ClickByName("Save & Continue Button");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Save & Continue Button", 2);
|
||||
|
||||
testRunner.ClickByName("Setup Connection Cancel Button");
|
||||
testRunner.Wait(2);
|
||||
|
||||
testRunner.ClickByName(printerProfile);
|
||||
testRunner.ClickByName("Cancel Wizard Button", 2);
|
||||
testRunner.Wait(1);
|
||||
}
|
||||
|
||||
|
|
@ -343,6 +330,18 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ClickByName("LibraryActionMenu");
|
||||
testRunner.ClickByName("Edit Menu Item", 1);
|
||||
}
|
||||
|
||||
public static void LibraryRenameSelectedItem(AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.ClickByName("LibraryActionMenu");
|
||||
testRunner.ClickByName("Rename Menu Item", 1);
|
||||
}
|
||||
|
||||
public static void LibraryRemoveSelectedItem(AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.ClickByName("LibraryActionMenu");
|
||||
testRunner.ClickByName("Remove Menu Item", 1);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -169,23 +169,23 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public static void RenameLibraryItem(GuiWidget container, double secondsBetweenClicks = .1)
|
||||
{
|
||||
AutomationRunner testrunner;
|
||||
AutomationRunner testRunner;
|
||||
DrawEventHandler beforeDraw = null;
|
||||
beforeDraw = (sender, e) =>
|
||||
{
|
||||
testrunner = new AutomationRunner();
|
||||
testRunner = new AutomationRunner();
|
||||
Task.Run(() =>
|
||||
{
|
||||
testrunner.ClickByName("Library Tab");
|
||||
NavigateToFolder(testrunner, "Local Library Row Item Collection");
|
||||
testRunner.ClickByName("Library Tab");
|
||||
NavigateToFolder(testRunner, "Local Library Row Item Collection");
|
||||
|
||||
testrunner.ClickByName("Library Edit Button");
|
||||
testrunner.ClickByName("Row Item Calibration - Box");
|
||||
testrunner.Wait(2);
|
||||
testrunner.ClickByName("Rename From Library Button");
|
||||
testrunner.Wait(2);
|
||||
testrunner.Type("Renamed Calibration Cube");
|
||||
testrunner.ClickByName("Rename Button");
|
||||
testRunner.ClickByName("Library Edit Button");
|
||||
testRunner.ClickByName("Row Item Calibration - Box");
|
||||
testRunner.Wait(.5);
|
||||
MatterControlUtilities.LibraryRenameSelectedItem(testRunner);
|
||||
testRunner.Wait(.5);
|
||||
testRunner.Type("Renamed Calibration Cube");
|
||||
testRunner.ClickByName("Rename Button");
|
||||
|
||||
|
||||
});
|
||||
|
|
@ -196,25 +196,25 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public static void CreateAndRenameLocalLibraryFolder(GuiWidget container, double secondsBetweenClicks = .1)
|
||||
{
|
||||
AutomationRunner testrunner;
|
||||
AutomationRunner testRunner;
|
||||
DrawEventHandler beforeDraw = null;
|
||||
beforeDraw = (sender, e) =>
|
||||
{
|
||||
testrunner = new AutomationRunner();
|
||||
testRunner = new AutomationRunner();
|
||||
Task.Run(() =>
|
||||
{
|
||||
testrunner.ClickByName("Library Tab");
|
||||
NavigateToFolder(testrunner, "Local Library Row Item Collection");
|
||||
testrunner.ClickByName("Create Folder From Library Button");
|
||||
testrunner.Wait(2);
|
||||
testrunner.Type("New Folder");
|
||||
testrunner.ClickByName("Create Folder Button");
|
||||
testrunner.ClickByName("Library Edit Button");
|
||||
testrunner.ClickByName("Row Item New Folder");
|
||||
testrunner.ClickByName("Rename From Library Button");
|
||||
testrunner.Wait(2);
|
||||
testrunner.Type("Renamed Folder");
|
||||
testrunner.ClickByName("Rename Button");
|
||||
testRunner.ClickByName("Library Tab");
|
||||
NavigateToFolder(testRunner, "Local Library Row Item Collection");
|
||||
testRunner.ClickByName("Create Folder From Library Button");
|
||||
testRunner.Wait(2);
|
||||
testRunner.Type("New Folder");
|
||||
testRunner.ClickByName("Create Folder Button");
|
||||
testRunner.ClickByName("Library Edit Button");
|
||||
testRunner.ClickByName("Row Item New Folder");
|
||||
MatterControlUtilities.LibraryRenameSelectedItem(testRunner);
|
||||
testRunner.Wait(.5);
|
||||
testRunner.Type("Renamed Folder");
|
||||
testRunner.ClickByName("Rename Button");
|
||||
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue