mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:09:33 +08:00
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;
|
||||
if (this.get("filter")) {
|
||||
filter = this.get("filter").toLowerCase();
|
||||
filter = this.get("filter").toLowerCase().trim();
|
||||
}
|
||||
|
||||
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 => {
|
||||
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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user