Added test to make sure Bed Temperature options are not visible while "Has Heated Bed" checkbox is unchecked
This commit is contained in:
parent
1e4c1cda53
commit
f08680e9c9
3 changed files with 54 additions and 0 deletions
|
|
@ -112,5 +112,57 @@ namespace MatterHackers.MatterControl.UI
|
|||
Assert.IsTrue(testHarness.AllTestsPassed);
|
||||
Assert.IsTrue(testHarness.TestCount == 0); // make sure we ran all our tests
|
||||
}
|
||||
|
||||
[Test, RequiresSTA, RunInApplicationDomain]
|
||||
public void HasHeatedBedCheckedHidesBedTemperatureOptions()
|
||||
{
|
||||
// Run a copy of MatterControl
|
||||
Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
|
||||
{
|
||||
AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
|
||||
{
|
||||
|
||||
MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);
|
||||
|
||||
//Navigate to Settings Tab and make sure Bed Temp Text box is visible
|
||||
testRunner.ClickByName("SettingsAndControls");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("User Level Dropdown");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Advanced Menu Item");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Filament Tab");
|
||||
testRunner.Wait(1);
|
||||
resultsHarness.AddTestResult(testRunner.WaitForName("Bed Temperature Textbox", 2));
|
||||
|
||||
//Uncheck Has Heated Bed checkbox and make sure Bed Temp Textbox is not visible
|
||||
testRunner.ClickByName("Printer Tab");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Features Tab");
|
||||
testRunner.Wait(1);
|
||||
testRunner.ClickByName("Has Heated Bed Checkbox");
|
||||
testRunner.Wait(.5);
|
||||
testRunner.ClickByName("Filament Tab");
|
||||
testRunner.Wait(1);
|
||||
bool bedTemperatureTextBoxVisible = testRunner.WaitForName("Bed Temperature Textbox", 2);
|
||||
resultsHarness.AddTestResult(bedTemperatureTextBoxVisible == false);
|
||||
|
||||
//Make sure Bed Temperature Options are not visible in printer controls
|
||||
testRunner.ClickByName("Controls Tab");
|
||||
bool bedTemperatureControlsWidget = testRunner.WaitForName("Bed Temperature Controls Widget", 2);
|
||||
resultsHarness.AddTestResult(bedTemperatureTextBoxVisible == false);
|
||||
|
||||
|
||||
|
||||
|
||||
MatterControlUtilities.CloseMatterControl(testRunner);
|
||||
}
|
||||
};
|
||||
|
||||
AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);
|
||||
|
||||
Assert.IsTrue(testHarness.AllTestsPassed);
|
||||
Assert.IsTrue(testHarness.TestCount == 3); // make sure we ran all our tests
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue