Ensure bedplate is saved before slicing

- Remove cheat in AddSelectedItemToBedplate helper which saved bed
- Invoke PersistePlateIfNeeded before slicing
- Mark plate as dirty when adding items
- Make SaveChanges awaitable so slicing queues until save is done
- Remove unused Action in functionToCallOnSaveAs delegate
- Change saveas delegate to support new awaitable signature
This commit is contained in:
John Lewin 2017-06-05 09:27:30 -07:00
parent d205cc6e13
commit 2a9e70c28c
7 changed files with 34 additions and 30 deletions

View file

@ -401,21 +401,18 @@ namespace MatterHackers.MatterControl.Tests.Automation
testRunner.ClickByName(partName);
testRunner.AddSelectedItemToBedplate();
testRunner.Delay(1);
}
public static void AddSelectedItemToBedplate(this AutomationRunner testRunner)
{
testRunner.ClickByName("Print Library Overflow Menu");
testRunner.ClickByName("Add to Plate Menu Item");
testRunner.ClickByName("Save Button");
testRunner.Delay(1);
}
public static void WaitForPrintFinished(this AutomationRunner testRunner)
{
testRunner.Delay(() => PrinterConnectionAndCommunication.Instance.CommunicationState == PrinterConnectionAndCommunication.CommunicationStates.FinishedPrint, 120);
testRunner.Delay(() => PrinterConnectionAndCommunication.Instance.CommunicationState == PrinterConnectionAndCommunication.CommunicationStates.FinishedPrint, 500);
}
public static async Task RunTest(