mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Add acceptance tests for custom-html
This commit is contained in:
parent
79dc0518c9
commit
ae4fd06444
6 changed files with 61 additions and 24 deletions
18
test/javascripts/acceptance/custom-html-template-test.js.es6
Normal file
18
test/javascripts/acceptance/custom-html-template-test.js.es6
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("CustomHTML template", {
|
||||
setup() {
|
||||
Ember.TEMPLATES['top'] = Ember.HTMLBars.compile(`<span class='top-span'>TOP</span>`);
|
||||
},
|
||||
|
||||
teardown() {
|
||||
delete Ember.TEMPLATES['top'];
|
||||
}
|
||||
});
|
||||
|
||||
test("renders custom template", assert => {
|
||||
visit("/static/faq");
|
||||
andThen(() => {
|
||||
assert.equal(find('span.top-span').text(), 'TOP', 'it inserted the template');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue