mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 17:40:43 +08:00
Rename all test files from JS -> ES6
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
const CONNECTOR =
|
||||
"javascripts/single-test/connectors/user-profile-primary/hello";
|
||||
acceptance("Plugin Outlet - Single Template", {
|
||||
beforeEach() {
|
||||
Ember.TEMPLATES[CONNECTOR] = Ember.HTMLBars.compile(
|
||||
`<span class='hello-username'>{{model.username}}</span>`
|
||||
);
|
||||
},
|
||||
|
||||
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"
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user