mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
topics: Change topic links of left sidebar to use new permalinks.
This commit updates the topic links obtained from clicking the topics in the left sidebar, recent view and inbox, and those obtained from "Copy link to topic" to use the new topic permalinks. Fixes part of #21505.
This commit is contained in:
@@ -47,6 +47,13 @@ run_test("test by_stream_url", () => {
|
||||
|
||||
run_test("test by_stream_topic_url", () => {
|
||||
const maybe_get_stream_name = () => "a test stream";
|
||||
const result = internal_url.by_stream_topic_url(123, "test topic", maybe_get_stream_name);
|
||||
// Test stream_topic_url is a traditional topic link when the
|
||||
// message_id to be encoded is undefined.
|
||||
let result = internal_url.by_stream_topic_url(123, "test topic", maybe_get_stream_name);
|
||||
assert.equal(result, "#narrow/channel/123-a-test-stream/topic/test.20topic");
|
||||
|
||||
// Test stream_topic_url is a topic permaling when the
|
||||
// message_id to be encoded is not undefined.
|
||||
result = internal_url.by_stream_topic_url(123, "test topic", maybe_get_stream_name, 12);
|
||||
assert.equal(result, "#narrow/channel/123-a-test-stream/topic/test.20topic/with/12");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user