Move CloseMatterControl responsiblity outside of TestMethod
- Behavior is now invoked in parent RunTest call
This commit is contained in:
parent
28699c9197
commit
4d3f5d2521
15 changed files with 6 additions and 128 deletions
|
|
@ -99,7 +99,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
return TestContext.CurrentContext.ResolveProjectPath(4, "Tests", "TestData", "QueueItems", queueItemToLoad);
|
||||
}
|
||||
|
||||
public static void CloseMatterControl(AutomationRunner testRunner)
|
||||
private static void CloseMatterControlViaMenu(AutomationRunner testRunner)
|
||||
{
|
||||
SystemWindow mcWindowLocal = MatterControlApplication.Instance;
|
||||
testRunner.ClickByName("File Menu", 5);
|
||||
|
|
@ -383,7 +383,11 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
}
|
||||
|
||||
MatterControlApplication matterControlWindow = MatterControlApplication.CreateInstance(overrideWidth, overrideHeight);
|
||||
return AutomationRunner.ShowWindowAndExecuteTests(matterControlWindow, testMethod, maxTimeToRun, defaultTestImages);
|
||||
var testRunner = AutomationRunner.ShowWindowAndExecuteTests(matterControlWindow, testMethod, maxTimeToRun, defaultTestImages);
|
||||
|
||||
MatterControlUtilities.CloseMatterControlViaMenu(testRunner);
|
||||
|
||||
return testRunner;
|
||||
}
|
||||
|
||||
public static void LibraryAddSelectionToQueue(AutomationRunner testRunner)
|
||||
|
|
|
|||
|
|
@ -115,8 +115,6 @@ namespace MatterControl.Tests
|
|||
testRunner.AddTestResult(testRunner.NameExists("SettingsAndControls"));
|
||||
|
||||
MatterControlUtilities.SwitchToAdvancedSettings(testRunner);
|
||||
|
||||
MatterControlUtilities.CloseMatterControl(testRunner);
|
||||
};
|
||||
|
||||
AutomationRunner testHarness = MatterControlUtilities.RunTest(testToRun, maxTimeToRun: 200);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue