2019-01-29 11:30:01 +08:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
acceptance("User Drafts", { loggedIn: true });
|
|
|
|
|
|
|
|
QUnit.test("Stream", async assert => {
|
|
|
|
await visit("/u/eviltrout/activity/drafts");
|
|
|
|
assert.ok(find(".user-stream-item").length === 3, "has drafts");
|
|
|
|
|
|
|
|
await click(".user-stream-item:last-child .remove-draft");
|
2019-01-29 11:47:11 +08:00
|
|
|
assert.ok(
|
|
|
|
find(".user-stream-item").length === 2,
|
|
|
|
"draft removed, list length diminished by one"
|
|
|
|
);
|
2019-01-29 11:30:01 +08:00
|
|
|
});
|
2019-11-25 20:31:47 +08:00
|
|
|
|
|
|
|
QUnit.test("Stream - resume draft", async assert => {
|
|
|
|
await visit("/u/eviltrout/activity/drafts");
|
|
|
|
assert.ok(find(".user-stream-item").length > 0, "has drafts");
|
|
|
|
|
|
|
|
await click(".user-stream-item .resume-draft");
|
|
|
|
assert.equal(find(".d-editor-input").val(), "dum de dum da ba.");
|
|
|
|
});
|