Made a test to prove overrides persist on top of user overrides.
This commit is contained in:
parent
83a3c87557
commit
1e192d3cd0
3 changed files with 49 additions and 0 deletions
|
|
@ -234,4 +234,48 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
await MatterControlUtilities.RunTest(testToRun, overrideWidth: 550);
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixture, Category("MatterControl.UI.Automation"), RunInApplicationDomain]
|
||||
public class QualitySettingsStayAsOverrides
|
||||
{
|
||||
[Test, Apartment(ApartmentState.STA)]
|
||||
public async Task SettingsStayAsOverrides()
|
||||
{
|
||||
AutomationTest testToRun = (testRunner) =>
|
||||
{
|
||||
testRunner.CloseSignInAndPrinterSelect();
|
||||
|
||||
// Add Guest printers
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");
|
||||
MatterControlUtilities.SwitchToAdvancedSettings(testRunner);
|
||||
|
||||
|
||||
testRunner.ClickByName(SettingsKey.layer_height + " edit", 2);
|
||||
testRunner.Type(".5\n");
|
||||
testRunner.Wait(.5);
|
||||
Assert.AreEqual(ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.layer_height), .5, "Layer height is what we set it to");
|
||||
testRunner.ClickByName("Quality", 2);
|
||||
testRunner.ClickByName("Fine Menu", 2);
|
||||
|
||||
testRunner.Wait(.5);
|
||||
Assert.AreEqual(ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.layer_height), .1, "Layer height is the fine override");
|
||||
|
||||
MatterControlUtilities.AddAndSelectPrinter(testRunner, "BCN", "Sigma");
|
||||
|
||||
// Check Guest printer count
|
||||
Assert.AreEqual(2, ProfileManager.Instance.ActiveProfiles.Count(), "ProfileManager has 2 Profiles");
|
||||
|
||||
// Check if Guest printer names exists in dropdown
|
||||
testRunner.ClickByName("Printers... Menu", 2);
|
||||
testRunner.ClickByName("Airwolf 3D HD Menu Item", 5);
|
||||
|
||||
testRunner.Wait(1);
|
||||
Assert.AreEqual(ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.layer_height), .1, "Layer height is the fine override");
|
||||
|
||||
return Task.FromResult(0);
|
||||
};
|
||||
|
||||
await MatterControlUtilities.RunTest(testToRun, maxTimeToRun: 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue