UX: ignore leading/trailing whitespaces in site settings search

pending
#1

UX: ignore leading/trailing whitespaces in site settings search

diff --git a/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6 b/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6
index 9473cbc..0728ee8 100644
--- a/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-site-settings.js.es6
@@ -12,7 +12,7 @@ export default Ember.Controller.extend({
 
     let filter;
     if (this.get("filter")) {
-      filter = this.get("filter").toLowerCase();
+      filter = this.get("filter").toLowerCase().trim();
     }
 
     if ((!filter || 0 === filter.length) && !this.get("onlyOverridden")) {
diff --git a/test/javascripts/acceptance/admin-site-settings-test.js.es6 b/test/javascripts/acceptance/admin-site-settings-test.js.es6
index 44ed23a..e52b967 100644
--- a/test/javascripts/acceptance/admin-site-settings-test.js.es6
+++ b/test/javascripts/acceptance/admin-site-settings-test.js.es6
@@ -42,7 +42,7 @@ QUnit.test("upload site setting", async assert => {
 
 QUnit.test("changing value updates dirty state", async assert => {
   await visit("/admin/site_settings");
-  await fillIn("#setting-filter", "title");
+  await fillIn("#setting-filter", " title ");
   assert.equal(count(".row.setting"), 1, "filter returns 1 site setting");
   assert.ok(!exists(".row.setting.overridden"), "setting isn't overriden");

GitHub sha: db89722a