2017-05-21 22:08:32 -07:00
|
|
|
|
using System.Threading;
|
2016-10-25 06:17:37 -07:00
|
|
|
|
using System.Threading.Tasks;
|
2016-09-21 15:34:53 -07:00
|
|
|
|
using MatterHackers.Agg.UI;
|
2015-08-28 17:55:50 -07:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
2016-05-11 09:13:56 -07:00
|
|
|
|
namespace MatterHackers.MatterControl.Tests.Automation
|
2015-08-28 17:55:50 -07:00
|
|
|
|
{
|
2018-04-30 15:40:47 -07:00
|
|
|
|
[TestFixture, Category("Agg.UI.Automation"), Apartment(ApartmentState.STA), RunInApplicationDomain]
|
2015-08-28 17:55:50 -07:00
|
|
|
|
public class ShowTerminalButtonClickedOpensTerminal
|
|
|
|
|
|
{
|
2018-04-30 15:40:47 -07:00
|
|
|
|
[Test]
|
2016-10-25 06:17:37 -07:00
|
|
|
|
public async Task ClickingShowTerminalButtonOpensTerminal()
|
2015-08-28 17:55:50 -07:00
|
|
|
|
{
|
2017-05-21 22:08:32 -07:00
|
|
|
|
await MatterControlUtilities.RunTest((testRunner) =>
|
2015-08-28 17:55:50 -07:00
|
|
|
|
{
|
2017-09-16 09:17:08 -07:00
|
|
|
|
testRunner.AddAndSelectPrinter("Airwolf 3D", "HD");
|
2015-08-28 17:55:50 -07:00
|
|
|
|
|
2017-06-13 17:00:27 -07:00
|
|
|
|
Assert.IsFalse(testRunner.WaitForName("TerminalWidget", 0.5), "Terminal Window should not exist");
|
2015-08-28 17:55:50 -07:00
|
|
|
|
|
2018-09-10 10:42:18 -07:00
|
|
|
|
// when we start up a new session the Terminal Sidebar should not be present
|
|
|
|
|
|
Assert.IsFalse(testRunner.WaitForName("Terminal Sidebar", 0.5), "Terminal Sidebar should not exist");
|
|
|
|
|
|
|
|
|
|
|
|
testRunner.SwitchToTerminalTab();
|
2015-12-22 11:34:04 -08:00
|
|
|
|
|
2017-06-13 17:00:27 -07:00
|
|
|
|
Assert.IsTrue(testRunner.WaitForName("TerminalWidget"), "Terminal Window should exists after Show Terminal button is clicked");
|
2016-10-25 06:17:37 -07:00
|
|
|
|
|
2017-06-04 08:35:29 -07:00
|
|
|
|
return Task.CompletedTask;
|
2017-05-21 22:08:32 -07:00
|
|
|
|
});
|
2015-08-28 17:55:50 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|