Getting more tests to run on new ui
This commit is contained in:
parent
d9113bea62
commit
b1f2023210
14 changed files with 48 additions and 58 deletions
|
|
@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.NavigateToFolder("Local Library Row Item Collection");
|
||||
testRunner.InvokeLibraryCreateFolderDialog();
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
// Tests that clicking the queue export button with a single item selected opens export item window
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
//Make sure that the export window does not exist
|
||||
bool exportWindowExists1 = testRunner.WaitForName("Export Item Window", 0);
|
||||
|
|
@ -76,7 +76,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
File.Delete(exportZipPath);
|
||||
}
|
||||
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
Assert.AreEqual(4, QueueData.Instance.ItemCount, "Queue should initially have 4 items");
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.ClickByName("Queue... Menu");
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
// Navigate to Downloads Library Provider
|
||||
testRunner.NavigateToFolder("Downloads Row Item Collection");
|
||||
|
|
@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
// Navigate to Downloads Library Provider
|
||||
testRunner.NavigateToFolder("Downloads Row Item Collection");
|
||||
|
|
@ -75,7 +75,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
// Navigate to Downloads Library Provider
|
||||
testRunner.NavigateToFolder("Downloads Row Item Collection");
|
||||
|
|
@ -101,7 +101,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
// Navigate to Downloads Library Provider
|
||||
testRunner.NavigateToFolder("Downloads Row Item Collection");
|
||||
|
|
@ -131,7 +131,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
//Navigate to Downloads Library Provider
|
||||
testRunner.NavigateToFolder("Downloads Row Item Collection");
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
testRunner.AddTestAssetsToLibrary("Batman.stl");
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -26,7 +26,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
testRunner.AddTestAssetsToLibrary("Rook.amf", "Batman.stl");
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -38,7 +38,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
testRunner.AddTestAssetsToLibrary("Rook.amf");
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -51,7 +51,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Expected: When descending into a child folder and moving items into the parent, popping the path to the parent should refresh and show the moved content
|
||||
await MatterControlUtilities.RunTest(testRunner =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
// Navigate to Local Library
|
||||
testRunner.NavigateToFolder("Local Library Row Item Collection");
|
||||
|
|
@ -94,7 +94,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
// Navigate to Local Library
|
||||
testRunner.NavigateToFolder("Local Library Row Item Collection");
|
||||
|
|
@ -126,7 +126,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.AddTestAssetsToLibrary("Rook.amf");
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
// Navigate to Local Library
|
||||
testRunner.NavigateToFolder("Local Library Row Item Collection");
|
||||
|
|
@ -186,7 +186,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.AddTestAssetsToLibrary("Rook.amf");
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.AddTestAssetsToLibrary("Rook.amf", "Batman.stl");
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.OpenEmptyPartTab();
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.OpenEmptyPartTab();
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.OpenEmptyPartTab();
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.OpenEmptyPartTab();
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Expected = initial + 1
|
||||
int expectedCount = QueueData.Instance.ItemCount + 1;
|
||||
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
|
|
@ -56,14 +56,14 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.InvokeLibraryAddDialog();
|
||||
|
||||
// Open Fennec_Fox
|
||||
testRunner.CompleteDialog(
|
||||
MatterControlUtilities.GetTestItemPath("Fennec_Fox.stl"));
|
||||
testRunner.CompleteDialog(MatterControlUtilities.GetTestItemPath("Fennec_Fox.stl"));
|
||||
|
||||
// Wait for expected outcome
|
||||
testRunner.WaitFor(() => QueueData.Instance.ItemCount == expectedCount);
|
||||
|
||||
// Assert - one part added and queue count increases by one
|
||||
Assert.AreEqual(expectedCount, QueueData.Instance.ItemCount, "Queue count should increase by 1 when adding 1 item");
|
||||
|
||||
Assert.IsTrue(testRunner.WaitForName("Row Item Fennec_Fox.stl"), "Named widget should exist after add(Fennec_Fox)");
|
||||
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -78,7 +78,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Expected = initial + 2;
|
||||
int expectedCount = QueueData.Instance.ItemCount + 2;
|
||||
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
int expectedCount = QueueData.Instance.ItemCount - 1;
|
||||
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.NavigateToFolder("Print Queue Row Item Collection");
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
int expectedCount = QueueData.Instance.ItemCount - 2;
|
||||
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.NavigateToFolder("Print Queue Row Item Collection");
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.OpenEmptyPartTab();
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Expected = initial + 1
|
||||
int expectedCount = QueueData.Instance.ItemCount + 1;
|
||||
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Expected = initial + 1
|
||||
int expectedCount = QueueData.Instance.ItemCount + 1;
|
||||
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Expected = initial + 1
|
||||
int expectedCount = QueueData.Instance.ItemCount + 1;
|
||||
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.ChangeToQueueContainer();
|
||||
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
EventHandler unregisterEvents = null;
|
||||
int layerHeightChangedCount = 0;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
testRunner.AddAndSelectPrinter();
|
||||
|
||||
testRunner.OpenEmptyPartTab();
|
||||
|
||||
|
|
|
|||
|
|
@ -175,23 +175,6 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.WaitforDraw(systemWindow);
|
||||
}
|
||||
|
||||
public static void CloseSignInAndPrinterSelect(this AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.WaitForFirstDraw();
|
||||
|
||||
// If there is an auth panel make sure we try and close it
|
||||
// Non-MCCentral builds won't have the plugin. Reduce the wait time for these cases
|
||||
if (testRunner.WaitForName("Connection Wizard Skip Sign In Button", 1))
|
||||
{
|
||||
testRunner.ClickByName("Connection Wizard Skip Sign In Button");
|
||||
}
|
||||
|
||||
if (testRunner.WaitForName("Cancel Wizard Button", 1))
|
||||
{
|
||||
testRunner.ClickByName("Cancel Wizard Button");
|
||||
}
|
||||
}
|
||||
|
||||
public static void OpenEmptyPartTab(this AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
|
@ -315,7 +298,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.WaitForReloadAll(() => testRunner.ClickByName("Yes Button"));
|
||||
}
|
||||
|
||||
public static void AddAndSelectPrinter(this AutomationRunner testRunner, string make, string model)
|
||||
public static void AddAndSelectPrinter(this AutomationRunner testRunner, string make = "Airwolf 3D", string model = "HD")
|
||||
{
|
||||
SystemWindow systemWindow;
|
||||
testRunner.GetWidgetByName("WidescreenPanel", out systemWindow, 10);
|
||||
|
|
@ -468,6 +451,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
public static void EnsureFoldersVisible(this AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.ClickByName("Add Content Menu");
|
||||
|
||||
var checkBox = (ExpandCheckboxButton)testRunner.GetWidgetByName("Show Folders Toggle", out _);
|
||||
if (!checkBox.Checked)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue