mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Rename all test files from JS -> ES6
This commit is contained in:
37
test/javascripts/widgets/topic-status-test.js
Normal file
37
test/javascripts/widgets/topic-status-test.js
Normal file
@ -0,0 +1,37 @@
|
||||
import { moduleForWidget, widgetTest } from "helpers/widget-test";
|
||||
import TopicStatusIcons from "discourse/helpers/topic-status-icons";
|
||||
|
||||
moduleForWidget("topic-status");
|
||||
|
||||
widgetTest("basics", {
|
||||
template: '{{mount-widget widget="topic-status" args=args}}',
|
||||
beforeEach(store) {
|
||||
this.set("args", {
|
||||
topic: store.createRecord("topic", { closed: true }),
|
||||
disableActions: true
|
||||
});
|
||||
},
|
||||
test(assert) {
|
||||
assert.ok(find(".topic-status .d-icon-lock").length);
|
||||
}
|
||||
});
|
||||
|
||||
widgetTest("extendability", {
|
||||
template: '{{mount-widget widget="topic-status" args=args}}',
|
||||
beforeEach(store) {
|
||||
TopicStatusIcons.addObject([
|
||||
"has_accepted_answer",
|
||||
"far-check-square",
|
||||
"solved"
|
||||
]);
|
||||
this.set("args", {
|
||||
topic: store.createRecord("topic", {
|
||||
has_accepted_answer: true
|
||||
}),
|
||||
disableActions: true
|
||||
});
|
||||
},
|
||||
test(assert) {
|
||||
assert.ok(find(".topic-status .d-icon-far-check-square").length);
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user