Add test for user drafts stream

Add test for user drafts stream

Followup to 84a3da4b18d6dd5c2a0940fe04b339ebc1605123

diff --git a/test/javascripts/acceptance/user-drafts-stream-test.js.es6 b/test/javascripts/acceptance/user-drafts-stream-test.js.es6
new file mode 100644
index 0000000..06f7d9f
--- /dev/null
+++ b/test/javascripts/acceptance/user-drafts-stream-test.js.es6
@@ -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");
+
+});
diff --git a/test/javascripts/fixtures/drafts.js.es6 b/test/javascripts/fixtures/drafts.js.es6
index 8aaa882..f5f3195 100644
--- a/test/javascripts/fixtures/drafts.js.es6
+++ b/test/javascripts/fixtures/drafts.js.es6
@@ -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:

GitHub sha: 530eeba8

1 Like