mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 02:34:28 +08:00
DEV: migrate acceptance tests to async await - plugin, reports, user, topic
This commit is contained in:
@ -36,24 +36,21 @@ acceptance("Plugin Outlet - Connector Class", {
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test("Renders a template into the outlet", assert => {
|
||||
visit("/u/eviltrout");
|
||||
andThen(() => {
|
||||
assert.ok(
|
||||
find(".user-profile-primary-outlet.hello").length === 1,
|
||||
"it has class names"
|
||||
);
|
||||
assert.ok(
|
||||
!find(".user-profile-primary-outlet.dont-render").length,
|
||||
"doesn't render"
|
||||
);
|
||||
});
|
||||
click(".say-hello");
|
||||
andThen(() => {
|
||||
assert.equal(
|
||||
find(".hello-result").text(),
|
||||
"hello!",
|
||||
"actions delegate properly"
|
||||
);
|
||||
});
|
||||
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.ok(
|
||||
!find(".user-profile-primary-outlet.dont-render").length,
|
||||
"doesn't render"
|
||||
);
|
||||
|
||||
await click(".say-hello");
|
||||
assert.equal(
|
||||
find(".hello-result").text(),
|
||||
"hello!",
|
||||
"actions delegate properly"
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user