UX: Add back button in chat browse screen on mobile (#18849)

This commit is contained in:
Keegan George
2022-11-03 01:06:30 -07:00
committed by GitHub
parent 9ff091dc01
commit 0028149ed4
5 changed files with 35 additions and 1 deletions

View File

@ -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"
);
});
});