Make AddAndSelectPrinter an extension method
This commit is contained in:
parent
f342460a84
commit
2233529a68
5 changed files with 13 additions and 13 deletions
|
|
@ -19,7 +19,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
string firstItemName = "Queue Item Batman";
|
||||
//Navigate to Downloads Library Provider
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
// Add printer that has hardware leveling
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
testRunner.SwitchToAdvancedSliceSettings();
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
Assert.IsFalse(testRunner.WaitForName("Print Leveling Tab", 3), "Print leveling should not exist for an Airwolf HD");
|
||||
|
||||
// Add printer that does not have hardware leveling
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "3D Factory", "MendelMax 1.5");
|
||||
testRunner.AddAndSelectPrinter("3D Factory", "MendelMax 1.5");
|
||||
|
||||
testRunner.ClickByName("Slice Settings Tab", 1);
|
||||
testRunner.ClickByName("Printer Tab", 1);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
testRunner.SwitchToAdvancedSliceSettings();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
testRunner.AddTestAssetsToLibrary("Rook.amf");
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
// Navigate to Local Library
|
||||
testRunner.SwitchToAdvancedSliceSettings();
|
||||
|
|
@ -196,7 +196,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
}
|
||||
}, ref unregisterEvents);
|
||||
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
// Navigate to Local Library
|
||||
testRunner.SwitchToAdvancedSliceSettings();
|
||||
|
|
@ -224,7 +224,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// assert no profiles
|
||||
Assert.AreEqual(0, ProfileManager.Instance.ActiveProfiles.Count());
|
||||
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
// assert one profile
|
||||
Assert.AreEqual(1, ProfileManager.Instance.ActiveProfiles.Count(), "One profile should exist after add");
|
||||
|
|
@ -266,7 +266,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
// Navigate to Settings Tab and make sure Bed Temp Text box is visible
|
||||
testRunner.SwitchToAdvancedSliceSettings();
|
||||
|
|
@ -304,7 +304,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
await MatterControlUtilities.RunTest((testRunner) =>
|
||||
{
|
||||
// Add Guest printers
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
testRunner.SwitchToAdvancedSliceSettings();
|
||||
|
||||
testRunner.ClickByName("Layer Height Textbox", 2);
|
||||
|
|
@ -317,7 +317,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.Delay(.5);
|
||||
Assert.AreEqual(ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.layer_height), .1, "Layer height is the fine override");
|
||||
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "BCN", "Sigma");
|
||||
testRunner.AddAndSelectPrinter("BCN", "Sigma");
|
||||
|
||||
// Check Guest printer count
|
||||
Assert.AreEqual(2, ProfileManager.Instance.ActiveProfiles.Count(), "ProfileManager has 2 Profiles");
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
var config = TestAutomationConfig.Load();
|
||||
|
||||
// Create the printer
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, make, model);
|
||||
testRunner.AddAndSelectPrinter(make, model);
|
||||
|
||||
var emulator = new Emulator();
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.WaitForReloadAll(() => testRunner.ClickByName("Yes Button", 5));
|
||||
}
|
||||
|
||||
public static void AddAndSelectPrinter(AutomationRunner testRunner, string make, string model)
|
||||
public static void AddAndSelectPrinter(this AutomationRunner testRunner, string make, string model)
|
||||
{
|
||||
if (!testRunner.WaitForName("Select Make", 1))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue