2018-06-15 11:03:24 -04:00
|
|
|
import componentTest from "helpers/component-test";
|
2017-11-23 12:15:37 -05:00
|
|
|
|
2018-06-15 11:03:24 -04:00
|
|
|
moduleForComponent("d-icon", { integration: true });
|
2017-11-23 12:15:37 -05:00
|
|
|
|
2018-06-15 11:03:24 -04:00
|
|
|
componentTest("default", {
|
2017-11-23 12:15:37 -05:00
|
|
|
template: '{{d-icon "bars"}}',
|
|
|
|
|
|
|
|
test(assert) {
|
2018-06-15 11:03:24 -04:00
|
|
|
const html = this.$()
|
|
|
|
.html()
|
|
|
|
.trim();
|
2018-11-08 00:12:18 -05:00
|
|
|
assert.equal(html, '<i class="fa fa-bars d-icon d-icon-bars"></i>');
|
2017-11-23 12:15:37 -05:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-06-15 11:03:24 -04:00
|
|
|
componentTest("with replacement", {
|
2017-11-23 12:15:37 -05:00
|
|
|
template: '{{d-icon "d-watching"}}',
|
|
|
|
|
|
|
|
test(assert) {
|
2018-06-15 11:03:24 -04:00
|
|
|
const html = this.$()
|
|
|
|
.html()
|
|
|
|
.trim();
|
|
|
|
assert.equal(
|
|
|
|
html,
|
2018-11-08 00:12:18 -05:00
|
|
|
'<i class="fa fa-exclamation-circle d-icon d-icon-d-watching"></i>'
|
2018-06-15 11:03:24 -04:00
|
|
|
);
|
2017-11-23 12:15:37 -05:00
|
|
|
}
|
|
|
|
});
|