FIX: Modal asking where to post was missing

This commit is contained in:
Robin Ward
2015-05-14 18:18:12 -04:00
parent 4451c8802a
commit 8e395a94d4
6 changed files with 36 additions and 8 deletions

View File

@@ -119,6 +119,27 @@ test("Create a Reply", () => {
});
});
test("Posting on a different topic", (assert) => {
visit("/t/internationalization-localization/280");
click('#topic-footer-buttons .btn.create');
fillIn('#wmd-input', 'this is the content for a different topic');
visit("/t/1-3-0beta9-no-rate-limit-popups/28830");
andThen(function() {
assert.equal(currentURL(), "/t/1-3-0beta9-no-rate-limit-popups/28830");
});
click('#reply-control button.create');
andThen(function() {
assert.ok(visible('.reply-where-modal'), 'it pops up a modal');
});
click('.btn-reply-here');
andThen(() => {
assert.equal(find('.cooked:last p').text(), 'this is the content for a different topic');
});
});
test("Create an enqueued Reply", () => {
visit("/t/internationalization-localization/280");

File diff suppressed because one or more lines are too long

View File

@@ -103,6 +103,10 @@ export default function() {
return response(fixturesByUrl['/t/280/1.json']);
});
this.get("/t/28830.json", function() {
return response(fixturesByUrl['/t/28830/1.json']);
});
this.get("/t/id_for/:slug", function() {
return response({id: 280, slug: "internationalization-localization", url: "/t/internationalization-localization/280"});
});