Finished the temperature widget tests and implementation

Refactoring extruder to hotend where true
This commit is contained in:
Lars Brubaker 2017-09-08 10:23:28 -07:00
parent 5ab80cf0ee
commit 9479c2a061
9 changed files with 300 additions and 251 deletions

View file

@ -44,8 +44,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
testRunner.WaitForPrintFinished();
// Wait for expected temp
testRunner.Delay(() => PrinterConnection.Instance.GetActualExtruderTemperature(0) <= 0, 5);
Assert.Less(PrinterConnection.Instance.GetActualExtruderTemperature(0), 30);
testRunner.Delay(() => PrinterConnection.Instance.GetActualHotendTemperature(0) <= 0, 5);
Assert.Less(PrinterConnection.Instance.GetActualHotendTemperature(0), 30);
// Wait for expected temp
testRunner.Delay(() => PrinterConnection.Instance.ActualBedTemperature <= 10, 5);

View file

@ -176,6 +176,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
{
await MatterControlUtilities.RunTest((testRunner) =>
{
AutomationRunner.TimeToMoveMouse = 0;
testRunner.CloseSignInAndPrinterSelect();
using (var emulator = testRunner.LaunchAndConnectToPrinterEmulator())
@ -205,6 +207,10 @@ namespace MatterHackers.MatterControl.Tests.Automation
testRunner.ClickByName("Material DropDown List", offset: new Point2D(-10, -10));
testRunner.ClickByName("HIPS Menu");
// check the extruder count
var extrudeButtons = testRunner.GetWidgetsByName("Extrude Button");
Assert.AreEqual(1, extrudeButtons.Count, "There should be just one.");
int hipsGoalTemp = 220;
// assert the temp changed to a new temp
Assert.AreEqual(hipsGoalTemp, tempWidget.Value, "The temp should have changed to ABS");
@ -276,8 +282,8 @@ namespace MatterHackers.MatterControl.Tests.Automation
testRunner.ClickByName("Hotend 0");
dropDownLists = testRunner.GetWidgetsByName("Material DropDown List");
//Assert.AreEqual(3, dropDownLists.Count, "There are three. The slice settings and the 2 on the pop out.");
extrudeButtons = testRunner.GetWidgetsByName("Extrude Button");
Assert.AreEqual(2, extrudeButtons.Count, "Now there should be two.");
}
return Task.CompletedTask;