discourse/test/javascripts/acceptance/plugin-outlet-single-templa...

Failed to ignore revisions in .git-blame-ignore-revs.

29 lines
713 B
JavaScript
Raw Normal View History

import { acceptance } from "helpers/qunit-helpers";
2018-06-15 11:03:24 -04:00
const CONNECTOR =
"javascripts/single-test/connectors/user-profile-primary/hello";
acceptance("Plugin Outlet - Single Template", {
2017-06-14 13:57:58 -04:00
beforeEach() {
Ember.TEMPLATES[CONNECTOR] = Ember.HTMLBars.compile(
`<span class='hello-username'>{{model.username}}</span>`
);
},
2017-06-14 13:57:58 -04:00
afterEach() {
delete Ember.TEMPLATES[CONNECTOR];
}
});
QUnit.test("Renders a template into the outlet", async assert => {
await visit("/u/eviltrout");
assert.ok(
find(".user-profile-primary-outlet.hello").length === 1,
"it has class names"
);
assert.equal(
find(".hello-username").text(),
"eviltrout",
"it renders into the outlet"
);
2018-06-15 11:03:24 -04:00
});