2016-11-22 14:02:47 -05:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
const CONNECTOR = 'javascripts/single-test/connectors/user-profile-primary/hello';
|
|
|
|
acceptance("Plugin Outlet - Single Template", {
|
2017-06-14 13:57:58 -04:00
|
|
|
beforeEach() {
|
2016-11-22 14:02:47 -05:00
|
|
|
Ember.TEMPLATES[CONNECTOR] = Ember.HTMLBars.compile(
|
2016-12-19 11:19:10 -05:00
|
|
|
`<span class='hello-username'>{{model.username}}</span>`
|
2016-11-22 14:02:47 -05:00
|
|
|
);
|
|
|
|
},
|
|
|
|
|
2017-06-14 13:57:58 -04:00
|
|
|
afterEach() {
|
2016-11-22 14:02:47 -05:00
|
|
|
delete Ember.TEMPLATES[CONNECTOR];
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-06-14 13:57:58 -04:00
|
|
|
QUnit.test("Renders a template into the outlet", assert => {
|
2017-03-28 14:27:54 -04:00
|
|
|
visit("/u/eviltrout");
|
2016-11-22 14:02:47 -05:00
|
|
|
andThen(() => {
|
|
|
|
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');
|
|
|
|
});
|
2017-06-14 13:57:58 -04:00
|
|
|
});
|