Update automation tests to account for printer settings changes
This commit is contained in:
parent
ab06c792c3
commit
c5ea8bb3c0
5 changed files with 32 additions and 28 deletions
|
|
@ -16,20 +16,16 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Add printer that has hardware leveling
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
testRunner.SwitchToSliceSettings();
|
||||
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.Delay(.2);
|
||||
|
||||
Assert.IsFalse(testRunner.WaitForName("Print Leveling Tab", .5), "Print leveling should not exist for an Airwolf HD");
|
||||
testRunner.SwitchToPrinterSettings();
|
||||
testRunner.ClickByName("Features Tab");
|
||||
Assert.IsFalse(testRunner.WaitForName("print_leveling_solution Row", .5), "Print leveling should not exist for an Airwolf HD");
|
||||
|
||||
// Add printer that does not have hardware leveling
|
||||
testRunner.AddAndSelectPrinter("3D Factory", "MendelMax 1.5");
|
||||
|
||||
testRunner.ClickByName("Slice Settings Tab");
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
|
||||
Assert.IsTrue(testRunner.WaitForName("Print Leveling Tab"), "Print leveling should exist for a 3D Factory MendelMax");
|
||||
testRunner.SwitchToPrinterSettings();
|
||||
testRunner.ClickByName("Features Tab");
|
||||
Assert.IsTrue(testRunner.WaitForName("print_leveling_solution Row"), "Print leveling should exist for a 3D Factory MendelMax");
|
||||
|
||||
return Task.CompletedTask;
|
||||
}, overrideHeight: 800);
|
||||
|
|
|
|||
|
|
@ -21,17 +21,17 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
|
||||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
testRunner.SwitchToSliceSettings();
|
||||
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.SwitchToPrinterSettings();
|
||||
|
||||
testRunner.ClickByName("Printer Name Field");
|
||||
|
||||
var textWidget = testRunner.GetWidgetByName("Printer Name Field", out _);
|
||||
string newName = "Updated name";
|
||||
textWidget.Text = newName;
|
||||
|
||||
// Force loose focus
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.Delay(4);
|
||||
testRunner.Delay(1);
|
||||
|
||||
//Check to make sure the Printer dropdown gets the name change
|
||||
testRunner.OpenPrintersDropdown();
|
||||
|
|
|
|||
|
|
@ -27,10 +27,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
Assert.IsTrue(ProfileManager.Instance.ActiveProfile != null);
|
||||
|
||||
testRunner.SwitchToSliceSettings();
|
||||
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.ClickByName("Custom G-Code Tab");
|
||||
testRunner.SwitchToPrinterSettings();
|
||||
testRunner.ClickByName("G-Code Tab");
|
||||
testRunner.ClickByName("End G-Code Field");
|
||||
testRunner.Type("^a");
|
||||
testRunner.Type("{BACKSPACE}");
|
||||
|
|
|
|||
|
|
@ -142,9 +142,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
||||
|
||||
// Navigate to Local Library
|
||||
testRunner.SwitchToSliceSettings();
|
||||
testRunner.SwitchToPrinterSettings();
|
||||
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.ClickByName("Features Tab");
|
||||
|
||||
// Find any sibling toggle switch and scroll the parent to the bottom
|
||||
|
|
@ -167,10 +166,6 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
{
|
||||
using (var emulator = testRunner.LaunchAndConnectToPrinterEmulator())
|
||||
{
|
||||
// Navigate to Local Library
|
||||
testRunner.SwitchToSliceSettings();
|
||||
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.ClickByName("Features Tab");
|
||||
|
||||
// only 1 hotend and 1 extruder
|
||||
|
|
@ -252,7 +247,9 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// and the on toggle is showing off
|
||||
Assert.IsFalse(heatToggle.Checked);
|
||||
|
||||
testRunner.ClickByName("Extruder Tab");
|
||||
// Collapse the popup and switch back to the general tab
|
||||
testRunner.ClickByName("Hotend 0");
|
||||
testRunner.ClickByName("General Tab");
|
||||
|
||||
testRunner.ClickByName(SliceSettingsOrganizer.Instance.GetSettingsData(SettingsKey.extruder_count).PresentationName + " Field");
|
||||
testRunner.Type("2");
|
||||
|
|
@ -400,7 +397,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ClickByName("Bed Temperature Field");
|
||||
|
||||
// Uncheck Has Heated Bed checkbox and make sure Bed Temp Textbox is not visible
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.SwitchToPrinterSettings();
|
||||
testRunner.ClickByName("Features Tab");
|
||||
|
||||
// Scroll the 'Has Heated Bed' field into view
|
||||
|
|
|
|||
|
|
@ -216,8 +216,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
ActiveSliceSettings.Instance.SetValue("driver_type", "Emulator");
|
||||
|
||||
// edit the com port
|
||||
testRunner.ClickByName("Slice Settings Sidebar");
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.SwitchToPrinterSettings();
|
||||
|
||||
var serialPortDropDown = testRunner.GetWidgetByName("com_port Field", out _, 1);
|
||||
|
||||
testRunner.WaitFor(() => serialPortDropDown.Enabled); // Wait until the serialPortDropDown is ready to click it. Ensures the printer is loaded.
|
||||
|
|
@ -725,6 +725,19 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.ClickByName("General Tab");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Switch to printer settings
|
||||
/// </summary>
|
||||
/// <param name="testRunner"></param>
|
||||
public static void SwitchToPrinterSettings(this AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.SwitchToSliceSettings();
|
||||
|
||||
testRunner.ClickByName("Printer Overflow Menu");
|
||||
testRunner.ClickByName("Configure Printer Menu Item");
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Switch to Printer -> Controls
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue