mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Remove obsolete code for stream subscribe buttons.
In 18e43895ff we replaced
stream subscribe buttons with stream links. The new feature
has been well tested and well received for over a year now,
so it's safe to remove the older feature at this point.
Older sites will have super old messages that still have the
rendered markup; this commit does not attempt to address those
situations. Most likely, clicking on an old button in the old
message will either do nothing or look like a message reply.
This commit is contained in:
@@ -1067,58 +1067,6 @@ class BugdownTest(ZulipTestCase):
|
||||
'<p>There #<strong>Nonexistentstream</strong></p>')
|
||||
self.assertEqual(msg.mentions_user_ids, set())
|
||||
|
||||
def test_stream_subscribe_button_simple(self) -> None:
|
||||
msg = '!_stream_subscribe_button(simple)'
|
||||
converted = bugdown_convert(msg)
|
||||
self.assertEqual(
|
||||
converted,
|
||||
'<p>'
|
||||
'<span class="inline-subscribe" data-stream-name="simple">'
|
||||
'<button class="inline-subscribe-button btn">Subscribe to simple</button>'
|
||||
'<span class="inline-subscribe-error"></span>'
|
||||
'</span>'
|
||||
'</p>'
|
||||
)
|
||||
|
||||
def test_stream_subscribe_button_in_name(self) -> None:
|
||||
msg = '!_stream_subscribe_button(simple (not\\))'
|
||||
converted = bugdown_convert(msg)
|
||||
self.assertEqual(
|
||||
converted,
|
||||
'<p>'
|
||||
'<span class="inline-subscribe" data-stream-name="simple (not)">'
|
||||
'<button class="inline-subscribe-button btn">Subscribe to simple (not)</button>'
|
||||
'<span class="inline-subscribe-error"></span>'
|
||||
'</span>'
|
||||
'</p>'
|
||||
)
|
||||
|
||||
def test_stream_subscribe_button_after_name(self) -> None:
|
||||
msg = '!_stream_subscribe_button(simple) (not)'
|
||||
converted = bugdown_convert(msg)
|
||||
self.assertEqual(
|
||||
converted,
|
||||
'<p>'
|
||||
'<span class="inline-subscribe" data-stream-name="simple">'
|
||||
'<button class="inline-subscribe-button btn">Subscribe to simple</button>'
|
||||
'<span class="inline-subscribe-error"></span>'
|
||||
'</span>'
|
||||
' (not)</p>'
|
||||
)
|
||||
|
||||
def test_stream_subscribe_button_slash(self) -> None:
|
||||
msg = '!_stream_subscribe_button(simple\\\\)'
|
||||
converted = bugdown_convert(msg)
|
||||
self.assertEqual(
|
||||
converted,
|
||||
'<p>'
|
||||
'<span class="inline-subscribe" data-stream-name="simple\\">'
|
||||
'<button class="inline-subscribe-button btn">Subscribe to simple\\</button>'
|
||||
'<span class="inline-subscribe-error"></span>'
|
||||
'</span>'
|
||||
'</p>'
|
||||
)
|
||||
|
||||
def test_in_app_modal_link(self) -> None:
|
||||
msg = '!modal_link(#settings, Settings page)'
|
||||
converted = bugdown_convert(msg)
|
||||
|
||||
Reference in New Issue
Block a user