mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 06:43:54 +08:00
005e1ecb9b
* First take on subsetting svg icons * FontAwesome 5 svg subset WIP * Include icons from plugins/badges into svg sprite subset * add svg icon support to themes * Add spec for SvgSprite * Misc. SVG icon fixes * Use FA5 svgs in local-dates plugin * CSS adjustments, fix SVG icons in group flair * Use SVG icons in poll plugin * Add SVG icons to /wizard
32 lines
769 B
JavaScript
32 lines
769 B
JavaScript
import componentTest from "helpers/component-test";
|
|
|
|
moduleForComponent("d-icon", { integration: true });
|
|
|
|
componentTest("default", {
|
|
template: '{{d-icon "bars"}}',
|
|
|
|
test(assert) {
|
|
const html = this.$()
|
|
.html()
|
|
.trim();
|
|
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>'
|
|
);
|
|
}
|
|
});
|
|
|
|
componentTest("with replacement", {
|
|
template: '{{d-icon "d-watching"}}',
|
|
|
|
test(assert) {
|
|
const html = this.$()
|
|
.html()
|
|
.trim();
|
|
assert.equal(
|
|
html,
|
|
'<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>'
|
|
);
|
|
}
|
|
});
|