2018-06-15 23:03:24 +08:00
|
|
|
import componentTest from "helpers/component-test";
|
2017-11-24 01:15:37 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
moduleForComponent("d-icon", { integration: true });
|
2017-11-24 01:15:37 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
componentTest("default", {
|
2017-11-24 01:15:37 +08:00
|
|
|
template: '{{d-icon "bars"}}',
|
|
|
|
|
|
|
|
test(assert) {
|
2018-06-15 23:03:24 +08:00
|
|
|
const html = this.$()
|
|
|
|
.html()
|
|
|
|
.trim();
|
2018-11-27 05:49:57 +08: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-24 01:15:37 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
componentTest("with replacement", {
|
2017-11-24 01:15:37 +08:00
|
|
|
template: '{{d-icon "d-watching"}}',
|
|
|
|
|
|
|
|
test(assert) {
|
2018-06-15 23:03:24 +08:00
|
|
|
const html = this.$()
|
|
|
|
.html()
|
|
|
|
.trim();
|
|
|
|
assert.equal(
|
|
|
|
html,
|
2018-11-27 05:49:57 +08:00
|
|
|
'<svg class="fa d-icon d-icon-d-watching svg-icon svg-string" xmlns="http://www.w3.org/2000/svg"><use xlink:href="#exclamation-circle"></use></svg>'
|
2018-06-15 23:03:24 +08:00
|
|
|
);
|
2017-11-24 01:15:37 +08:00
|
|
|
}
|
|
|
|
});
|