Collapse PrepForTestRun(mode) into new CloseSignInAndPrinterSelect()

This commit is contained in:
John Lewin 2016-10-26 08:35:51 -07:00
parent a592b86cd7
commit 56ef92ab91
16 changed files with 72 additions and 81 deletions

View file

@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("Library Tab", 3);
testRunner.NavigateToFolder("Local Library Row Item Collection");

View file

@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("Library Tab");
testRunner.NavigateToFolder("Local Library Row Item Collection");

View file

@ -17,7 +17,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");

View file

@ -16,7 +16,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("File Menu");
testRunner.Wait(1);
@ -37,7 +37,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("File Menu");
testRunner.Wait(1);
@ -69,7 +69,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("File Menu");
testRunner.Wait(1);
@ -105,7 +105,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("File Menu");
testRunner.Wait(1);

View file

@ -16,7 +16,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Add printer that has hardware leveling
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
@ -51,7 +52,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
// make a jump start printer
using (var emulatorProcess = testRunner.LaunchAndConnectToPrinterEmulator("JumpStart", "V1", runSlow: false))

View file

@ -15,7 +15,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.CreateDownloadsSubFolder();
//Navigate to Downloads Library Provider
@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.CreateDownloadsSubFolder();
//Navigate to Downloads Library Provider
@ -101,7 +101,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.CreateDownloadsSubFolder();
// Navigate to Downloads Library Provider
@ -147,7 +147,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.CreateDownloadsSubFolder();
//Navigate to Downloads Library Provider
@ -190,7 +190,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.CreateDownloadsSubFolder();
//Navigate to Downloads Library Provider

View file

@ -15,7 +15,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
string itemName = "Row Item " + "Fennec Fox";
@ -51,7 +51,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Names of Items to be added
string firstItemName = "Row Item " + "Fennec Fox";
string secondItemName = "Row Item " + "Batman";
@ -95,7 +95,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
string itemName = "Row Item " + "Rook";
@ -131,7 +131,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Items in Batman.zip
string firstItemName = "Row Item " + "Batman";
@ -173,7 +173,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate To Local Library
testRunner.ClickByName("Library Tab");
@ -211,7 +211,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate to Local Library
testRunner.ClickByName("Library Tab");
testRunner.NavigateToFolder("Local Library Row Item Collection");
@ -250,7 +250,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate to Local Library
testRunner.ClickByName("Library Tab");
testRunner.NavigateToFolder("Local Library Row Item Collection");
@ -279,7 +279,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate to Local Library
testRunner.ClickByName("Library Tab");
testRunner.NavigateToFolder("Local Library Row Item Collection");
@ -310,7 +310,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate to Local Library
testRunner.ClickByName("Library Tab");
testRunner.NavigateToFolder("Local Library Row Item Collection");
@ -361,7 +361,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate to Local Library
testRunner.ClickByName("Library Tab");
@ -410,7 +410,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate to Local Library
testRunner.ClickByName("Library Tab");
@ -472,7 +472,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate to Local Library
testRunner.ClickByName("Library Tab");

View file

@ -16,7 +16,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("SettingsAndControls", 5);
testRunner.Wait(2);
testRunner.ClickByName("Options Tab", 6);
@ -44,7 +44,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("SettingsAndControls", 5);
testRunner.ClickByName("Options Tab", 6);

View file

@ -18,7 +18,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
SystemWindow systemWindow;
string copyButtonName = "3D View Copy";
@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
SystemWindow systemWindow;
@ -119,7 +119,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
SystemWindow systemWindow;
@ -171,7 +171,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
SystemWindow systemWindow;
@ -237,7 +237,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
SystemWindow systemWindow;
@ -298,7 +298,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Navigate to Local Library
testRunner.ClickByName("Library Tab");

View file

@ -47,7 +47,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Make sure image does not exist before we click the buy button
testRunner.MatchLimit = 500000;
@ -70,9 +70,9 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
// Tests that clicking the create button opens create tools plugin window
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Make sure that plugin window does not exist
bool pluginWindowExists1 = testRunner.WaitForName("Plugin Chooser Window", 0);
@ -99,7 +99,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
AutomationTest testToRun = (testRunner) =>
{
// Tests that clicking the queue export button with a single item selected opens export item window
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//Make sure that the export window does not exist
bool exportWindowExists1 = testRunner.WaitForName("Export Item Window", 0);
@ -121,7 +121,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
//bool exportButtonExists = testRunner.NameExists("Export Queue Button");
bool exportButtonExists = testRunner.WaitForName("Export Queue Button", 10);
@ -139,7 +139,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
// Tests that clicking a queue item thumbnail opens a Part Preview window
@ -165,7 +165,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/* Tests that when the Queue Copy button is clicked:
* 1. The Queue Tab Count is increased by one
* 2. A Queue Row item is created and added to the queue with the correct name
@ -201,7 +201,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
* Tests that Queue Add button adds a single part to queue:
@ -240,7 +240,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
* Tests that Add button can add multiple files to the print queue:
@ -284,7 +284,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
*Tests that when one item is selected
*1. Queue Item count equals three before the test starts
@ -317,7 +317,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
*Tests that when the edit button is clicked we go into editmode (print queue items have checkboxes on them)
*1. After Edit button is clicked print queue items have check boxes
@ -366,7 +366,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
*Tests that when one item is selected
*1. Queue Item count equals three before the test starts
@ -402,7 +402,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
*Tests that when one item is selected
*1. Queue Item count equals three before the test starts
@ -443,7 +443,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
*Tests Export to Zip menu item is clicked the queue is compressed and exported to location on disk
*1. Check that there are items in the queue
@ -522,7 +522,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
int queueItemCountBeforeRemoveAllClicked = QueueData.Instance.Count;
@ -554,7 +554,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
Assert.IsTrue(QueueData.Instance.Count == 4, "Queue has expected 3 items, including default Coin");
// Assert that widgets exists
@ -586,7 +586,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
*Tests that when the Remove All menu item is clicked
*1. Queue Item count is set to zero
@ -636,7 +636,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/*
*Tests:
@ -682,7 +682,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/* Tests that when the Queue Copy button is clicked:
* 1. QueueCount = Zero
@ -721,7 +721,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
/* Tests that when the Queue Copy button is clicked:
* 1. QueueCount = Zero
@ -759,7 +759,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
int queueCountBeforeTest = QueueData.Instance.Count;

View file

@ -17,7 +17,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");

View file

@ -21,7 +21,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
@ -60,7 +60,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner, MatterControlUtilities.PrepAction.CloseSignInAndPrinterSelect);
testRunner.CloseSignInAndPrinterSelect();
using (var emulatorProcess = testRunner.LaunchAndConnectToPrinterEmulator())
{
@ -115,7 +115,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
@ -140,7 +140,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
// assert no profiles
Assert.IsTrue(ProfileManager.Instance.ActiveProfiles.Count() == 0);
@ -190,7 +190,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
@ -220,7 +220,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");

View file

@ -17,7 +17,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
AutomationTest testToRun = (testRunner) =>
{
MatterControlUtilities.PrepForTestRun(testRunner);
testRunner.CloseSignInAndPrinterSelect();
testRunner.ClickByName("Library Tab", 5);