UX: ignore leading/trailing whitespaces in site settings search
This commit is contained in:
parent
b9fcb2bcdf
commit
db89722a98
|
@ -12,7 +12,7 @@ export default Ember.Controller.extend({
|
||||||
|
|
||||||
let filter;
|
let filter;
|
||||||
if (this.get("filter")) {
|
if (this.get("filter")) {
|
||||||
filter = this.get("filter").toLowerCase();
|
filter = this.get("filter").toLowerCase().trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!filter || 0 === filter.length) && !this.get("onlyOverridden")) {
|
if ((!filter || 0 === filter.length) && !this.get("onlyOverridden")) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ QUnit.test("upload site setting", async assert => {
|
||||||
|
|
||||||
QUnit.test("changing value updates dirty state", async assert => {
|
QUnit.test("changing value updates dirty state", async assert => {
|
||||||
await visit("/admin/site_settings");
|
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.equal(count(".row.setting"), 1, "filter returns 1 site setting");
|
||||||
assert.ok(!exists(".row.setting.overridden"), "setting isn't overriden");
|
assert.ok(!exists(".row.setting.overridden"), "setting isn't overriden");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue