Add test for user drafts stream

Followup to 84a3da4b18
This commit is contained in:
Penar Musaraj 2019-01-28 22:30:01 -05:00
parent f7deb52c90
commit 530eeba855
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
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");
assert.ok(find(".user-stream-item").length === 2, "draft removed, list length diminished by one");
});

View File

@ -43,7 +43,7 @@ export default {
excerpt: "here goes a reply to a PM.",
created_at: "2018-07-20T16:58:47.433Z",
draft_key: "topic_93",
sequence: 1,
sequence: 0,
draft_username: "eviltrout",
avatar_template: "/user_avatar/localhost/eviltrout/{size}/2_1.png",
data: