Fixing tests

This commit is contained in:
LarsBrubaker 2022-06-19 20:13:32 -07:00
parent e91decdc12
commit fb86f7c96b
6 changed files with 19 additions and 10 deletions

View file

@ -78,7 +78,12 @@ namespace MatterHackers.MatterControl.SetupWizard
var profile = ProfileManager.Instance[printer.Settings.ID];
var results = await ApplicationController.GetProfileHistory?.Invoke(profile.DeviceToken);
Dictionary<string, string> results = null;
if (ApplicationController.GetProfileHistory != null)
{
results = await ApplicationController.GetProfileHistory.Invoke(profile.DeviceToken);
}
printerProfileData = results;
if(printerProfileData != null)
{

View file

@ -580,7 +580,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
private static async Task<PrinterSettings> GetFirstValidHistoryItem(PrinterInfo printerInfo)
{
var recentProfileHistoryItems = await ApplicationController.GetProfileHistory?.Invoke(printerInfo.DeviceToken);
Dictionary<string, string> recentProfileHistoryItems = null;
if (ApplicationController.GetProfileHistory != null)
{
recentProfileHistoryItems = await ApplicationController.GetProfileHistory.Invoke(printerInfo.DeviceToken);
}
if (recentProfileHistoryItems != null)
{
// Iterate history, skipping the first item, limiting to the next five, attempt to load and return the first success

@ -1 +1 @@
Subproject commit 6e895b37b881cd6d00b0247ac349fa19538ca76a
Subproject commit 338231d1f1bafe87d200435b065035846e75ca60

View file

@ -406,7 +406,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
// print a part
testRunner.AddItemToBed()
.AddItemToBed(partName: "Row Item Set Temperature")
.AddItemToBed("Scripting Row Item Collection", "Row Item Set Temperature")
.DragDropByName("MoveInZControl", "MoveInZControl", offsetDrag: new Point2D(0, 0), offsetDrop: new Point2D(0, 10))
.ClickByName("Temperature Edit")
.Type("222.2")

View file

@ -586,6 +586,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
.SwitchToSliceSettings()
.ClickByName("Slice Settings Overflow Menu")
.ClickByName("Advanced Menu Item")
.Delay()
.SelectSliceSettingsField(SettingsKey.bed_temperature)
.SelectSliceSettingsField(SettingsKey.temperature)
// Uncheck Has Heated Bed checkbox and make sure Bed Temp Textbox is not visible

View file

@ -717,6 +717,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
break;
case "Calibration Parts Row Item Collection":
case "Scripting Row Item Collection":
case "Primitives Row Item Collection":
// If visible, navigate into Libraries container before opening target
testRunner.DoubleClickByName("Design Apps Row Item Collection")
@ -1289,13 +1290,10 @@ namespace MatterHackers.MatterControl.Tests.Automation
if (!testRunner.NameExists("Printer Tab", 0.1))
{
testRunner.ClickByName("Printer Overflow Menu")
.ClickByName("Show Printer Menu Item");
if (!pinSettingsOpen)
{
.Delay()
.ClickByName("Show Printer Menu Item")
// close the menu
testRunner.ClickByName("Printer Overflow Menu");
}
.ClickByName("Printer Overflow Menu");
}
if (pinSettingsOpen)