FIX: use search message context on group message page (#13936)

This commit is contained in:
Arpit Jalan 2021-08-04 13:42:17 +05:30 committed by GitHub
parent d23c0c06c3
commit 4122affc0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -31,10 +31,21 @@ export default (type) => {
hideCategory: true,
showPosters: true,
});
const currentUser = this.currentUser;
this.searchService.set("searchContext", {
type: "private_messages",
id: currentUser.get("username_lower"),
user: currentUser,
});
},
_isArchive() {
return type === "archive";
},
deactivate() {
this.searchService.set("searchContext", null);
},
});
};

View File

@ -241,6 +241,12 @@ acceptance("Group - Authenticated", function (needs) {
"This is a private message 1",
"it should display the list of group topics"
);
await click("#search-button");
assert.ok(
exists(".search-context input:checked"),
"scope to message checkbox is checked"
);
});
test("Admin Viewing Group", async function (assert) {