2016-11-24 01:57:50 +08:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
acceptance("CustomHTML template", {
|
2017-06-15 01:57:58 +08:00
|
|
|
beforeEach() {
|
2016-11-24 01:57:50 +08:00
|
|
|
Ember.TEMPLATES["top"] = Ember.HTMLBars.compile(
|
|
|
|
`<span class='top-span'>TOP</span>`
|
|
|
|
);
|
|
|
|
},
|
|
|
|
|
2017-06-15 01:57:58 +08:00
|
|
|
afterEach() {
|
2016-11-24 01:57:50 +08:00
|
|
|
delete Ember.TEMPLATES["top"];
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-07-19 17:40:42 +08:00
|
|
|
QUnit.test("renders custom template", async assert => {
|
|
|
|
await visit("/static/faq");
|
|
|
|
assert.equal(find("span.top-span").text(), "TOP", "it inserted the template");
|
2016-11-24 01:57:50 +08:00
|
|
|
});
|