Validate Close confirm dialog works as expected
- Issue MatterHackers/MCCentral#2352 Abort dialog has no effect - MatterControl exits
This commit is contained in:
parent
7900faeb01
commit
07a9dcfc28
1 changed files with 18 additions and 0 deletions
|
|
@ -581,6 +581,17 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
};
|
||||
resetEvent.WaitOne();
|
||||
|
||||
// Click close but cancel
|
||||
testRunner.CloseMatterControlViaUi();
|
||||
testRunner.ClickByName("No Button");
|
||||
|
||||
// Wait for close
|
||||
testRunner.WaitVanishForName("Yes Button", 4);
|
||||
testRunner.Delay(2);
|
||||
|
||||
// Confirm abort
|
||||
Assert.IsFalse(MatterControlApplication.Instance.HasBeenClosed, "Canceling Close dialog should *not* close MatterControl");
|
||||
|
||||
// Close MatterControl and cancel print
|
||||
testRunner.CloseMatterControlViaUi();
|
||||
testRunner.ClickByName("Yes Button");
|
||||
|
|
@ -588,6 +599,13 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
// Wait for Disconnected CommunicationState which occurs after PrinterConnection.Disable()
|
||||
testRunner.WaitForCommunicationStateDisconnected(maxSeconds: 30);
|
||||
|
||||
// Wait for close
|
||||
testRunner.WaitVanishForName("Yes Button", 4);
|
||||
testRunner.Delay(2);
|
||||
|
||||
// Confirm close
|
||||
Assert.IsTrue(MatterControlApplication.Instance.HasBeenClosed, "Confirming Close dialog *should* close MatterControl");
|
||||
|
||||
// Wait for M106 change
|
||||
testRunner.Delay(() => fanChangedCount > 0, 15, 500);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue