From 88b4c54fc4337ae435bcc0e91326b6bda14fa6f7 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sun, 18 Nov 2018 12:01:12 -0600 Subject: [PATCH] Ensure that the settings store gets updated. --- src/test/GUI/test_preset_chooser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/GUI/test_preset_chooser.cpp b/src/test/GUI/test_preset_chooser.cpp index b09033653..b9613a68f 100644 --- a/src/test/GUI/test_preset_chooser.cpp +++ b/src/test/GUI/test_preset_chooser.cpp @@ -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(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." ) {