DEV: migrate acceptance tests to async await - plugin, reports, user, topic

This commit is contained in:
Maja Komel
2018-07-19 16:40:12 +02:00
committed by GitHub
parent 2e96646659
commit 73739060f3
16 changed files with 476 additions and 626 deletions

View File

@ -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"
);
});