mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 15:51:05 +08:00
FIX: call onSelect plugin callbacks for noop rows (#6682)
This commit is contained in:
@ -488,7 +488,10 @@ componentTest("support modifying on select behavior through plugin api", {
|
||||
});
|
||||
});
|
||||
|
||||
this.set("content", [{ id: "1", name: "robin" }]);
|
||||
this.set("content", [
|
||||
{ id: "1", name: "robin" },
|
||||
{ id: "2", name: "arpit", __sk_row_type: "noopRow" }
|
||||
]);
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
@ -497,6 +500,15 @@ componentTest("support modifying on select behavior through plugin api", {
|
||||
|
||||
assert.equal(find(".on-select-test").html(), "1");
|
||||
|
||||
await this.get("subject").expand();
|
||||
await this.get("subject").selectRowByValue(2);
|
||||
|
||||
assert.equal(
|
||||
find(".on-select-test").html(),
|
||||
"2",
|
||||
"it calls onSelect for noopRows"
|
||||
);
|
||||
|
||||
clearCallbacks();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user