From ec8cc833c681428e780e249b569504947581b4ae Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Tue, 27 Feb 2018 15:44:34 +0530 Subject: [PATCH] fix the build --- .../acceptance/personal-message-test.js.es6 | 28 +++++++++++++++++++ test/javascripts/acceptance/topic-test.js.es6 | 24 ---------------- 2 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 test/javascripts/acceptance/personal-message-test.js.es6 diff --git a/test/javascripts/acceptance/personal-message-test.js.es6 b/test/javascripts/acceptance/personal-message-test.js.es6 new file mode 100644 index 00000000000..baecb56e4d7 --- /dev/null +++ b/test/javascripts/acceptance/personal-message-test.js.es6 @@ -0,0 +1,28 @@ +import { acceptance } from "helpers/qunit-helpers"; + +acceptance("Personal Message", { + loggedIn: true +}); + +QUnit.test("footer edit button", assert => { + visit("/t/pm-for-testing/12"); + + andThen(() => { + assert.ok(!exists('.edit-message'), 'does not show edit first post button on footer by default'); + }); +}); + +acceptance("Personal Message Tagging", { + loggedIn: true, + site: { can_tag_pms: true } +}); + +QUnit.test("show footer edit button", assert => { + visit("/t/pm-for-testing/12"); + + andThen(() => { + assert.ok(exists('.edit-message'), 'shows edit first post button on footer when PM tagging is enabled'); + }); +}); + + diff --git a/test/javascripts/acceptance/topic-test.js.es6 b/test/javascripts/acceptance/topic-test.js.es6 index 697e68f0bd2..b84afe844f7 100644 --- a/test/javascripts/acceptance/topic-test.js.es6 +++ b/test/javascripts/acceptance/topic-test.js.es6 @@ -173,14 +173,6 @@ QUnit.test("Updating the topic title with emojis", assert => { }); }); -QUnit.test("does not show 'edit first post' button on topic/pm footer", assert => { - visit("/t/pm-for-testing/12"); - - andThen(() => { - assert.ok(!exists('.edit-message'), 'it does not show edit button'); - }); -}); - acceptance("Topic featured links", { loggedIn: true, settings: { @@ -207,19 +199,3 @@ QUnit.test("remove featured link", assert => { // assert.ok(!exists('.title-wrapper .topic-featured-link'), 'link is gone'); // }); }); - -acceptance("Personal message footer", { - loggedIn: true, - settings: { - allow_staff_to_tag_pms: true, - tagging_enabled: true - } -}); - -QUnit.test("shows edit 'first post button' on PM footer", assert => { - visit("/t/pm-for-testing/12"); - - andThen(() => { - assert.ok(exists('.edit-message'), 'it shows the edit button'); - }); -});