Add reusable ClickSignOut extension method

This commit is contained in:
John Lewin 2019-01-03 14:34:31 -08:00
parent 9319932467
commit 26789cf144

View file

@ -100,14 +100,19 @@ namespace MatterHackers.MatterControl.Tests.Automation
public static void SignOutUser(this AutomationRunner testRunner)
{
testRunner.ClickByName("User Options Menu");
testRunner.ClickByName("Sign Out Menu Item");
testRunner.Delay(.5);
testRunner.ClickSignOut();
// Rather than waiting a fixed amount of time, we wait for the ReloadAll to complete before returning
testRunner.WaitForReloadAll(() => testRunner.ClickByName("Yes Button"));
}
public static void ClickSignOut(this AutomationRunner testRunner)
{
testRunner.ClickByName("User Options Menu");
testRunner.ClickByName("Sign Out Menu Item");
testRunner.Delay(.5);
}
public static void WaitForReloadAll(this AutomationRunner testRunner, Action reloadAllAction)
{
// Wire up a block and release mechanism to wait until the sign in process has completed