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 00000000000..06f7d9f4d2a --- /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 8aaa88289c3..f5f31958f6e 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: