Rename 'target usernames' with 'target recipients' in Composer (#8606)
* Reapply "Rename 'target usernames' with 'target recipients' in Composer" This reverts commit9fe11d0fc3which revertedebb288dc2c. * DEV: Add test for replying to PM
This commit is contained in:
@@ -831,3 +831,20 @@ QUnit.test("Image resizing buttons", async assert => {
|
||||
"it does not unescapes script tags in code blocks"
|
||||
);
|
||||
});
|
||||
|
||||
QUnit.test("can reply to a private message", async assert => {
|
||||
let submitted;
|
||||
|
||||
/* global server */
|
||||
server.post("/posts", () => {
|
||||
submitted = true;
|
||||
return [200, { "Content-Type": "application/json" }, {}];
|
||||
});
|
||||
|
||||
await visit("/t/34");
|
||||
await click(".topic-post:eq(0) button.reply");
|
||||
await fillIn(".d-editor-input", "this is the *content* of the reply");
|
||||
await click("#reply-control button.create");
|
||||
|
||||
assert.ok(submitted);
|
||||
});
|
||||
|
||||
@@ -396,3 +396,15 @@ QUnit.test("allows featured link before choosing a category", assert => {
|
||||
);
|
||||
assert.ok(composer.get("canEditTopicFeaturedLink"), "can paste link");
|
||||
});
|
||||
|
||||
QUnit.test("targetRecipientsArray contains types", assert => {
|
||||
let composer = createComposer({
|
||||
targetRecipients: "test,codinghorror,staff,foo@bar.com"
|
||||
});
|
||||
assert.ok(composer.targetRecipientsArray, [
|
||||
{ type: "group", name: "test" },
|
||||
{ type: "user", name: "codinghorror" },
|
||||
{ type: "group", name: "staff" },
|
||||
{ type: "email", name: "foo@bar.com" }
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user