mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:31:18 +08:00
FIX: makes select-kit match searches with accents (filter and content)
This commit is contained in:
@ -779,3 +779,49 @@ componentTest("with minimumLabel", {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
componentTest("with accents in filter", {
|
||||
template: "{{single-select content=content filterable=true}}",
|
||||
|
||||
beforeEach() {
|
||||
this.set("content", ["sam", "jeff", "neil"]);
|
||||
},
|
||||
|
||||
test(assert) {
|
||||
this.get("subject").expand();
|
||||
this.get("subject").fillInFilter("jéff");
|
||||
|
||||
andThen(() => {
|
||||
assert.equal(this.get("subject").rows().length, 1);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
.rowByIndex(0)
|
||||
.name(),
|
||||
"jeff"
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
componentTest("with accents in content", {
|
||||
template: "{{single-select content=content filterable=true}}",
|
||||
|
||||
beforeEach() {
|
||||
this.set("content", ["sam", "jéff", "neil"]);
|
||||
},
|
||||
|
||||
test(assert) {
|
||||
this.get("subject").expand();
|
||||
this.get("subject").fillInFilter("jeff");
|
||||
|
||||
andThen(() => {
|
||||
assert.equal(this.get("subject").rows().length, 1);
|
||||
assert.equal(
|
||||
this.get("subject")
|
||||
.rowByIndex(0)
|
||||
.name(),
|
||||
"jéff"
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user