2018-06-15 23:03:24 +08:00
|
|
|
import componentTest from "helpers/component-test";
|
|
|
|
moduleForComponent("categories-admin-dropdown", { integration: true });
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
componentTest("default", {
|
|
|
|
template: "{{categories-admin-dropdown}}",
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2018-07-25 02:12:09 +08:00
|
|
|
async test(assert) {
|
2017-12-22 20:08:12 +08:00
|
|
|
const subject = selectKit();
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2017-12-22 20:08:12 +08:00
|
|
|
assert.equal(subject.el().find(".d-icon-bars").length, 1);
|
|
|
|
assert.equal(subject.el().find(".d-icon-caret-down").length, 1);
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2018-07-30 04:51:32 +08:00
|
|
|
await subject.expand();
|
2017-10-20 03:51:08 +08:00
|
|
|
|
2018-07-25 02:12:09 +08:00
|
|
|
assert.equal(subject.rowByValue("create").name(), "New Category");
|
2017-10-20 03:51:08 +08:00
|
|
|
}
|
|
|
|
});
|