Ensure that the settings store gets updated.

This commit is contained in:
Joseph Lenox 2018-11-18 12:01:12 -06:00 committed by Joseph Lenox
parent eda5ef3639
commit 88b4c54fc4

View File

@ -110,6 +110,7 @@ SCENARIO( "PresetChooser changed printer") {
SCENARIO( "PresetChooser Preset loading" ) {
Print fake_print;
Settings default_settings;
auto& settings_presets = default_settings.default_presets;
wxUIActionSimulator sim;
wxTestableFrame* old = dynamic_cast<wxTestableFrame*>(wxTheApp->GetTopWindow());
old->Destroy();
@ -157,6 +158,11 @@ SCENARIO( "PresetChooser Preset loading" ) {
REQUIRE(cut._chooser_names()[get_preset(group)].at(0) != wxString("- default -"));
}
}
THEN( "Settings are updated to match selected." ) {
REQUIRE(settings_presets[get_preset(preset_t::Print)].at(0) == wxString("print-profile"));
REQUIRE(settings_presets[get_preset(preset_t::Printer)].at(0) == wxString("printer-profile"));
REQUIRE(settings_presets[get_preset(preset_t::Material)].at(0) == wxString("material-profile"));
}
}
}
GIVEN( "A PresetChooser object and a Settings indicating that print-profile is the default option." ) {