UX: ignore leading/trailing whitespaces in site settings search

This commit is contained in:
Régis Hanol 2019-05-15 22:22:20 +02:00
parent b9fcb2bcdf
commit db89722a98
2 changed files with 2 additions and 2 deletions

View File

@ -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")) {

View File

@ -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");