diff --git a/spec/system/admin_site_setting_requires_confirmation_spec.rb b/spec/system/admin_site_setting_requires_confirmation_spec.rb index 74d883f0fcd..802f70d6a73 100644 --- a/spec/system/admin_site_setting_requires_confirmation_spec.rb +++ b/spec/system/admin_site_setting_requires_confirmation_spec.rb @@ -26,6 +26,7 @@ describe "Admin Site Setting Requires Confirmation", type: :system do ) dialog.click_yes expect(dialog).to be_closed + expect(settings_page).to have_overridden_setting("min_password_length") expect(SiteSetting.min_password_length).to eq(12) end diff --git a/spec/system/page_objects/pages/admin_site_settings.rb b/spec/system/page_objects/pages/admin_site_settings.rb index 0dda8a46249..09d92c3d59a 100644 --- a/spec/system/page_objects/pages/admin_site_settings.rb +++ b/spec/system/page_objects/pages/admin_site_settings.rb @@ -22,8 +22,10 @@ module PageObjects self end - def find_setting(setting_name) - find(".admin-detail .row.setting[data-setting='#{setting_name}']") + def find_setting(setting_name, overridden: false) + find( + ".admin-detail .row.setting[data-setting='#{setting_name}']#{overridden ? ".overridden" : ""}", + ) end def toggle_setting(setting_name, text = "") @@ -49,6 +51,10 @@ module PageObjects setting_element.find(".setting-controls button.ok").click end + def has_overridden_setting?(setting_name) + find_setting(setting_name, overridden: true) + end + def values_in_list(setting_name) vals = [] setting = find(".admin-detail .row.setting[data-setting='#{setting_name}']")