mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
UX: Add back button in chat browse screen on mobile (#18849)
This commit is contained in:
@ -23,6 +23,11 @@ acceptance("Discourse Chat - Mobile test", function (needs) {
|
||||
server.get("/u/search/users", () => {
|
||||
return helper.response([]);
|
||||
});
|
||||
|
||||
server.get("/chat/api/chat_channels.json", () => {
|
||||
const channels = [];
|
||||
return helper.response(channels);
|
||||
});
|
||||
});
|
||||
|
||||
needs.settings({
|
||||
@ -54,4 +59,14 @@ acceptance("Discourse Chat - Mobile test", function (needs) {
|
||||
"Clicking the left arrow button returns to the channels list"
|
||||
);
|
||||
});
|
||||
|
||||
test("Chat browse screen back button", async function (assert) {
|
||||
await visit("/chat/browse");
|
||||
await click(".chat-browse-view__back");
|
||||
assert.strictEqual(
|
||||
currentURL(),
|
||||
"/chat",
|
||||
"Clicking the back button returns to the channels list"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user