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-26 16:49:57 -05:00
|
|
|
assert.equal(
|
|
|
|
html,
|
|
|
|
'<svg class="fa d-icon d-icon-bars svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use xlink:href="#bars"></use></svg>'
|
|
|
|
);
|
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,
|
2019-12-19 14:53:57 -05:00
|
|
|
'<svg class="fa d-icon d-icon-d-watching svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use xlink:href="#discourse-bell-exclamation"></use></svg>'
|
2018-06-15 11:03:24 -04:00
|
|
|
);
|
2017-11-23 12:15:37 -05:00
|
|
|
}
|
|
|
|
});
|