mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 05:15:57 +08:00
Ensure that the settings store gets updated.
This commit is contained in:
parent
eda5ef3639
commit
88b4c54fc4
@ -110,6 +110,7 @@ SCENARIO( "PresetChooser changed printer") {
|
|||||||
SCENARIO( "PresetChooser Preset loading" ) {
|
SCENARIO( "PresetChooser Preset loading" ) {
|
||||||
Print fake_print;
|
Print fake_print;
|
||||||
Settings default_settings;
|
Settings default_settings;
|
||||||
|
auto& settings_presets = default_settings.default_presets;
|
||||||
wxUIActionSimulator sim;
|
wxUIActionSimulator sim;
|
||||||
wxTestableFrame* old = dynamic_cast<wxTestableFrame*>(wxTheApp->GetTopWindow());
|
wxTestableFrame* old = dynamic_cast<wxTestableFrame*>(wxTheApp->GetTopWindow());
|
||||||
old->Destroy();
|
old->Destroy();
|
||||||
@ -157,6 +158,11 @@ SCENARIO( "PresetChooser Preset loading" ) {
|
|||||||
REQUIRE(cut._chooser_names()[get_preset(group)].at(0) != wxString("- default -"));
|
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." ) {
|
GIVEN( "A PresetChooser object and a Settings indicating that print-profile is the default option." ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user