FIX: Toggling overridden settings broke in #21572 (#22831)

This commit is contained in:
Jarek Radosz 2023-07-27 19:41:42 +02:00 committed by GitHub
parent 291629834d
commit a44378a1b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import { inject as service } from "@ember/service";
export default class AdminSiteSettingsController extends Controller {
@service router;
filter = null;
filter = "";
@alias("model") allSiteSettings;

View File

@ -1,5 +1,4 @@
<div class="admin-controls">
<div class="controls">
<div class="inline-form">
<DButton
@ -21,9 +20,14 @@
/>
</div>
</div>
<div class="search controls">
<label>
<Input @type="checkbox" @checked={{this.onlyOverridden}} />
<Input
@type="checkbox"
@checked={{this.onlyOverridden}}
class="toggle-overridden"
/>
{{i18n "admin.settings.show_overriden"}}
</label>
</div>

View File

@ -128,6 +128,14 @@ acceptance("Admin - Site Settings", function (needs) {
assert.strictEqual(count(".row.setting"), 1);
});
test("filtering overridden settings", async function (assert) {
await visit("/admin/site_settings");
assert.dom(".row.setting").exists({ count: 4 });
await click(".toggle-overridden");
assert.dom(".row.setting").exists({ count: 2 });
});
test("filter settings by plugin name", async function (assert) {
await visit("/admin/site_settings");